Commit Graph

156 Commits

Author SHA1 Message Date
Henrik Brix Andersen
1dbd552b2e boards: native: native_sim: add reference to the SocketCAN snippet
Add reference to the SocketCAN snippet.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-08-01 19:37:08 +01:00
Alberto Escolar Piedras
059186558f boards nrf_bsim: Add docs for new nrf54lm20bsim target
Add documentation for new simulated nRF54LM20 target

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-08-01 07:48:27 -04:00
Alberto Escolar Piedras
b82baf66af doc: bsim boards: Typo fixes
Just a few grammar fixes

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-08-01 07:48:27 -04:00
Andrey Dodonov
a4fa5de807 drivers uart_native_posix: mention that pty supports async
With CONFIG_UART_ASYNC_API pty driver for native sim now supports async

Signed-off-by: Andrey Dodonov <Andrey.Dodonov@endress.com>
2025-07-31 16:49:23 -04:00
Alberto Escolar Piedras
f4794f848b doc boards/native: Remove orphan diagram
This diagram was superseded by layering_natsim.svg
When the native_posix related documentation was removed
this diagram stopped being used.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-30 17:24:32 -04:00
Alberto Escolar Piedras
542874333c boards nrf_bsim: Add a new nrf54lm20bsim target
Add a new simulated nrf54lm20 cpuapp target

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:37 +02:00
Alberto Escolar Piedras
a0f2ec8352 boards/native: Remove NATIVE_SIM_NATIVE_POSIX_COMPAT kconfig option
This option was introduced together with native_sim in 3.5 to ease
the transition from native_posix, and was deprecated in 4.1.

Let's remove it now.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:23 +02:00
Alberto Escolar Piedras
2b18fc8348 native_sim_reboot: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this component.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
7e1f2ffe00 boards/native docs: Remove note on NATIVE_APPLICATION
As we do not include any support in tree for this mode, we do not need
to warn in the documentation that it does not apply to it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
86d8853fd5 boards native SDL integration: Remove NATIVE_APPLICATION support
It is not possible to build anymore in that mode, so we do not
need to support it in this driver cmake files.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-07-19 09:38:15 +02:00
Alberto Escolar Piedras
2356c1db3c doc native: Clarify that in Windows one needs a VM for native_sim
Be more explicit about the need for a Virtual Machine running Linux if
running in Windows.
Also WSL2 has been out for ~5 years. Let's reduce the amount of info
on how  to run it in WSL1, as probably almost nobody is using it
anymore.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-06-10 12:51:54 -04:00
Yuval Peress
d17956a074 build: Support SYSROOT_DIR in native_sim and clang
When running naive sim builds using clang, respect user passed
SYSROOT_DIR values. Additionally, allow overriding the archive tool
when calling Make for the native simulator.

Add the sysroot (if available) to the native_simulator target and
TOOLCHAIN_C_FLAGS and TOOLCHAIN_LD_FLAGS. Additionally pass CMAKE_AR
to NSI_AR.

Signed-off-by: Yuval Peress <peress@google.com>
2025-06-06 10:11:49 +02:00
Alberto Escolar Piedras
5c9c3497ed boards native bsim: Provide control of disconnection on exit
Allow either programatically from the test/code or from the command
line to chose if this executable exiting should terminate the
whole simulation, or if it should only disconnect the device.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-19 16:36:30 +02:00
Alberto Escolar Piedras
b3c5b3a7dc boards/native/nrf_bsim: Declare as pointer to constant data
To be clearer to the compiler and users.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-13 12:09:30 +02:00
Alberto Escolar Piedras
1286f15543 boards native: Move int declaration into loop
To reduce its scope and please static analyzers

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-05-13 12:09:30 +02:00
Adrian Friedli
ffdc50c4bf boards: native_sim: add reboot for native_sim
Add a reboot implementation for the native_sim target which restarts
the current executable keeping the command line arguments after closing
all open file descriptors.

Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Co-authored-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-04-29 17:54:26 +02:00
Declan Snyder
7962eaeca6 dts: Move vendor-specific dtsi to dedicated folder
Move all the vendor-specific dtsi files that were in dts/common to a
new folder under dts/ designated for vendor-specific files,
since they are not common at all, except for one vendor.

Change MAINTAINERS.yml to reflect the moving of the files.

Update migration guide for this change.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-04-29 13:00:03 +02:00
Fabian Blatz
a924b133a3 boards: native_sim: Associate sdl touch instance with display
Adds the device handle for the display to the zephyr,input-touch-sdl
instance.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-03-25 22:14:40 +01:00
Alberto Escolar Piedras
deffdec545 doc boards/native arch_soc: Clarify 32bit paragraph
One only needs the 32bit C library to build 32bit binaries.
And let's remove ubuntu 16 reference. The package is the same in
all versions.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 19:05:12 +01:00
Alberto Escolar Piedras
a8b44fd1d1 dts: zephyr,native-posix-cpu changed to zephyr,native-sim-cpu
The old binding remains until 4.4 but is deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 02:27:36 +01:00
Alberto Escolar Piedras
ea79fdb4dd boards native_sim: Deprecate cmdline_common.h
Deprecate this header which provides API compatibility with
native_posix, with planned removal in v4.4.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 02:27:36 +01:00
Alberto Escolar Piedras
ba64291088 drivers timer: Rename native_posix_timer native_sim_timer
Including renaming the kconfig option
NATIVE_POSIX_TIMER into NATIVE_SIM_TIMER deprecating the first one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:49 +01:00
Alberto Escolar Piedras
7ddfc6af46 boards native_sim: Correct UART outdated comments
Both polling and interrupt based APIs are supported in the TTY driver.
And the console backend is enabled unless *any* UART driver is built.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Alberto Escolar Piedras
ab7a6de5bb drivers/counter/counter_native_sim: Rename from counter_native_posix
Including renaming the DTS binding and kconfig options
deprecating the old one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:37 +01:00
Alberto Escolar Piedras
7ffd698785 board native_sim: BT userchan now supports picolibc
Let's update the table

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-10 06:52:19 +01:00
Alberto Escolar Piedras
df5318479b docs boards native_sim: Improve FUSE FS access description
The FUSE driver allows accessing a possible filesystem, independently
of the underlaying device, so let's correct the description so we do
not mix "flash" with "filesystem".

Also, one does not need to create the 'flash' folder these days. The
FUSE library will if needed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 15:26:29 +01:00
Alberto Escolar Piedras
65018e2803 docs boards native_sim: FUSE driver now supports all libCs
Now we can build the FUSE driver with any embedded libC,
so let's update the table.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 15:26:29 +01:00
Alberto Escolar Piedras
43b43f5408 boards/native_sim: Deprecate timer_model.h
Deprecate this header which provides API compatibility for the
native_posix timer HW model, with planned removal in v4.4.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 08:46:34 +01:00
Alberto Escolar Piedras
543f2da251 boards/native_sim: Deprecate native_posix_compat.h
Deprecate this header which provides API compatibility with
native_posix, with planned removal in v4.4.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 08:46:34 +01:00
Alberto Escolar Piedras
4338122248 drivers entropy: fake_entropy_native_posix rename to _native_sim
Rename the driver files, binding and kconfig options, while deprecating
the old binding and kconfig options.

Uses in tree are replaced.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 03:38:13 +01:00
Alberto Escolar Piedras
78f800642a drivers/ethernet/eth_native_posix: Rename to eth_native_tap
Rename this driver to eth_native_tap, including renaming all its
options.
The old options remain until v4.4, but as deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:38 +01:00
Alberto Escolar Piedras
bd42df2662 boards native_sim: deprecate NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME
In favour of NATIVE_SIM_SLOWDOWN_TO_REAL_TIME.
To be removed by 4.4.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:23 +01:00
Alberto Escolar Piedras
b6625b1b28 boards native_sim: Update cmdline.h header comment
Correct the reference in the comment to native posix.
This header is here to stay providing the API for registering
arguments.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
0f33f0ab46 board native_posix: Remove
Remove native_posix as it has reached its end of life in 4.2,
after being deprecated since 4.0.

For more information check
https://github.com/zephyrproject-rtos/zephyr/issues/76895

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
2265a30deb doc board native_posix: Remove this board docs
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.

Let's remove this board docs.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
fe5753a393 docs: Remove references to native_posix pages
The native_posix pages are going to be removed from the tree, let's
remove references to them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
6c38bc8ec4 boards native_posix: Remove twister support
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.

Remove the twister support for native_posix[//64] and therefore all
references to them from the testcases and samples yamls, so twister
does not error out.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
82941a6a6e boards/native/nrf_bsim: command line compat with native_sim/posix
Provide it from native_sim instead of native_posix as native_posix
is going to be removed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
3883ef279e boards nrf54l15bsim: Remove out of date notes in doc
Remove two out of date/incorrect notes in the documentation for this
board:
For quite a while now, we have models of some parts of the CRACEN HW.
Since f4cdb0f07e we are using the CRACEN
RNG driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-03 03:21:03 +01:00
Alberto Escolar Piedras
e96b2a7c11 boards nrf54l15bsim: Remove uncessary defconfig
This board is using since f4cdb0f07e
the cracen RNG driver, so there is no need to set default options for
the native_posix entropy driver.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-03 03:21:03 +01:00
Alberto Escolar Piedras
ac2d1e66ba boards nrf54l15bsim: Do not delete grtc clock properties
Revert the change to this file done in
865b2456c0
In which these clock properties were added to the GRTC binding but
they were, at the same time, not added/removed for the simulated
target.
The author indicates this was done due to some test failing,
but at this point no test fails with these properties present also
in the simulated target, and there is no understanding of why they
would.
So let's avoid diverging the simulated target from the real
one.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-21 15:13:29 +00:00
Adam Kondraciuk
865b2456c0 dts: nordic: Add support for clock outputs
Add support for GRTC clock output pins.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2025-02-18 18:37:35 +01:00
Piotr Krzyzanowski
ae80fb10d4 boards: nrf_bsim: disable insted of deletion spi node
Disable insted of deletion of spi00 node on 54l15bsim

Signed-off-by: Piotr Krzyzanowski <piotr.krzyzanowski@nordicsemi.no>
2025-02-17 14:03:27 +01:00
Alberto Escolar Piedras
5e7df92082 boards nrf54l15bsim: Do not work around peripheral clock issue
In 923d313a04 the clock frequency in DTS
for the UART00 was fixed, but not for the simulated target. This was
likely due to the HW models modeling it as 16MHz instead of 128MHz for
this particular one as it is in reality.

Now that the HW models have been fixed, let's let this clock be
configured like for real HW.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-02-14 13:36:55 +01:00
Rubin Gerritsen
0f3e6fd3d6 boards: nrf_bsim: Document how to use the console with bsim
This commit describes how to build and run applications using
the console. This documentation is added because it may
not be obvious how this is done. That is, sometimes a user
may believe that the terminal launching the application is the
the console which is not the case.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Rubin Gerritsen
77de5935f2 boards: nrf_bsim: Set chosen console dts entry
This makes the bsim boards more similar to their corresponding DKs.
This makes it simpler to run samples and application requiring
the use of a console.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Rubin Gerritsen
a2d1b28ba0 boards: nrf52_bsim: Remove disabling of LOG_BACKEND_UART
There seems like there is no good reason for having it disabled.
For bsim boards CONFIG_SERIAL is disabled by default, there will
anyways not be any logging on the UART.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2025-02-07 10:25:20 +01:00
Krzysztof Chruściński
f96064379b boards: native_sim: Detect attempt to configure not existing int
Similar to e770128c2. Prevent overrunning the irq vector table.
This is not happening today in tree, but coverity thinks it
does. Checking for it to prevent it is not a bad idea
anyhow, so let's do it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-29 11:03:02 +01:00
Krzysztof Chruściński
cd23fdf63f boards: nrf*_bsim: Detect attempt to configure not existing int
Similar to 923d4fbad8. Prevent overrunning the irq vector table.
This is not happening today in tree, but coverity thinks it
does. Checking for it to prevent it is not a bad idea
anyhow, so let's do it.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-29 11:03:02 +01:00