Commit graph

97527 commits

Author SHA1 Message Date
Björn Stenberg
1e3fd5361f modbus_serial: Disable rx interrupt if buffer fills up
Disable rx interrupt if the buffer fills up so that rtu_timer can fire and
process the buffer.

Signed-off-by: Björn Stenberg <bjorn@haxx.se>
2024-06-13 16:48:05 -04:00
Hess Nathan
f3679ab2c2 coding guidelines: comply with MISRA Rule 7.4
avoided to assign string literals to non-const char *

Signed-off-by: Hess Nathan <nhess@baumer.com>
2024-06-13 16:47:41 -04:00
Johann Fischer
0dc1414237 samples: usb: remove hid-cdc sample
We have some other simpler CDC ACM and HID samples in the tree.
Providing multiple functions is a core functionality of USB device
support, and we have other samples to demonstrate this as well. This
sample does not really provide anything unique, but has a few issues
such as unsafe HID buffer handling and calling uart_fifo_fill() outside
of the UART driver's IRQ context.
Remove the hid-cdc sample, as there is no value in this sample, and to
avoid spending time fixing and cleaning up the code.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-06-13 16:47:22 -04:00
Marek Matej
51e5f2d3e5 soc: espressif: esp32c3: reorder ROM sections
This covers the cases described in common-rom-common-kernel-devices.ld
Changing the order of .rodata and .text we prevents to create an
overlapped segments issue.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:47:05 -04:00
Marek Matej
7bf47f8e8f soc: espressif: esp32c3: improve memory utilization
Change the MCUboot segments layout to incread the memory
available in the application.
Add missing symbols to mcuboot.ld

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:47:05 -04:00
Yong Cong Sin
b98a60773b shell: kernel: add command to unwind a thread
Add a shell command to unwind a thread using its thread id.

uart:~$ kernel threads
Scheduler: 11 since last call
Threads:
*0x80017138 shell_uart
        options: 0x0, priority: 14 timeout: 0
        state: queued, entry: 0x800029ac
        stack size 3072, unused 1316, usage 1756 / 3072 (57 %)

 0x80017ca8 sysworkq
        options: 0x1, priority: -1 timeout: 0
        state: pending, entry: 0x80006842
        stack size 1024, unused 644, usage 380 / 1024 (37 %)

 0x800177e0 idle
        options: 0x1, priority: 15 timeout: 0
        state: , entry: 0x800065ae
        stack size 512, unused 180, usage 332 / 512 (64 %)

 0x80017950 main
        options: 0x1, priority: 0 timeout: 13
        state: suspended, entry: 0x80006326
        stack size 4096, unused 3604, usage 492 / 4096 (12 %)

uart:~$ kernel unwind 0x80017ca8
Unwinding 0x80017ca8 sysworkq
ra: 0x80007114 [z_swap+0x58]
ra: 0x80007ae8 [z_sched_wait+0x10]
ra: 0x8000689a [work_queue_main+0x58]
ra: 0x800006de [z_thread_entry+0x2e]

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
61a0f9f1c0 arch: riscv: stop printing symbol name at mepc
Now that the unwind starts from mepc already, the symbol
name at the mepc reg is kinda redundant, so just remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
726fefd12c arch: riscv: stacktrace: implement arch_stack_walk()
Created the `arch_stack_walk()` function out from the original
`z_riscv_unwind_stack()`, it's been updated to support
unwinding any thread.

Updated the stack_unwind test case accordingly.

Increased the delay in `test_fatal_on_smp`, to wait
for the the fatal thread to be terminated, as stacktrace can
take a bit more time.

Doubled the kernel/smp testcase timeout from 60 (default) to
120s, as some of the tests can take a little bit more than 60s
to finish.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Yong Cong Sin
5121de6e73 arch: introduce arch_stack_walk()
An architecture can indicate that it has an implementation for
the `arch_stack_walk()` function by selecting
`ARCH_HAS_STACKWALK`.

Set the default value of `EXCEPTION_STACK_TRACE_MAX_FRAMES` to
`ARCH_STACKWALK_MAX_FRAMES` if the latter is available.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-06-13 16:46:48 -04:00
Maciej Perkowski
3137829e72 boards: nrf: Update nrf54h and nrf54l yamls to use sysbuild in twister
Nrf54h's and nrf54l's targets are the first targets complex enough
that a sysbuild must be used on every build for them. This information
is reflected in their yamls. These entries tell twister to always use
sysbuild for those targets.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-13 16:46:25 -04:00
Maciej Perkowski
da1066fa4b twister: Add sysbuild boolean to platform definitions
More complex platforms require sysbuild to use always, even for
such "simple" samples like hello_world. Such platforms can have
`sysbuild: true` entry in their board_name.yaml used by twister.
Using such entry will tell twister, that sysbuild must always be used
on a given platform.
Twister is aligned to have information about need of sysbuild at
instance (platform + suite) level (was only at suite level before).
Instance.sysbuild is true whenever a test suite or a platform requires
sysbuild.
Twister pytest unit tests are aligned with changes.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2024-06-13 16:46:25 -04:00
Declan Snyder
e902a08832 boards: frdm_rw612: Simple enablements collection
A collection of simple enablements to match some of the enablement
done for rd_rw612_bga as closely as possible on the frdm_rw612 board.

- i2c
- spi
- dma
- mrt
- ctimer
- os timer
- dac
- adc
- trng (alread was enabled but now listed support)
- watchdog

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-13 16:44:12 -04:00
Bjarki Arge Andreasen
5c24c79a90 modem: pipe: simplify synchronization
The design of the pipe is overly complicated compared to the
in-tree and planned future use of the pipe module.

The pipe is currently designed to protect against multiple
threads calling any API simultaineously. This is not neccesary
as only one thread ever calls open/close/transmit/receive at
once, while the notification APIs are potentially called by a
different thread.

This commit removes the synchronization of calls to the open/
close/receive/transmit APIs. It also uses a k_event for thread
safe event and state handling instead of a k_mutex and k_condvar.

The callback is proteced by a k_sem as it modified using the
attach/release APIs, which can be called simultaneously to a
thread invoking the callback.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-06-13 16:43:49 -04:00
Luca Burelli
87e1ab83c9 llext: tests: fix "mps2/an385/*_mpu" OOM
With the ztest code added, tests were failing with -ENOMEM on the
mps2/an385/*_mpu platform due to alignment requirements.

Increase the llext test heap size to 32Kbytes to avoid this.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Luca Burelli
d25563f59a llext: tests: re-initialize variables
Some tests depend on global initialized variables, which are then
modified during the test. When enabling user mode, the functions are
called multiple times but the variables are not reinitialized, resulting
in a test failure.

This patch adds a run_id variable to the tests to reinitialize the
variables when the test is called multiple times. It is purposefully
initialized to 41 at startup to detect if the variable is not set up
properly by the llext loader.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Luca Burelli
42a0d18ecf llext: tests: add zassert macros everywhere
Most of the current llext tests did not actually check the results of
the tests, so the CI reported a pass even if something was wrong when
looking at the logs. This patch adds the appropriate zassert_* macros to
all the tests, to ensure that they actually perform correctly.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-06-13 16:43:26 -04:00
Marek Matej
0153b34c4c manifest: hal_espressif update
Update the hal_espressif to include latest esptool version.
Improve support for new SoCs as such as ESP32-C6.
Fix bugs related to segment alignment.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2024-06-13 16:43:07 -04:00
Aksel Skauge Mellbye
2a4417bb8e soc: silabs: Fix CMake test for soc family
Kconfig options need CONFIG_ prefix when tested for in CMakeLists.txt.

Fixes regression introduced in e90c89d453
that causes all apps to fail to initialize on Silabs socs.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-13 16:42:50 -04:00
Benjamin Cabé
94ded47fa7 drivers: crypto: make driver API and conf structs const
Save precious RAM by making sure driver API and config structs are
declared as const

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-13 16:42:35 -04:00
David Schneider
0e830b3f10 doc: kernel: fix braces in code example
Add missing closing brace to `k_poll()` loop example.

Signed-off-by: David Schneider <david.schneider@chargepoint.com>
2024-06-13 16:42:04 -04:00
Phi Bang Nguyen
e2cdd92a52 boards: nxp: mimxrt1064: Remove display chosen node
As display stuffs have been moved to a shield, the display chosen node
must be removed as well as chosen node requires the node to be enabled.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-13 11:11:59 -05:00
Nikodem Kastelik
d67abdd02a tests: boards: nrf: add tests for dmm component
Added tests verify output and input buffers allocation
using dmm component.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Nikodem Kastelik
37e511bcbf soc: nordic: add dmm component
DMM stands for Device Memory Management and its role is to streamline
the process of allocating DMA buffer in correct memory region
and managing the data cache.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Nikodem Kastelik
ea361f095c boards: nordic: nrf54h20dk: add DMA attribute to RAM21 & RAM3x
This attribute denotes that DMA operation
can be performed from a given region.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-06-13 12:02:33 -04:00
Tomasz Moń
6d5edf9255 tests: usb: fix build all test on qemu_cortex_m3
Reduce RAM disk size from 192 sectors down to 1 sector to solve linking
issue due to qemu_cortex_m3 target having too little RAM. The RAM disk
size does not really matter in this test case and should be as small as
possible.

Enable test random generator to solve missing sys_rand_get() required by
networking subsystem.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-06-13 12:01:31 -04:00
Vinayak Kariappa Chettimada
a568acbfea Bluetooth: Controller: Fix regression due to use of TMR_START_DELAY_US
Fix regression due to use of HAL_RADIO_TMR_START_DELAY_US
introduced in commit 11bae5cfa9 ("Bluetooth: Controller:
Fix missing radio timer comp and range delay").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-06-13 12:01:22 -04:00
Mark Wang
1fabbe01f5 samples: usb: enable next usb device stack samples on NXP platforms
enable next usb device stack samples (cdc_acm, mass and shell)
on rt685 and mimxrt1060_evk

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
0c70a72ac7 boards: nxp: enable mcux udc on lpc55s69, rt1060 and rt685
set DT node as Okay in board device tree;
add board level's d-cal, txcal45dp and txcal45dm to usbphy node;
enable usb clock; set USB_STACK_USE_DEDICATED_RAM for lpc55s69 and rt685;
load usb.ld for lpc55s69 and rt685.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
b6b43c3ed7 drivers: udc: implement udc_mcux_ehci and udc_mcux_ip3511
udc_mcux_ehci is based on the MCUX USB controller driver
(usb_device_ehci.c); udc_mcux_ip3511 is based on the
MCUX USB controller driver (usb_device_lpcip3511.c);
add related Kconfig and CMake; include the usb_phy.h path in
modules/hal_nxp/usb/CMakeLists.txt because udc_mcux.c use it;
add related macros to usb_device_config.h;
update CMakeLists for udc_mcux_ehci and udc_mcux_ip3511.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Mark Wang
a4e411bd13 dts: arm: nxp: enable udc DT on lpc55s69, rt1060 and rt685
define usbphy in DT and controller DT node ref to usbphy node.
define the usbphy yaml and update ehci and ip3511 yaml for usbphy.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-06-13 17:59:31 +02:00
Jonathon Penix
97a734aa01 cmake: llvm: arm64: Set arm64 flags when building with clang
Ensure --target and -mcpu/-mfpu/-mtune are set appropriately when building
with clang targeting arm64/aarch64.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-13 17:58:04 +02:00
Jonathon Penix
fb98adc323 kconfig: llvm: arm64: Advertise TLS support when using llvm for arm64
clang and lld both support TLS for arm64/aarch64, so advertise this
support in Kconfig.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-06-13 17:58:04 +02:00
Luis Ubieda
253de6c7a2 samples: shell: shell_module: Add README
With basic description of registering different types of Shell commands.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Luis Ubieda
18b19150af doc: shell: Add section for commonly-used commands
With details on how to enable them.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Luis Ubieda
b831543137 doc: shell: Changes to restructure Backends documentation
- Unify shell backends in a dedicated section.
- Add documentation for the following backends: USB, BLE, RTT.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-06-13 17:57:36 +02:00
Emil Gydesen
e5df99082b MAINTAINERS: Add BT CAP samples to LE audio group
Add the CAP initiator and acceptor samples to the files
for Bluetooth Audio.

This will also automatically support a future
CAP Commander sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
c07a87abbb tests: Bluetooth: Audio: Add BSIM test of the CAP samples
Adds babblesim tests of the CAP Acceptor and the CAP Initiator
samples for unicast.

This simply checks if at least one stream is connected
and is sending (empty) data.

This modifies the samples to send data as well as counting the
receive ISO data packets.
Ideally the TX would be superflous to verify that ISO is working,
but a missing feature in the Zephyr LL makes it a requirement.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
daf7d8066a Samples: Bluetooth: Add CAP acceptor unicast sample
Adds a CAP acceptor unicast sample that simply
uses the CAP acceptor implementation to setup
streams with a CAP initiator.

To keep it simple no audio or encoding support
has been added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Emil Gydesen
a712315793 Samples: Bluetooth: Add CAP initiator unicast sample
Adds a CAP initiator unicast sample that simply
uses the CAP initiator unicast API to setup
streams with a CAP acceptor.

To keep it simple no audio or encoding support
has been added.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-13 17:56:58 +02:00
Jeronimo Agullo
436f56646b boards: sparkfun: Add micromod nrf52840 board and asset tracker shield
Initial support of Sparkfun Micromod ecosystem with micromod nrf52840
board, asset tracker shield and micromod header definition.

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-06-13 17:55:42 +02:00
Frederic Pillon
b7b7ce08cf board: st: enhance zephyr console support
Use Kconfig to properly select console interface.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2024-06-13 17:54:18 +02:00
Ping Wang
57be858846 Bluetooth: audio: BAP Broadcast Assistant support for multiple connections
The current implementation of the BAP Broadcast Assistant only supports a
single connection. This PR makes broadcast assistant support multiple BAP
scan delegators.

Fixes: #67523

Signed-off-by: Ping Wang <pinw@demant.com>
2024-06-13 17:53:47 +02:00
Jamie McCrae
c0c51a8d40 scripts: west: flash: Fix issue with loading outdated domain file
Fixes an issue whereby the domains file in sysbuild projects
would be loaded and used with outdated information if sysbuild
configuration was changed then west flash was ran directly after
it

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-06-13 17:53:00 +02:00
Ciprian Regus
9b2a8574ea boards: adi: Add AD-APARD32690-SL
Add board support for the ADI AD-APARD32690-SL. The platform is based on
a MAX32690 microcontroller, it has an Arduino-Mega compatible header and
2 PMOD connectors. Also, a 10 Mbps single-pair Ethernet link is enabled
by using the ADIN1110 10BASE-T1L MAC/PHY.

Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
2024-06-13 17:52:37 +02:00
Maureen Helm
595fdb6089 drivers: serial: Set default baud rate and data bits in max32 driver
The uart-controller devicetree binding declares current-speed and
data-bits properties as optional, but the max32 uart driver failed to
build if they weren't defined. Fix the driver by falling back to
commonly used values for these properties.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-06-13 17:52:37 +02:00
Alberto Escolar Piedras
c11fccdadd tests/bsim/run_parallel: Avoid escape sequences in xml
Let's filter out escape sequences from the tests
output (for ex. color escapes) as those corrupt
the xml.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
1a67e910b8 tests/bsim: Test also nrf54l15bsim
Also run the multiple_id test on the nrf54l15bsim target
to validate the controller when running on this
platform which has both a different RADIO and other
peripherals.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
0209fa4196 ci: bsim tests: Move CI steps to separate scripts
So they can be easily run locally by users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
c734f11abc ci: bsim tests: Merge and publish results as in twister flow
Let's merge the results and publish them as in the
twister workflow.
It is nicer to not select files by hand and produces
a nicer report.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00
Alberto Escolar Piedras
1236269bbb tests/bsim/run_parallel.sh: Move filter to one place
Move the shell script filter to a single place,
and ignore also files starting with "ci."

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-06-13 17:52:03 +02:00