Commit Graph

87771 Commits

Author SHA1 Message Date
Alberto Escolar Piedras 6568825174 tests/crypto/*: Switch from native_posix to native_sim
Enable these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
For drivers.rand32.random_psa_crypto, filter the posix
arch to save some CI time, as TFM is not supported in this
architecture all together.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 70e0d1e04e tests/lib/devicetree: Enable for native_sim
Enable these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 18c71868a5 tests/lib/mpsc_pbuf: Switch to native_sim
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 5f4bd36b98 tests/boards/native*: Moved to native_sim
Moved folder to tests/boards/native_sim from native_posix
(including updating the MAINTAINERS file)
And enable all these tests for native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 3d406a7a56 native_simulator: Get latest from upstream
Align with native_simulator's upstream main
ae241af736d06874ec02deb9aacb79918d745aba

Which includes:
* ae241af native timer_model: Allow calling into get_host_us_time

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 7332eb2ea7 board native_sim/posix: Provide NEVER/NSI_NEVER definitions
Some native_posix specific apps/tests use the macro NEVER
provided it also for native_sim until all have switched
to the new NSI_NEVER.

And ensure NSI_NEVER is also avaiable when building
for native_posix to ease the transition.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 2231c3ab97 tests/subsys/usb/*: Enable for native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 1d64f1b397 tests/subsys/openthread: Enable for native_sim
Enable these test which run in native_posix in native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras e628a5b9d0 tests/subsys/logging/*: Enable for native_sim
For all tests which were enabled for native_posix
enable them also for native_sim.
For those with native_posix as integration_platform,
set native_sim instead.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras aa683e2a8b tests/subsys/logging/log_backend_fs: Simplify and enable for native_sim
* Simplify the test definition by using an EXTRA DTC overlay
  so we don't need one test per board
* Move native_posix overlays to native_sim
* Switch the default integration platform to native_sim
  from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras bf937b0d92 tests/subsys/mgmt/mcumgr/*: Switch to native_sim
Enable all these tests which run in native_posix in native_sim,
For those with native_posix as default test platform,
which it to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras bb090128f6 tests/subsys/mgmt/ec_host_cmd/*: Enable for native_sim
Enable these test which run in native_posix in native_sim,
And set native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras c47702cb7e tests/subsys/shell/shell_flash: Enable for native_sim
Enable this test which runs in native_posix in native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 617616888f tests/subsys/bindesc: Enable for native_sim
Enable these tests which run in native_posix also in native_sim,
And add native_sim as default test platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras 8d6421df04 tests/subsys/emul: Enable for native_sim
Enable this test which runs in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Benjamin Cabé 0bd03239ee MAINTAINERS: clean up POSIX area
Ensure documentation related to POSIX portability matches POSIX area.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 09:23:07 -06:00
Benjamin Cabé c1656a4486 doc: redirects: fix redirect for POSIX portability homepage
Add a proper redirect for pre-3.5.99 POSIX portabiltity home page.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 09:23:07 -06:00
Maciej Baczmanski 38118c24a3 MAINTAINERS: add myself as collaborator for openthread related repos
Add maciejbaczmanski as collaborator for openthread repos.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-11-27 09:20:03 -06:00
cyliang tw c07156ef3c tests: drivers: i2c: i2c_target_api: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-27 14:34:15 +00:00
cyliang tw dfff1107b8 drivers: i2c: support for Nuvoton numaker series
Add Nuvoton numaker series I2C controller feature.
Support dual role and at most one slave at one time

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-27 14:34:15 +00:00
Felipe Neves a97e30a829 boards: arm: arduino_opta_m4: adds initial support
to the arduino_opta PLC on the M4 core.

Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
2023-11-27 14:10:22 +00:00
Christopher Friedt 5bfed9ef6b doc: posix; mark pthread_getconcurrency() supported
Mark pthread_getconcurrency() and pthread_setconcurrency()
as supported in documentation.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt caf72569a9 tests: posix: common: test pthread_getconcurrency()
Add functional tests for pthread_getconcurrency() and
pthread_setconcurrency().

Note: the specification explicitly says

> an implementation can always ignore any calls to
> pthread_setconcurrency() and return a constant for
> pthread_getconcurrency()

The implementation and tests could be up for revision at a future
time when optimizations are considered and there is a better
system in placeo for documenting POSIX options and deviations.

Any such optimizations should be explicitly controlled via
Kconfig.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt c0f2038c26 tests: posix: headers: check for pthread_getconcurrency()
Check for the existence of pthread_getconcurrency() and
pthread_setconcurrency().

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Christopher Friedt e49ae776cc posix: pthread: implement pthread_getconcurrency()
Zephyr must support all functionality of the XSI_THREADS_EXT
subprofiling option group in order to claim it supports that
subprofiling option group.

The XSI_THREADS_EXT option group is critical to be able to
run POSIX threads with statically allocated thread stacks, which
has been a feature of the implementation since it was initially
added.

The pthread_getconcurrency() and pthread_setconcurrency()
functions are the only remaining, unimplemented functions of
the XSI_THREADS_EXT option group.

Implement pthread_getconcurrency() and pthread_setconcurrency()
via the more "posixly correct" interpretation of the
specification.

I.e. as the pthread_t:k_thread relationship is 1:1 and not M:N,
Zephyr does not support multiplexing of user threads on top of
schedulable kernel entities (i.e. "user threads" are directly
mapped to native threads, just like linuxthreads or NPTL are in
Linux).

For that reason, to be "posixly correct", we should save the
provided value via pthread_setconcurrency(), in the absense of
errors, and also return that same value back via
pthread_getconcurrency(), even though that serves zero purpose
in Zephyr for the foreseeable future.

Note: the specification also states
"an implementation can always ignore any calls to
pthread_setconcurrency() and return a constant for
pthread_getconcurrency()."

For that reason, the implementation may be revisited at a later
time when when considering optimizations and when there is a
better system in place for documenting deviations.

Any such optimization should be explicitly controlled via
Kconfig.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-27 08:26:31 -05:00
Yonatan Schachter e3520c6813 dts: rp2040: Fix num-irq-priority-bits
The number of IRQ priority bits was incorrectly set to 3 instead
of 2, which is the correct number for Cortex-M0+.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2023-11-27 12:22:47 +00:00
Bartosz Bilas 0b76b4f016 drivers: mdio: esp32: add dependency of node status
MDIO driver should be available and enabled only when
mdio node has status okay.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-27 12:22:18 +00:00
Bartosz Bilas 08a4829682 drivers: ethernet: esp32: fix Kconfig
Add the missing dependency of the node status value
and enable the driver by default when they are met.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
2023-11-27 12:22:02 +00:00
Andrei Emeltchenko db1c21bfd7 drivers: sensor: adxl367: Add missing breaks
Fix missing breaks errors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-27 12:21:42 +00:00
Kacper Dalach 82d7535b19 dts: st: Add cpu node labels
After porting from h5 to f7 i noticed that not all mcus have
cpu node labels. Added cpu0 node labels to all stm32 dts.

Signed-off-by: Kacper Dalach <dalachowsky@gmail.com>
2023-11-27 12:21:19 +00:00
Alberto Escolar Piedras 8f78b7148c samples/bluetooth: sysbuild: Add Kconfig setting for HCI IPC inclusion
Introduce NET_CORE_IMAGE_HCI_IPC Kconfig setting to control inclusion
of HCI IPC image when building through sysbuild.

This allows users with custom netcore applications to avoid inclusion
of the default HCI IPC image.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:56 +00:00
Johan Hedberg 084b8e4f97 x86: Only enable EFI_CONSOLE if UART console is not enabled
Most x86 build configurations enable the UART console. Since EFI console
has also defaulted to enabled, this means that the EFI covers the early
part of the boot until UART takes over.

This is all fine, except that enabling EFI console has the effect of
disabling PRINTK_SYNC. This in turn has the effect of causing garbled
output over UART, which has led to several bug reports on x86 platforms
(in particular on up_squared).

Since EFI console should really only be used for early platform bringup
and debugging purposes, it's not really ideal to unconditionally have it
enabled by default. Instead, change the default enabling to be
conditional to the UART console being disabled.

Fixes #54861
Fixes #55071

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-11-27 12:19:41 +00:00
Alberto Escolar Piedras 9aafc832a2 tests/misc/check_init_priorities: Fix for native_sim
Fix this test for the native_simulator,
and add it as a default test target.

Also be a bit clearer in stdout about the test having
passed or not.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:03 +00:00
Alberto Escolar Piedras 9bb708eb7d init_priorities: Fix for native_simulator based targets
Fix the init_prioties related cmake targets so they also
work with native_simulator based build targets.
Mostly this consists of pointing to the right file
(final build result instead of intermediate elf library)
and setting the dependency to that final build result.

Note that for the native_simulator based targets
the init priorities check can only be run on build
if we are building the final image (not just a partial
prelinked library),
and we are not assembling several images together
into one executable.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:19:03 +00:00
Francois Ramu c3940cb4f7 Revert "dts: arm: stm32u5 family has a x2 factor on its LPTIM clock"
This reverts commit 823b0e6016.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Francois Ramu f1af7f13eb drivers: timer: stm32 lptimer revert static-prescaler
Revert "drivers: timer: lptim timer clock on stm32u5 has a prescaler"
This reverts commit c14670abea.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Francois Ramu 8146fe4f66 dts: bindings: stm32 lptimer has no divider on the clock source freq
Revert "dts: bindings: LPtimer of stm32 has a x2 factor on its clock"
The stm32u5 lptim clock source has no prescaler to divide the
the LPTIM input clock frequency : no property required.
This reverts commit 572b286010.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-27 12:18:41 +00:00
Bjarki Arge Andreasen bec7789862 tests: modem: backend: uart: Add fixture to test suite
Add fixture to test suite to allow for and signal that the test
must be run on real hardware.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2023-11-27 12:18:19 +00:00
Yong Cong Sin 7ed88f169b drivers: intc: stm32: fix a minor copy paste error
The description of `STM32_EXTI_TRIG_FALLING` got copied into
the `STM32_EXTI_TRIG_BOTH` as well, fix that.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-27 12:18:08 +00:00
Alberto Escolar Piedras cd5f88e8d3 boards native_posix/sim: Define native_posix DTS from native_sim's
Get the native_posix DTS from native_sim instead of
the oposite. As native_sim is now the default test platform.

Note this commit is practically just swapping files.
There is no changes to the DTS content, beyond
changing the board name.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 12:17:57 +00:00
Benjamin Cabé e4993fcc5b drivers: spi: doc: Doxygen cleanup
- Fixed a few improperly formatted struct
- Marked some mask definitions as internal when macros abstracting them
 out already exist
- Fixed a few code blocks to add proper syntax highlightingy

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 12:17:26 +00:00
Benjamin Cabé 06e8d01e93 drivers: led: Fix doxygen comments for led_info struct
Fixed improperly commented struct.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-11-27 12:17:17 +00:00
Tim Woolliscroft 65068fb4df drivers: i2c: stm32: Fix routing of secondary target address
Fixes the routing of the events associated with a secondary
i2c target address being routed to the primary config. The
i2c_target_config/slave_cfg was being selected from the
driver address match but then over written by the primary.
This change fully implements the if/else of 10bit addressing
and includes a assert if the slave_cfg is NULL, and explains
why dual 10bit addresses on STM32 won't work.

Signed-off-by: Tim Woolliscroft <tim@opteran.com>
2023-11-27 12:16:58 +00:00
Mariusz Skamra b373079275 Bluetooth: audio: ascs: Remove spurious error message
This removes spurious error message printed when CIS has been
disconnected and it was not used by any of the endpoints.
This case is valid and may happen on Connection Timeout when the
controller reports ACL Disconnection first.
When the CIS Disconnection is reported after, the ASE is already in idle
state and the referenece to CIS has been already removed (on ACL
disconnection).

Fixes: #64896
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-11-27 12:16:30 +00:00
Juha Ylinen 637b4b62ee samples: lwm2m: Add support for Connection Manager
Using Connection Manager, it's easy to run lwm2m sample on
devices supporting different connectivity technologies
(for example, Wi-Fi and LTE).

Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
2023-11-27 12:16:10 +00:00
Minho Jin a1614e8c95 driver: counter: rpi_pico_timer: fix counter cancel
alarm setting function checks channel callback and it returns -EBUSY
if callback is registered. but alarm cancel function doesn't clear
callback function. this prevents from alarm setting after alarm cancel

Signed-off-by: Minho Jin <kilejin@gmail.com>
2023-11-27 12:15:56 +00:00
Grant Ramsay 82644a31c2 drivers: ethernet: Fix eth_ivshmem shared memory mapping
This driver assumed the ivshmem-v2 output sections would be mapped
contiguously, which is no longer true.

Modify eth_ivshmem to treat each output section independently

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-27 12:15:43 +00:00
Grant Ramsay 64cc0764ee drivers: virtualization: Map ivshmem-v2 sections individually
Recent changes to the arm64 MMU code mean that you can no longer map
R/O memory as R/W. Mapping R/W memory now causes a cache invalidation
instruction (DC IVAC) that requires write permissions or else a fault
is generated.

Modify ivshmem-v2 to map each R/O and R/W section individually

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-27 12:15:43 +00:00
Vinayak Kariappa Chettimada d36e085ecc Bluetooth: Controller: Fix scan aux context leak
Fix scan aux context leak under BT_CTLR_SCAN_UNRESERVED.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00
Vinayak Kariappa Chettimada d573951f0d Bluetooth: Controller: Revert back early abort of previous prepare
Revert back to implementation that did early abort of
previous prepare when a short prepare is enqueued.

Adds back implementation deleted in
commit 7f388bb70a ("Bluetooth: Controller: Fix short
prepare when many enqueued in pipeline").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-11-27 12:15:29 +00:00