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>
To allow knowing for which MCU are the options,
prepend them with the MCU number.
The primary/preferred MCU will also keep an alias to the
old options (without the cpu<n>_ prefix)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Each MCU hooks need to be named according to its MCU number.
Rename the hooks appropriately.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To be more accurate, as this option represents a microcontroller
number, not a CPU number.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
* In Zephyr:
* The HW models now include N fake timers, and N
bst timers.
The embedded code needs to target the one for its
CPU specifically.
* Update the HW models module to
f4595802d32d103718bf50b3d390b7a450895843
Including the following:
* f459580 TEMP & ECB: Fix INTEN sideeffect prototypes
* 50c2abe nrfx_common: Fix build error with clang
* 5f0ae29 FICR: Add nrf53 variants
* 82ee9bd DPPI: On initialization, set all registers to their reset value
* 1472c34 NVMC & UICR: Readied for nrf53
* f425c08 NVMC & UICR: Refactor
* 3a4cfc2 RADIO: Parametrize ED_RSSIOFFS
* a20e9fc nrfx_get_irq_number() Add missing CCM peripheral for nrf5340net
* c199715 DPPI: Bugfix
* 93806ac Zephyr cmake: Align with nrf53 board rename
* 51f26a3 VREQCTRL: Add register stub and definitions for nrf53
* 802e0cf RADIO: Switch to level interrupts, readied for nrf53
* 49bcea2 Templates: Added shortcut check & event signaling version for s
* a880cd6 Template: Move static out of signal handler definition
* 709f82b TEMP: Switched to level interrupts, readied for nrf53
* 6ef0069 AES_CCM: Switched to level interrupts, readied for nrf53
* eaa89da RNG: Use common templates
* 75a6cb4 AAR: Switched to level interrupts, readied for nrf53
* fbf58f3 AES_ECB: Switched to level interrupts, readied for nrf53
* d084647 RNG: Bugfix in STOP subscription
* 8007318 Templates: Added template code for the most common models logic
* bab6a54 int ctrl: Added new API
* daaaaa0 config: Fix nrf53 Net core EGU instance HAL mapping
* 54570a0 nrf5340 RTC int mapping fix
* 043af26 nrfx_common: Provide nrfx_get_irq_number() for 5340 cores
* ecd7b9b SWI: Add SWI pseudo peripheral
* a70c73b CLOCK: Add missing TASK sideeffecting prototypes, and fix typo
* 56c7581 nrf5340: Split HAL files in net and app sets
* 3892d3e Add API to get the MCUs/domains names
* 8f485bc RADIO: Prevent clang build warning
* 5aac1c2 hal: Build weak version of the HAL for the 53 series also
* f18422d standalone nrfx_config: Provide needed definitions for nrf53
* 4015d5a nrfx_glue_bsim: Provide 2 trivial definitions for standalone bu
* 4af80d5 cmsis stubs: Provide trivial macro to replace ISB
* b6c2769 cmsis replacements: Fix for other Zephyr bsim targets
* 8316930 zephyr CMakefile: Set HAL version based on Kconfig
* 4404106 RNG: Rename functions to match new naming convention
* a3dbb38 RTC: Rename functions to match new naming convention
* 886dc73 CLOCK: Rename functions to match new naming convention
* bcb2b99 EGU: Rename functions to match new naming convention
* 50af67e TIMER: Rename functions to match new naming convention
* 8120224 CLOCK/POWER/RESET: Add DPPI connections, generalize to N instan
* 450337c RTC: Add DPPI connection, nrf53 support and new functionality
* 2918ce6 DPPI common subscription: Minor API change
* ec1c2a7 TIMER: Add DPPI connection, nrf53 support and functionality
* e6f9860 EGU: Add DPPI connection, nrf53 support and generalize
* c8a4368 bst_ticker: Generalize to N instances
* 093deee fake timer: Generalize to N instances
* 302da8d DPPI: Typo fix
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add a new kconfig option to be able to pass extra images to the
native simulator build.
So one can, for ex., use one application build to produce one core image,
and at the same time have it produce the final link with the native
simulator runner and the other MCU images.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The Zephyr build leaves all kconfig options as absolute symbols
in the image. This need to be localized, otherwise they will
appear as duplicates with other Zephyr images.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Update the descriptions for the various CAN devicetree timing properties
specified in Time Quanta (TQ) to make it clear that these, if present, are
only used for the initial timing parameters.
Deprecate the (Re-)Synchronization Jump Width (SJW) devicetree properties
for both arbitration and data phase timing as these are now only used in
combination with the other TQ-based CAN timing properties, which are all
deprecated.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This is coming from devicetree and corrosponds to what we have in the
dts/bindings/vendor-prefixes.txt file.
This will allow for static filtering, especially with twister, i.e. no
need to build anything to know the vendor of a board
All of the vendor data was extracted automatically from the devicetree,
so some platforms might not have the right vendor or no vendor at all
right now, we need to fix some of the DTS information or do this
manually to get this 100% correct. But we are close.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The native simulator final link can garbage collect unused
symbols. So let's ensure the symbol to keep ones are indeed
kept even if not used.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Just like for the nrf52_bsim let's add helper kconfig symbols
which can be used to identify we are running in a target that
is compatible with the real HW but is not the real HW.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Include the nrf peripheral kconfig definitions for all simulated
nrf boards, not just for the nrf52_bsim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Split the native tty serial driver in a top and bottom to enable using it
with embedded libCs.
Signed-off-by: Marko Sagadin <marko.sagadin42@gmail.com>
Some users are in doubt about the native serial drivers
capabilities.
So let's mention them explicitly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the wrapped version of the malloc function
which checks that malloc succeeded before continuing,
so in the unlikely case that we run out of memory
we handle it gracefully.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Change boards and shields and remove kscan nodes in favor of the
"zephyr,lvgl-pointer-input" compatible.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Change boards and shields which enable the LV_Z_POINTER_KSCAN symbol to use
the new "zephyr,lvgl-pointer-input" compatible instead.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
* In Zephyr: The HW models now include N interrupt controllers
The interrupt handling code needs to target one controller
specifically.
* Update the HW models module to
57b61a9a2da75c860f15ca79522b24d57992df2c
Including the following:
* 57b61a9 INT CNTRL: Generalize to N controllers
* 1ea8194 nrf_bsim_redef.h: Add first definitions for nrf5340
* 5f81ee9 irq_ctrl: Lower a bit HW event priority
* 0986acc RNG: Add nrf53 variant in model
* 09345da RNG: Generate level interrupts instead of pulse ones
* f9b7c7a DPPI: Add first version
* 62dabd3 HW models: Initial peripheral adaptation for multi-int_cntr
* f54b59d HW models: Adding initial nrf5340 structure
* fb1edd9 HW models: Use HW types definitions only where neded
* 2744f4c Add basic support for variants
* a5f79cd nrf_bsim_redef.h: Remove unnecessary redefinitions
* 2c781dd HW_models: Improve includes
* bdb0a08 minor: Remove non-ASCII characters from source
* b5e95bd RADIO: Corrected note about MAXLEN and CRCINC behaviour
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>