Kconfig options with a HEAP_MEM_POOL_ADD_SIZE_ prefix should be used to
set the minimum required system heap size. This helps prevent
applications from creating a non-working image by trying to set a too
small value.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a device driver to read events from a Linux evdev device node and
inject them back as Zephyr input events.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
* Add a subsection linking to the emulators section.
* Added more internal links
* Fixed EPROM simulator/emulator mix, and added link
to simulator
* For the RTC peripheral, mention there is no driver for
it yet.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Rename the native Linux SocketCAN driver to reflect that it can can now be
used in both native_posix and native_sim (with or without an embedded
C-library).
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Some libraries (like Openthread's spinel code) define their
API as externally linkable. This will make those symbols
remain as externally linkable by default after the
Zephyr build has produced the native simulator library
(MCU code).
When building an AMP native_simulator executable with
several MCUs each including these, the linker will see
those symbols as still linkable and duplicated, and
throw an error.
So let's give the option for users/developers of those
libraries to define extra symbols they want
to localize before assembling the final executable.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Set the chosen 802154 radio in DT for the
nrf5340bsim_nrf5340_cpuapp so we can build with the
radio driver built into the net core.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Like other driver APIs, we can add an `emul` variant to
`native_posix` and `native_posix_64` that should allow us to
simplify applilcation and library development and to also
increase test coverage in CI.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Override the chosen entropy source irrespectively of what the
SOC may chose.
This is to avoid problems as the SOC may select the
cryptocell, but we do not support it in the simulated
target.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To the instructions that install "foreign architecture" (i386)
packages on a x86-64 system, add the commands to ensure
the architecture is added if it wasn't already.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Set native_sim as the default testing platform instead of native_posix.
This continues the agreed strategy described in #58305
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
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>
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>
In some cases, the APPLICATION_BINARY_DIR does not match
the CMAKE_BINARY_DIR, in those cases the native simulator
build would not find the zephyr elf file.
Fix it by using the correct variable.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Instead of always enabling fuse for native_posix,
let's give users instructions on how to enable it
while building.
In the documentation: replace the references to native_posix
with native_sim, improve the links, mention the flash
simulator, and provide a separate subsection for FUSE access.
Add a separate test for the sample with fuse access enabled
and be sure it is possible to run both this and the basic
one with native_sim (was filtered out before for native_posix)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Polish and correct the documentation to reflect the use
of the native_simulator, and the fact that we have
now more than one bsim board in tree.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update this board docs to reflect that these 2 peripherals
are now supported.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Replace the references to native_posix with native_sim,
and update link names accordingly.
Background: during this release native_sim is replacing
native_posix as the main host test/development platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's replace the references to native_posix with native_sim,
Background: during this release native_sim is replacing
native_posix as the main host test/development platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
During this release native_sim is replacing native_posix
as the main host test/development platform.
Therefore, instead of basing the native_sim documentation
in native_posix's one, let's do it the other way around.
This commit mostly moves documentation from the native_posix
page into the native_sim one, changing the board and renaming
labels.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This board HW models do not yet support the NFCT peripheral,
let's remove the DT node to avoid the driver being selected.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The existing driver and sample:
- drivers/bluetooth/hci/rpmsg
- samples/bluetooth/hci_rpmsg
are no longer correctly named, since they now use the IPC subsystem to
send and receive data. The IPC subsystem can use RPMsg as a transport,
but that is one of several selectable backends.
I initially wanted to deprecated both the BT_RPMSG Kconfig option as
well as the zephyr,bt-hci-rpmsg-ipc chosen node in Devicetree. However,
this proved to be undoable in the case of the Kconfig option. This is
because it's a choice option, and those have special behavior. In
particular, the only practical way to deprecate would've been to keep
the old Kconfig option outside the choice (much like it's done in this
commit) but then also add a 'depends on !BT_RPMSG' on each of the
remaining choice symbols *except* on the new BT_HCI_IPC one. This, however,
only works correctly for .conf files. If a board instead sets the
default BT_HCI_BUS_TYPE in the Kconfig.defconfig file then the Kconfig
tree parsing would fail, because it'd try to set it to a value
(BT_RPMSG) that is no longer part of the choice.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add support for these two options in the simulated board.
Before these options were otherwise defined in the real
BOARD/SOC kconfig files, which meant samples/tests which
used them would not be able to build due to a kconfig error.
With this change they can both be selected, and the right
functionality is built in.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Before we were defining the buffer in the runner context
which is simpler and less error prone, but it had a hardcoded
size decoupled from DT as it could not be based on DT
information.
Instead, let's allocate the buffer in the application core
image. This allows us to size it based on the device tree
configuration.
Note that this then requires the application core image
to be present during link time of the final executable
when the IPC subsystem is used.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 5340 simulated boards:
* Now that the HW models include the IPC and MUTEX peripherals
we can enable them in DT.
* Also enable the DT mbox definition and allocate its shared memory
* Set the default kconfiguration for the HEAD, IPC, MBOX and split
BT stack as in the equivalent real targets.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Provide the actual shared memory buffer for the
IPC rpmsg backend in this platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Each MCU initialization hooks will attempt to call
into the API to connect to the bsim phy and, if the
user requested it thru command line, delay its boot.
Doing this for all MCUs is best to ensure it is done
even if there is no image for the other MCU,
but results in the calls being done twice if there is
2 MCUs images, which results in the simulator API giving
a warning about it being likely an error in the app.
To avoid this problem, let's have this be called
only once.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The counter_native_posix driver currently does not support top value
configuration, i.e. `ctr_set_top_value` returns `-ENOTSUP`. This commit
adds support for top value configuration, and with the counter API now
fully implemented, adds `counter` to `supported` peripherals for
native_posix target.
It also resolves an existing bug in which the
counter ISR did not reset upon reaching `TOP_VALUE`.
And adds support for multiple channels
Signed-off-by: Jason Wright <jason@jpw.nyc>
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The bstests code builds and executes with the embedded
code, but had a call into "free()" which, when building
the embedded code with an embedded C library lands
in the embedded libC free, while it should
always call into the host libC free.
Fix it by calling thru the appropriate trampoline.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove the mention of startup script and update the documentation
to reflect the current way of working i.e., using net-setup.sh script
before starting the zephyr.exe process.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Minor updates both to make it more consistent with the
nrf53bsim documentation, and include more links
and a small section about the C library choice.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the documentation describing the bsim boards overall
to match the current reality.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add documentation for the newly introduced nrf5340bsim boards.
And rename the nrf52bsim documentation file as it is not the only
one anymore.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Minor updates as now we have also native_sim, so we
should not only refer to native_posix.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
So it gets the command line arguments by default.
This eases running the BT test which run on the
nrf52_bsim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Automatically start the Network domain CPU during HW boot.
In the real HW this CPU is held on reset until something else
(Typically the application MCU) releases it.
But doing so facilitates running tests in this MCU as there is
no requirement for an image for the application core.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When we have more than 1 MCU, add the MCU number to the traces
so we can identify from which MCU they come from.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add options to force MCUs to boot/not boot, overriding
of how they would behave otherwise, as well as an
option to print info about the MCUs present in the
platform.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As a development helper, add a kconfig option to
automatically start the MCU this Zephyr image is built
for during HW boot, even if in other circumstances
this MCU would not start automatically (for ex. because
another core is meant to release its reset).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As we will now we having more nrf5*_bsim boards defined in this
same folder, the old folder names became missleading.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>