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>
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>
Including renaming the DTS binding and kconfig options
deprecating the old one.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Similar to 66a4fe32ce. Prevent overrunning the irq vector table
in posix_irq_priority_set. This is not happening today in tree,
but coverity thinks it may. 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>
The models include enough of the CRACEN to run the same
nrfx drivers as in Zephyr. So let's add it to the list.
Also let's remove the RTC from the list as the hal does not
expose it anymore for this platform as the GRTC is to be used
instead.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's default to this new driver.
And therefore change the conditions in the BT controller kconfig
which were selecting the native_posix fake entropy driver
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Do not delete clocks for the bsim target. Clocks are referenced
by peripherals and it can be used to get frequency that clocks
the peripheral.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").
This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.
The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.
Hence this revert.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Now that MbedTLS is capable of automatically enabling
CONFIG_ENTROPY_GENERATOR (when available), we can remove forced
enablements in boards|soc deconfig files.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Add 128 MHz clock source and use it for uart00. Baudrate setting
must be adjusted based on uart clock source so without this
change there is wrong baudrate on uart00.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
BT uses PSA Crypto API to perform crypto operations and, on this
platform, these APIs are implemented through Mbed TLS. In order
to properly initialize this library, a random number generator
is required.
* If the platform supports an HW entropy generator (ex: native_sim,
nrf), then ENTROPY_GENERATOR must be used;
* Otherwise (ex: qemu_cortex_m3) test random generator can be
enabled.
Enabling the proper option at board Kconfig level allows for
a more compact code change instead of manually editing _all_
the samples/tests that required this fix.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Include in the list of supported peripherals the UARTE for the
simulated nrf54l15
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The HW models now support this peripheral for this target.
Let's enable it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This option existed only to make the transition from native_posix to
native_sim easier. As native_posix is going to be removed in v4.2
we deprecate this option now, so it will also be removed.
We also switch this option to default to false already now.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Include in the list of supported peripherals the UARTE for the
simulated nrf5340
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The HW models now support this peripheral for these targets.
Let's enable them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Include in the list of supported peripherals the GPIO
and GPIOT for both the nrf5340 and nrf54l15
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>