Commit graph

100779 commits

Author SHA1 Message Date
Arkadiusz Cholewinski
3580d8b6d6 tests: ztest: Add ztest param test.
Introduces the test for testing the new functionality
of ztest shell.

Passing -r (repeat iter) parameter. This allows to run
a particula testcase or testsuite several times.
Passing -p (any value) parameter. This allows to provide
a parameter to a test at runtime.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Arkadiusz Cholewinski
f58a4c4b1c ztest: expand ztest functionality.
Expanding the ZTEST shell to include a command that
accepts additional parameters, such as ztest run_testcase
<suite:test> -p any_value.

Adding the new ZTEST_P macro, to create the
parameterized test.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Arkadiusz Cholewinski
6d5243cbed ztest: expand ztest_shell command
Expand ztest_shell subcommands `run-testcase`
and `run-testsuite` to include additional parameter `-r`
repeat-iter. This allows to run a particular testcase or
testsuite several times.

Signed-off-by: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com>
2024-08-23 15:48:57 +01:00
Chris Friedt
db44b1306f doc: posix: mark posix signals supported with undefined behaviour
Mark the POSIX_SIGNALS Option Group as supported to the extent
possible under Zephyr, as Zephyr does not yet support processes.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
87062af85b tests: posix: headers: add checks for posix signals option group
Add tests for the presence of items in the POSIX SIGNALS Option
Group.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
1593954083 posix: add stubs for signal.h functions that need process support
Since Zephyr itself does not currently support processes, but
conformant applications should still be able to link, add stubs
for the remaining POSIX functions in the POSIX_SIGNALS Option
Group.

The POSIX_SIGNALS Option Group is required for PSE51, PSE52,
PSE53, PSE54, and likely many other POSIX Subprofiles.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Chris Friedt
b71062e9f8 posix: procN: add missing alias for getpid()
Newlib requires an alias for the getpid() function. There was
a Kconfig already present for doing so, but the actual alias
was missing.

So this is technically a bugfix.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-08-23 10:35:11 -04:00
Xiaolu Sun
45705a84ab logging: fix log buffer pending while it is definitely full
The buffer flags MPSC_PBUF_FULL is a shared resource to determine
whether the buffer is available. When processing drop messages,
the flag will be cleared first and then set, add spin lock protection.

Signed-off-by: Xiaolu Sun <xiaolu.sun@intel.com>
2024-08-23 08:04:18 -04:00
Sylvio Alves
f94053410c MAINTAINERS: Add Espressif collaborators
Add raffarost and wmrsouza as collaborators on Espressif area.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-08-23 08:03:28 -04:00
Jordan Yates
18a964faaa i2c: nrfx_twi: fix RTIO utility functions
Route `configure` and `recover_bus` through the RTIO framework to avoid
race conditions. Update `RTIO_OP_I2C_RECOVER` implementation to actually
recover the bus, instead of triggering a loop.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-23 08:02:45 -04:00
Aiman Mazlan
0d796ee286 drivers: sensor: st: vl53l1x: add return to attr_set and attr_get
Incorrect value set by user when using sensor_attr_set can fail silently
since it always returns 0.
Fix by adding ret. Also added return on sensor_attr_get.

Signed-off-by: Aiman Mazlan <mohammad.aiman@stratusauto.com>
2024-08-23 08:02:23 -04:00
Torsten Rasmussen
3382e28737 tests: cmake: add test cases for CMake YAML module
This commit provides a basic set of tests for Zephyr's CMake YAML
module.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Torsten Rasmussen
105a4b5eb2 cmake: initial version of a CMake yaml module
Initial CMake yaml module to facilitate reading yaml files into CMake,
update yaml settings and write it back to a file.

The yaml module also supports creation of yaml files from scratch.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Torsten Rasmussen
9da2766846 cmake: add check_arguments_... macro to facilitate function writing
Add a new zephyr_check_arguments_required_allow_empty() macro for
function argument validation.

Zephyr already has a zephyr_check_arguments_required() for checking
required arguments, like
zephyr_check_arguments_required(foo_func <prefix> FOO BAR)
which ensures that one of FOO or BAR are given in a call like:
foo_func(BAR val)

One limitation however, is that is some cases BAR may be allowed to be
empty, so that it's still possible to know if FOO or BAR were supplied.
In most case, BAR and FOO will have values following the keyword, like:
foo_func(BAR my_bar_val)
foo_func(FOO my_foo_val)

but in cases where `my_bar_val` is a variable which may be empty, like:
set(my_bar_val)
foo_func(BAR ${my_bar_val}) # (expands to: foo_func(BAR)

then BAR was actually supplied.
To support functions where such empty expansion is allowed, then a new
helper macro `zephyr_check_arguments_required_allow_empty()` has been
implemented, as to be able to distinguish `foo_func()` from
`foo_func(BAR)` when parsing arguments.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-08-23 08:02:11 -04:00
Laurentiu Mihalcea
2a6f151524 firmware: scmi: transport.h: switch to including kernel.h
Toggling `CONFIG_USERSPACE` to `y` results in compilation
errors caused by the fact that various k_* functions don't
have their prototypes included in the SCMI sources (e.g:
`k_mutex_*`, `k_sem_*`, `k_is_pre_kernel()`).

To fix this, switch to using the `kernel.h` header instead
of `sys/mutex.h`. Previously, this worked because `sys/mutex.h`
included `kernel.h` if `CONFIG_USERSPACE` was set to `n`.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-23 08:01:51 -04:00
Rubin Gerritsen
d82424ba36 tests: bluetooth: hci_uart_async: Set thread name after creation
When running on native_posix, the thread needs to be created
before the thread name can be set.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Rubin Gerritsen
fb745f610f arch posix: Implement arch_thread_name_set()
This will update the posix thread names to match
the zephyr thread names.

This will simplify debugging as the debugger will
recognize the thread names.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Rubin Gerritsen
98a16b424a kernel: Define optional arch_thread_name_set()
The intention of this API is to allow setting the posix thread
name equal to the zephyr thread name.
By defining it as an arch interface, the implementation becomes
generic.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-08-23 08:01:33 -04:00
Anthony Giardina
8a4b3a4b61 xtensa: include xtensa-types.h for xt-clang
Newer Xtensa toolchain needs to include xtensa-types.h so that
macros in tie.h can be used without compilation errors.
The exact verison needing this is unknown but first encountered
in RJ-2023.2. Tested with older toolchain and that did not
cause any compilation errors so just include xtensa-types.h
if xt-clang is used. Haven't seen newer toolchains being
generated with xcc, so skip that for now.

Note that Zephyr SDK and the public HAL in Zephyr do not provide
this file.

Signed-off-by: Anthony Giardina <anthony.giardina@intel.com>
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-23 09:54:56 +02:00
Yuval Peress
bfb893a0c5 gtest: Add support for gtest 1.15.0
The gtest 1.15 has slightly different output from the original one that
was used to set up the harness. With this change we support both output
formats.

Fixes #72318

Signed-off-by: Yuval Peress <peress@google.com>
2024-08-23 09:54:41 +02:00
Maureen Helm
e49cca2cc3 drivers: sensor: Fix adxl345 sample fetch return value
Fixes the adxl345 accelerometer driver to return zero on sample fetch
success, as specified by the sensor driver API. Prior to this change,
the driver incorrectly returned a positive non-zero value on sample
fetch success, which in turn caused a bus fault getting data with the
sensor shell.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2024-08-23 09:53:28 +02:00
Junho Lee
0f7f6edcf6 Bluetooth: Mesh: Fix uninitialized field when cancelling transfer blob
Initialize the missing chunk field when canceling a BLOB Transfer.
If you canceled a BLOB Transfer, the missing_chunk was not cleared in
the next BLOB Transfer. This can make it look like there are still
missing chunks, even though all chunks in the block have already been
received, and it does cause bugs.

Signed-off-by: Junho Lee <tot0roprog@gmail.com>
2024-08-23 09:53:09 +02:00
Anders Bjørn Nedergaard
29dc419ad2 soc: rt11xx: Fix dual core ENET PLL
IMXRT11XX secondary core should not deinit ENET PLL
as it could be configured by primary core.

Signed-off-by: Anders Bjørn Nedergaard <abn@polytech.com>
2024-08-23 09:52:28 +02:00
Hake Huang
282dc966fd boards: frdm_rw612: support latest linkserver
latest linkserver 1.6.123 use RW612:FRDM-RW612

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-08-23 09:52:12 +02:00
Karthikeyan Krishnasamy
14b3293d94 doc: posix: mark rmdir and remove as supported
Mark POSIX API rmdir and remove as supported in
POSIX options group Documentation

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
c044f0c89d tests: lib: c_lib: add test suite for remove api
Add test suite for remove of zephyr native libc

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
abf62699cb lib: libc: stdio: add support remove api
Implement remove api to zephyr's native c library

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
e8ab88bd15 tests: posix: fs: add test suite for rmdir
add test suite for POSIX API rmdir

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Karthikeyan Krishnasamy
f616c43c9e lib: posix: fs: add rmdir support
Implementation of rmdir, Posix style file
system API to remove directory

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-08-22 14:26:00 -04:00
Raffael Rostagno
90c6106926 drivers: esp32: Interrupts flags configuration
Allows configuring interrupts flags in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
bb746cdcc5 drivers: esp32: esp_intr_alloc return condition
Add checks to return value of esp_intr_alloc to avoid drivers init
returning 0 when interrupt allocation fails.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
0b3a34cdca drivers: esp32: Interrupts priority configuration
Allows configuring interrupts priority in the device tree for
ESP32 devices.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
4fc8033d88 soc: mp: esp32: Added IRQ priority and flags config
Interrupt priority and flags config for crosscore ISR
sourced from device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
3169095e57 drivers: intc: esp32: Macros for DT input validation
Adding macros to convert and validate input config from device tree
for IRQ priority and flags.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
dfbcb9dd60 dts: irq: esp32: Added priority and flags to device tree
Added IRQ priority and flags configuration to device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Raffael Rostagno
f783dec97c bindings: intc: esp32: Added symbols in DT
Added symbols for IRQ priority and flags configuration
in the device tree.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-22 14:25:25 -04:00
Mathieu Choplain
eaa799a9b5 tests: dma/chan_blen_transfer: move buffer to DMA-accessible memory
This commit moves the test buffer from ITCM (not accessible by DMA) to DTCM
on several NXP boards, to make the test successful.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Mathieu Choplain
3099491f3e tests: dma/chan_blen_transfer: relocate TX and RX buffers
This commit places the chan_blen_transfer DMA test's TX and RX buffers
in a separate file that gets entirely relocated. This ensures that the
buffers reside in the correct memory, without breaking other things
due to relocation of test data/code.

Fixes #75676.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-08-22 14:25:10 -04:00
Duy Phuong Hoang. Nguyen
b9f31c0e40 drivers: entropy: Initial support for trng driver of RA8
Initial commit for entropy support on RA8
- drivers: entropy: implementation for TRNG driver of RA8x1
- dts: arm: add device node for trng of RA8x1
- boards: arm: enable support zephyr_entropy for ek_ra8m1 and
update board documentation

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
Signed-off-by: Duy Phuong Hoang. Nguyen <duy.nguyen.xa@renesas.com>
2024-08-22 14:24:57 -04:00
Emanuele Di Santo
b41054340d tests: arch: arm: arm_irq_vector_table: fix compilation for nRF9280
Fix compilation for nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9e1862ff66 tests: drivers: watchdog: wdt_basic_api: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
9dcb3cc189 tests: drivers: watchdog: wdt_error_cases: fix compilation for nRF9280
Fix compilation by defining the watchdog flags for nRF9280 as well.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Andreas Moltumyr
9f90a3d1ad tests: drivers: adc: fix compilation for nRF9280
Fix compilation by providing an overlay file for cpuapp.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
a33b0887d0 tests: lib: cpp: cxx: add nRF9280 to exclusion list
Nordic HAL is not compatible with C++98.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
d1e9ddfa01 samples: drivers: watchdog: add overlay file for nRF9280 cpuapp
Add an overlay to enable compilation.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Andreas Moltumyr
2f1a5ce104 drivers: adc: nrf: Update adc driver to support nRF9280
Expands driver to support nRF9280 similar to nRF54H20 device.

Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
8894559720 modules: hal_nordic: nrf: add nRF9280 support
Enable NRFS support for nRF9280, including DVFS.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
f156dd7d0c boards: nordic: add initial support for nRF9280 PDK
Add board support for Application, Radio and PPR cores
of the nRF9230 SoC / nRF9280 SiP on the nRF9280 PDK board.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
Co-authored-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
b511704dd8 scripts: west: runners: add initial nRF92 support
Add initial support flashing and erasing the application and
radio cores of the nRF9280.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00
Emanuele Di Santo
c0410e1a22 drivers: serial: nrf: disable legacy shim for nRF92
Disable the legacy shim due to DPPI support currently missing.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
2024-08-22 14:24:38 -04:00