After adding 'Multicast group filtering' (commit b7b73d0) server should
join CoAP IPv6 multicast group to accept multicast CoAP messages.
Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
Fixes a memory leak when a virtual address subscription is added for a
model that either has this VA already, or the model has no more space
for subscription addresses.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
With new event 'pull_request_target' it is now possible to run the
backporting action that we used to have in the past as a Github app.
Use labels for backporting as before.
See https://github.com/tibdex/backport for more details.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The original configuration mentioned, quote;
/* SPI1_SCK should output on PA5, but is used for LD2 */
But according the the schematic MB1312 from 7-11-2019
LD2 is on pin PB6 or PB7 (jumper selectable). And PA5
shares LD1 with PC7, but the default jumper settings
are that PC7 controls the LD1, and PA5 is not connected
to anything but the extension header.
Also the DTS file already has the green_led_0 (LD1) on
pin PC7, and blue_led_0 (LD2) on pin PB7.
So changed pinmux to set PA5 to SPI1 SCK to make
Arduino shields work that need SPI1.
Signed-off-by: Erwin Rol <erwin@erwinrol.com>
Not possible to use device_get_binding() because we are
currently initializing DMA_1 device, so it is not ready and
device_get_binding() will fail.
Directly use string compare is more efficient.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
Pins used for external LF clock source must be configured as
used by peripheral to allow using LFXO on network side.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Reimplement getaddrinfo to call SlNetUtil_getAddrInfo from the TI HAL
for a more robust implementation that supports both client and server
modes, and performs better error-checking.
Fixes#11890
Signed-off-by: Vincent Wan <vwan@ti.com>
Fixes: #27288
The Zephyr CMake function `zephyr_code_relocate()` would treat any file
argument as relative to `CMAKE_CURRENT_SOURCE_DIR` even if an absolute
path is provided.
A file with absolute path would thus become
`${CMAKE_CURRENT_SOURCE_DIR}/<absolute-path>/<file>` which leads to a
non existing file.
This is fixed by checking if path argument is a relative path, and only
use `CMAKE_CURRENT_SOURCE_DIR` in such case.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The CANopenNode stack function CO_delete() takes a void
*CANdriverState argument. This maps to a pointer to a struct
canopen_context in Zephyr.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Multiple calls of z_free_fd against fd with refcount equal 0 are causing
descriptor table entry leak by decrementing refcount below 0.
This patch prevents decrementing refcount below zero.
Signed-off-by: Grzegorz Kostka <grzegorz@mobility.cloud>
Fixes#28275 by adding bluetooth HCI spi driver priority lower
(75 instead of 50) than SPI (70) to avoid device_get_binding
to return NULL because the device was not initialized.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
Change #28199 introduced systick configuration from device tree.
For now this should not be used on platforms that support alternate
tick source, as this is the case on l4 and wb series with LPTIM.
Until dts allows to configure lptim from dts, keep systick disabled
by default on these platforms.
Fixes#28280
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Adds a troubleshooting section to the mimxrt10{50,60}_evk board
documents that describes how to recover when the boot header in external
flash is corrupted or invalid.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Zephyr does not use CFLAGS, CXXFLAGS, CPPFLAGS if they are defined in
the environment but provides the option to pass them via extra cmake
flags.
The option is also for seen to pass AFLAGS and LDFLAGS as extra cmake
flags but both of them are not ignored if they are defined in the
environment which could lead to unexpected behaviour.
As such lineup the behaviour between all the flags and ignore them, and
generate a warning, if they are defined in the environment.
Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
Work around an issue where the emulator ignores host OS
signals when inside a `wfi` instruction.
This should be reverted once this has been addressed in the
AARCH64 build of QEMU in the SDK.
See https://github.com/zephyrproject-rtos/sdk-ng/issues/255
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Added test which verifies various modes of waiting for system clock
(no wait, available, stable) for different clock configurations (xtal,
rc, synth).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Enabled going to idle when waiting for low frequency clock.
Added 2 stages of starting LF clock when XTAL is used. First
stage is starting RC and then when it is ready XTAL is started.
It is done to get event/interrupt when RC is ready which means
that LF clock is available (but not stable).
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Added configuration for approach to starting system clock source.
There are 3 options: no wait, wait untill available, wait until
stable.
Added support for those modes in clock control driver which handles
low frequency source clock.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Fixes: #23825
Today, BOARD, SOC, ARCH, DTS, KCONFIG, and TOOLCHAIN_ROOT can be
specified by users or through other CMake files.
It is not clear if relative paths are permitted and/or from where a
relative path is constructed.
Inside CMake, it is very easy to specify `${ZEPHYR_BASE}`,
`${CMAKE_CURRENT_SOURCE_DIR}`, or similar, thus there is no reason to
use relative path inside CMake, as it easy can lead to discussion on
relative to what.
For users manually invoking CMake using, `cmake ... <app-dir>` it is
nice to have to possibility to specify a relative path.
For this purpose, relative path are considered relative to the
`APPLICATION_SOURCE_DIR`.
This commit updates:
- BOARD_ROOT
- SOC_ROOT
- ARCH_ROOT
- DTS_ROOT
- KCONFIG_ROOT
- TOOLCHAIN_ROOT
to allow paths relative to `APPLICATION_SOURCE_DIR` when specified with
`-D<type>_ROOT=<relative-path>`
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Fixes: #23825
This commit introduces a `zephyr_file()` extension command that allows
for examine a path list for relative paths, and convert relative paths
provided with `-D<path>` into absolute paths, starting from
`APPLICATION_SOURCE_DIR`.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
The default value of clean_session flag was made configurable in
commit 0fd16f8b78 but the docstring was
not updated.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The driver is able to write with 32-bits word alignment of size
and offset, apart form sub-word writes for which it can write
part of word to aligned offset (which is a hack).
fixes#26729
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Because the previous commit fixed the destination address check,
we need to handle msghdr (used by sendmsg()) in CAN socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
No need to specifically check CAN sockets here. This also means
that SocketCAN will need to support sendmsg() call too. This will
come in following commit.
Fixes#28229
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The vararg extraction for unmodified integers always used int, which
sign extends when assigned to the printk_val_t. Avoid the sign
extension for unsigned values.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Telling that all the driver supports unaligned writes was and
is not true. Drivers only have to support any source buffer.
This fix message introduced by #23628
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add back call to LE Write Suggested Default Data Length
command so that new connections, receiving Data Length
Update procedure before local device can auto initiate, can
respond with the suggested default data length Tx octets
and Tx time.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When controller is built with extended advertising support but without
LL Privacy build fails due to issue with code that sets TxAdd in aux
PDU:
.../ll_sw/ull_adv_aux.c: In function 'ull_adv_aux_hdr_set_clear':
.../ll_sw/ull_adv_aux.c:502:25: error: 'struct ll_adv_set' has no
member named 'own_addr_type'
502 | sec_pdu->tx_addr = adv->own_addr_type & 0x1;
|
We need own_addr_type value if an advertising set with aux but without
AD is created since we cannot get TxAdd value from other PDU.
ull_adv_aux_hdr_set_clear() can now be called with a flag to explicitly
set AdvA field and pass own_addr_type in 'value' parameter. This allows
to set proper TxAdd when creating new advertising set.
On aux updates, we use TxAdd from other PDU:
- if primary PDU has AdvA, we use TxAdd from that PDU
- if previous secundary PDU has AdvA, we use TxAdd from that PDU
In other case we just return an unpsecified error since this should not
happen in any valid scenario.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Fixes: #28230
The introduction of CMake SHELL prefix in compile options to avoid
symbol de-duplication caused the build flag export feature to fail.
The export itself works, but unfortunately CMake only strips `SHELL`
prefix for its own compiler invocation, and not when exporting the build
flags.
This causes `SHELL` to be present in the Makefile.exports.<language>
files, leading to problems in external build systems.
This is fixed by using `zephyr_get_compile_options_for_lang()` that
strips `SHELL` and use the returned value for the export handling.
To ensure all compile options has been defined, then the inclusion of
`cmake/makefile_exports` has been moved to the end of
`zephyr/CMakeLists.txt` file.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Use setting from devicetree to drive the default setting for
CORTEX_M_SYSTICK. We update the dts files to default systick to be
enabled since the major of cortex-m platforms utilize it by default
(except on Nordic SoCs, TI CC13x2/CC26x2 and MEC1501 in which we
default to disabled).
Fixes#25299
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
tests/lib/cmsis_dsp/transform/ with config:
* libraries.cmsis_dsp.transform.cf64
96k is sufficient if tests steps are reordered
(decreasing malloc size)
Tested on nucleo_l476rg
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
tests/lib/cmsis_dsp/transform/ with config:
* libraries.cmsis_dsp.transform.cf64
Needs more than 64k RAM.
Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
When try to enable CONFIG_DEVICE_POWER_MANAGEMENT for a board,
the #error directive in subsys/power/device.c requires that
"MAX_PM_DEVICE" and "core_devices[]" must be defined exactly in that
file, or a compile error will come up.
For flexibility, this patch move "PM_MAX_DEVICE" to Kconfig and define
a weak version of "z_mp_core_devices[]", so any board or SOC can define
these varibles in their own module.
Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
HW Stack protection is required to successfully run the
stack overflow-related tests, so guard all these tests
inside #ifdef CONFIG_HW_STACK_PROTECTION. Otherwise this
test-suite fails for platforms that implement USERSPACE
but do not have HW_STACK_PROTECTION capability.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
When _arch_switch() API is used, the tracing of the thread swapped out
is done in the C kernel code (in do_swap() for cooperative scheduling
and in set_current() during preemption). In the assembly code we only
have to trace the thread when swapped in.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This adds an app which utilizes common kernel functions as a
starting point to gauge kernel footprint.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>