Increase to 1024 to get more tests and sample running on this device
with only 8K of SRAM.
Change thread stack size in the mslab test to make it fit into this
board.
Jira: ZEP-2079
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This reverts commit 37f4178f58.
This change builds gen_idt in the zephyr project tree instead of
building it in outdir of the application. The build process should all
happen inside outdir and no binaries should be placed in the zephyr
tree.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
It's mandatory to set chan->ops so explicit checks for it are
redundant. What's worse, inconsistent checking for this triggers
static code analyzer warnings. This patch fixes Coverity CID 151984.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
pop {lr} instruction is not supported in ARMv6-M, fixed by
using pop {r0}; mov lr, r0; instructions.
Jira: ZEP-2222
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
buf->len should be validated before accessing it since remote can
send invalid frame_len which can result in out of bound memory
access.
This also fix the len check wrt cstate, since current check is
not considering the cstate length size and frame_len size.
Jira: ZEP-2110
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
Added shell module for the Bluetooth Controller's ticker
interfaces.
For now, info command enumerates active tickers' details.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
If we receive unknown option in neighbor advertisement message,
then skip those properly. Old code did not check the length of
the extension options which could cause infinite loop.
Jira: ZEP-2219
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
Waiting for an NET_EVENT_IF_UP before trying to connect isn't sufficient
in some cases; for instance, on devices using the MCUX HAL, such as the
FRDM-K64F, the interface will have the NET_IF_UP flag set even though
the link negotiation didn't yet complete.
Executing this sample on such board will produce the following output.
Notice the "Enabled 100M..." message right after trying to connect.
[dev/eth_mcux] [DBG] eth_0_init: MAC 00:04:9f:6f:91:da
net_context_connect error Is the server (broker) up and running?
[publisher:247] network_setup: -60 <ERROR>
Bye! [dev/eth_mcux] [INF] eth_mcux_phy_event: Enabled 100M
full-duplex mode.
Even though the returned error is ETIMEDOUT, increasing
net_context_connect()'s timeout parameter to several seconds isn't
sufficient; other steps performed by network_setup() after the link has
been fully established are necessary. As a stopgap measure, try
connecting a few times before giving up (more than one connection
attempt should be made by application in most cases, anyway.)
It might be the case that we need events to monitor ethernet link
(re)negotation in addition to the NET_IF_UP bit.
Jira: ZEP-2036
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
On MSYS2, the #include paths for GCC need to be in native format
(Windows-style paths) since GCC is a native Windows application and
therefore requires standard paths.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This patch adds a dts config include file that is sourced during builds.
The config file contents are key value pairs derived from the DTS board
descriptions.
Jira: ZEP-2119
Change-Id: I4d50e795ba776645b56f0b83410cbb5b0a8fd4fa
Signed-off-by: Andy Gross <andy.gross@linaro.org>
This will generate an additional file that can be sourced by the build
system to expose definitions generated by device tree and used for
flashing and debugging targets.
Change-Id: I184e247f0a8dbd1a4a42dd4b02ea01f2caa70533
Jira: ZEP-2119
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use argeparse for options and add a fixup option to add on top of
generated file. This was previously done in the top Makefile and was
generated defines outside of the header main if statement.
Jira: ZEP-2147
Change-Id: If65f34a11de27baa770d4ce0ef4fca2abbd30258
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some users started the wrong shell (MinGW) and ended up having build
issues, added a note about starting the right shell.
Jira: ZEP-2004
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fixed documentation and updated config files for xtools to be used with
the latest version of crosstool-ng (1.23)
Jira: ZEP-616, ZEP-2146
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
If we received a bad HTTP request, then subsequent good requests
were also returning 400 error code. The parsing state needs to
be initialized after each received HTTP request.
Jira: ZEP-2181
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add tests for new macro helpers that allow JSON field names to differ
from their corresponding C struct field names. These pass.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
The set of valid JSON field names is larger than the set of C
identifiers. This can result in structure field names which pack
decoded JSON values which necessarily differ from the field names in
the JSON.
Support this by adding _NAMED variants to each of the JSON_OBJ_DESCR_*
helper macros. For example, JSON_OBJ_DESCR_PRIM_NAMED allows users to
declare a descriptor field for a primitive type, whose structure field
name is different from the JSON field name.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Fixes the following issue:
"In expression 1UL << chan - 1U, left shifting by more than 31
bits has undefined behavior. The shift amount, chan - 1U, is
4294967295."
Coverity-CID: 167140
Jira: ZEP-2131
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
The error was generated by a piece of code that is
not currently being used. This piece of code was kept to measure
the overhead caused by the benchmarking code on x86.
JIRA:ZEP-2160
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
As they are part of interrupt-driver API, they must be called from
an ISR. That means that calling it outside IST may not have a desired
effect, and vice-versa, not calling them from ISR can lead to issues.
The patch also eleborates/fixes description of uart_irq_rx_ready().
Jira: ZEP-2016
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
In console shell, add explicit, 'exit' command to leave the current
module. Currently this is being achieved by overloading select command
(without an argument).
Signed-off-by: Siddharth Chandrasekaran <siddharth@embedjournal.com>
64-bit types were not being handled properly and depending on the
calling convention could result in garbage values being printed.
We still truncate these to 32-bit values, the predominant use-case
is printing timestamp delta values which generally fit in a 32-bit
value. However we are no longer printing random stuff.
Test case for printk() updated appripriately to catch this regression.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This makes gatt-write-signed to reuse cmd_gatt_write_without_rsp since
it is quite similar and that adds the ability to send multiple octecs
instead of just a single byte.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This removes gatt-write-without-response-repeated and makes
gatt-write-without-response similar to gatt-write which was the
intention of gatt-write-without-response-repeated.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
All the files under shell subdir shall only be build if
CONFIG_BLUETOOTH_SHELL is selected.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
In order to properly queue request there need to be a bt_att_req
storage but none of the calls to gatt_write_ccc were using the params
causing gatt_send to use bt_att_send and not bt_att_req_send.
To fix this now all the callers of gatt_write_ccc do set the params
properly but this means that bt_gatt_unsubscribe has to wait for it
to be completed before the application can reuse the
bt_gatt_subscribe_params.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The code was so far requesting 5 ms refresh timer, however with a
default TICKS_PER_SECOND=100 this was always rounded up to 10 ms,
causing some flickering. The closest TICKS_PER_SECOND that will give
flicker-less display but also give optimal ms-to-ticks calculations is
250, so change the timer to match that. After this change any code
using the display is recommended to set 250 as ticks per second.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Print also network buffers that are allocated by the IPv6
fragment handler. This is very useful in debugging.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
These tests make sure that the IPv6 fragments are build correctly
when a large IPv6 packet is being sent.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the user really wants, it is possible to increase the
maximum size of the fragmented packet. According to RFC 2460
chapter 5, we do not need to accept larger than 1500 byte IPv6
packets, so the max pkt limit is set to 2. But if really needed
the limit can be raised by defining NET_IPV6_FRAGMENTS_MAX_PKT
to some new value. Currently there is no Kconfig option for
doing this as it is unlikely that this is needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The cancellation of reassembly did not work as expected because
K_WORK_INITIALIZER() did not setup the timeout function properly.
So do the timer initialization at runtime instead.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IPv6 fragmentation was not working properly when the large
IPv6 packet was being sent. There is unit tests in next commit
that will test the IPv6 fragmentation sending.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the fragmented IPv6 packet was very large, we could run out
of resources. When that happened, we leaked the memory for the
pending fragments that were waiting reassembly.
Jira: ZEP-2166
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The previous default 60 seconds is way too long for our limited
amount of memory. It might be that the 5 sec is still too long
but that can be changed in the future.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
While returning 32-bit values from radio status interfaces,
explicitly compare radio h/w event registers to be non-zero,
dont just return the direct 32-bit h/w register content.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added extra assert checks to detect controller failure if
a role event preparation function was not followed by the
role event start function.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>