Fix ASSERT expressions with volatile variables in
arch/arm/arm_thread_swap test suite.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix a memset function call so the sizeof() argument is
evaluated using the appropriate struct type.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix ASSERT expression with volatile test variables
in arch/arm/arm_ramfunc test suite. Fix, also, an
logical expression in an if-statement in the test.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix expressions with volatile variables in ASSERT
statements in arch/arm/arm_zero_latency_irq test
suite.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Closes#18392 by asserting and returning an error if the block size is
not positive.
Closes#18458. The diagnosis here was not relevant as an in-range EOS
is written before the buffer is used, but using the non-terminated
length is slightly more clear about intent and may avoid a read overrun
of the mount point.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This PR updates the documentation to cover a technical solution to
providing a driver instance that extends the functionality of a
subsystem API. The solution described was mooted in Zephyr PR #17072
and approved by the Technical Steering Committee during its 2019-08-07
meeting.
Relates-to: #11993
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
To avoid a Coverity warning (203449):
https://github.com/zephyrproject-rtos/zephyr/issues/18354
Initialize a pointer to NULL, and check it later before
de-referencing it.
Coverity could not see that posix_print_error_and_exit()
never returns even that it ends with exit()
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Consistently place C++ use of extern "C" after all include directives,
within the negative branch of _ASMLANGUAGE if used.
Remove extern "C" support from files that don't declare objects or
functions.
Background from issue #17997:
Declarations that use C linkage should be placed within extern "C"
so the language linkage is correct when the header is included by
a C++ compiler.
Similarly #include directives should be outside the extern "C" to
ensure the language-specific default linkage is applied to any
declarations provided by the included header.
See: https://en.cppreference.com/w/cpp/language/language_linkage
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
No test verifies a TX callback for successful transfers.
This commit adds a test for those callbacks.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
When init level hierarchy was reworked the documentation was switched to
describe the new levels, but the count of relevant levels was not
changed.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit adds the reel_board canbus shield.
On the shield, there is an MCP2515 and a CAN transceiver.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Adding required fields to the devicetree overlay of the CAN sample as
this is often used as a reference. Also use these fields instead of the
KConfig entries.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
The CAN sample is rewritten to be board independent.
The CAN controller and LED is determined automatically and the
button is removed.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
SOCKS5 support added to echo_client. Details are added
in README file about how to verify this feature using
echo-client with echo-server running on Linux host.
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Variable pages_per_bank has been introduced to ease page erase
in dual bank configurations. This has been implemented using
FLASH_OPTR_DUALBANK definition.
It happen that this was not taking into account L4+ series that
use FLASH_OPTR_DBANK instead of FLASH_OPTR_DUALBANK. This lead
to compilation issue for this driver in case of L4+ series.
So, this patch is adding the support of FLASH_OPTR_DBANK definition.
Besides, FLASH_OPTR_DUALBANK (as FLASH_OPTR_DBANK) are actually
defining availability of an option byte to configure use of Dual
Bank. So besides of its definition, its value in flash OPTR register
should be checked to ensure Dual Bank configuration is used.
This patch is taking this into account by adding the check of this
byte. Error -ENOTSUP is returned in case Single Bank is configured
since it has not be validated yet (in case Dual Bank is possible but
not configured).
Fixes#18246 for nucleo_l4r5zi
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
SR and LR were used as global names for load and store RISC-V assembler
operations, colliding with other uses such as SR for STATUS REGISTER in
some peripherals. Renamed them to a longer more specific name to avoid
the collision.
Signed-off-by: Karsten Koenig <karsten.koenig.030@gmail.com>
Add comment for the setup failure.
The solution can be infered from ARMmbed/cmsis-pack-manager#97
Fixes#18269.
Signed-off-by: Chen Guokai <1415430544@qq.com>
The openocd flash runner now expects a hex file, so always build a HEX
image if the runner is set to openocd.
Fixes#18181
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit fixes following issues in printf formatting
- cast values of type off_t to long to remove warnings generated when
compiling with Newlib and CONFIG_IMG_ERASE_PROGRESSIVELY is enabled
- cast values of type off_t always to long and not u32_t
- use 'z' modifier (as in "%zu") to print values of type size_t
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
When the database changes and a client becomes change unware it should
also clear the out of sync flag as the following request should return
an error:
Core Spec 5.1 | Vol 3, Part G, 2.5.2.1 Robust Caching:
'The error response is sent only once after the client becomes
change-unaware, unless the client disconnects or the database changes
again before the client becomes change-aware in which case the error
response shall be sent again.'
Fixes: #18183
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This fixes the following crash:
ASSERTION FAIL [0] @ ZEPHYR_BASE/subsys/logging/log_core.c:180
argument 2 in log message "%s: Stored CCCs for %s (%s)"
missing log_strdup().
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The HAL/SDK code for imx6sx utilizes floating point support in
CCM_ANALOG_GetPllFreq function which is utilized by drivers to determine
clock information. As such we should enable hardware FP support by
default so we don't get pure soft-float emulation and pull in a bunch of
extra code.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is a band-aid to make it more obvious to potential users of 'west
sign' and 'west flash' which hex file they are flashing, when they are
falling back on a binary file, and erroring out when a hex file does
not exist.
Fixes: #18201
Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
This commit enables the pullup on CAN0_RX pin (PORTB 19).
The pullup ensures that the CAN controller initializes even
without a transceiver connected.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Apparently the tests/lib/sprintf test requires more than 34kB
of code size, when building in MCIMX7_M4-based platforms. Such
platforms, however, only have 32kB of code memory, therefore,
we exclude them from this test.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Fix issue unable to connect to bonded peer when host resolution is used
either because the controller does not support privacy, or the
controller resolving list was exceeded.
In this case we need to use the RPA from the advertising report
directly, there is a small chance of the peer cycling the RPA here, in
which case the connection might be unsuccessful.
Bug introduced here: 45da629b24Fixes: #18306
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
now we use hex file instead of elf file for flash command as
PR #17822 suggested, so enable BUILD_OUTPUT_HEX by default for
board sam_e70_xplained.
Fixes: #18181.
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
CONFIG_MAIN_STACK_SIZE was originally 1344 in this test. The following
commit removed setting the stack size in the test:
commit 7b3cd7d371
Author: Cami Carballo <cami.carballo@intel.com>
Date: Fri Jul 26 10:59:16 2019 -0400
tests: net: increase stack size
However getting the default stack size on FRDM-K64F of 512 causes the
following panic:
FATAL: ***** BUS FAULT *****
FATAL: Stacking error
FATAL: Imprecise data bus error
FATAL: NXP MPU error, port 3
FATAL: Mode: Supervisor, Data Address: 0x20002ff0
FATAL: Type: Write, Master: 0, Regions: 0x8200
FATAL: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0x00000000
FATAL: r3/a4: 0x00000000 r12/ip: 0x00000000 r14/lr: 0x00000000
FATAL: xpsr: 0x200002f4
FATAL: Faulting instruction address (r15/pc): 0x00000000
FATAL: >>> ZEPHYR FATAL ERROR 2: Stack overflow
FATAL: Current thread: 0x2000182c (main)
FATAL: Halting system
Bump stack back to original 1344 fixes the issue.
Fixes#18292
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The sys_mutex test doesn't seem to fit in 24kB of RAM anymore,
when building with user mode support (CONFIG_USERSPACE=y). We,
therefore, restrict it to platforms that have 32KB or more of
RAM. We also filter the test with ARCH_HAS_USERSPACE explicitly.
The alternative setup of the sys_mutex test, i.e. without user
mode support (CONFIG_TEST_USERSPACE=n) continues to build for
platforms with less than 32k of RAM.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The command for generating offsets.h has only been depending on the
target for offsets.c.obj, and not the file offsets.c.obj itself. Both
are needed, as explained in "CMake: dependencies between targets and
files and custom commands"[0].
This patch adds the dependency and fixes#18301
[0] https://tinyurl.com/y2hgzjhx
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Reduce the RAM usage in two of the Bluetooth samples in order for them
to fit in the BBC Microbit's RAM.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Disable Advertising Extensions by default, since they are not really
operational and they take RAM.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When compiling a sample like a beacon, none of the `if defined()`
statements in the switch case are actually compiled in, so the compiler
complains of an orphan mem_release();break; sequence.
Add a type that we know will always be compiled in in order to avoid
this issue.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
When in Low Power mode an LPN may receive messages sent by nodes other
than its friend during its brief receive window. These messages get
rejected by the transport layer. At some point in the future the LPN
will receive these messages from its friend, however they will have
already been added to the network message cache earlier.
When the transport layer rejects a message due to it being received from
a non-friend node while in Low Power mode it must be removed from the
network message cache so that it can be correctly received from its
friend in the future.
Fixes#17809
Signed-off-by: Rich Barlow <rich@bennellick.com>
The commit 1c7b668804 tried to fix
resending segments to the GATT bearer, however it got the buffer
refernce counting wrong. The bt_mesh_net_resend() function doesn't
own a reference to the buffer, i.e. it's not responsible for unrefing
it. E.g. bt_mesh_adv_send() takes its own reference.
What was missing however was the handling of the callbacks. Use the
recently introduced send_cb_finalize() helper to make sure they're
called.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There are several places that require the send callbacks to be called
immediately. Reduce the code a bit by introducing a helper for this.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The RPA timer should always be running, even with privacy supported by
the controller. In order to select an IRK to generate the private
the controller is instructed by provided an identity address.
If we want to advertise privately without providing an identity address
the host has to set the private address.
Fixes: #18150
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Several advertising options were not being picked into the
documentation due to missing doxygen markers.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a dedicated entry for Bluetooth Mesh, and include Trond from
Nordic as an owner, since he will be actively participating in
maintaining & developing the code.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When coming out of an exception, we need to mask interrupts
to avoid races when decrementing the nested count. Move
the instruction that does this earlier.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
'interrupt-parent' should contain just the phandle of the node
interrupts are sent to.
This node (gic: interrupt-controller@f9010000) doesn't generate any
interrupts, so the 'interrupt-parent' value is never used (this is why
it wasn't caught). It'll give an error later with 'interrupt-parent'
declared as 'type: phandle' in bindings though.
Don't know what was intended. Just remove the 0.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>