Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf53bsim: Add support for IPC & split stack builds #63803

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

aescolar
Copy link
Member

@aescolar aescolar commented Oct 11, 2023

Add support for split stack builds in the simulated nrf5340.
This enables building and testing this configurations.

Apart from the main changes: updating the HW models to a version which includes the IPC peripheral and providing the necessary default kconfigs for these simulated boards; and allocate the share memory buffer used the IPC rpmsg backend in this target , this PR includes some ancillary changes necessary for this to work:

  • An update to libmetal so it can be used with the posix architecture,
  • A minor fix for the simulated board to avoid a runtime warning (due to a double connection to the phy).

Note, this PR enables this use case, but it is not too evident in the sense that it does not include any examples or so.
Those will follow in other subsecuent PRs like #64134 and more, which will enable some of the current samples for this target, convert them to sysbuild, and enable them as runtime samples in CI.

@zephyrbot zephyrbot added manifest manifest-nrf_hw_models manifest-libmetal DNM This PR should not be merged (Do Not Merge) labels Oct 11, 2023
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 11, 2023

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
libmetal zephyrproject-rtos/libmetal@b91611a zephyrproject-rtos/libmetal@03140d7 (master) zephyrproject-rtos/[email protected]
nrf_hw_models zephyrproject-rtos/nrf_hw_models@f459580 zephyrproject-rtos/nrf_hw_models@f7842d7 zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@aescolar aescolar force-pushed the amp_nrf53bsim branch 5 times, most recently from ac4c728 to 642a356 Compare October 24, 2023 08:28
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Oct 24, 2023
@aescolar aescolar marked this pull request as ready for review October 24, 2023 09:33
@zephyrbot zephyrbot added the platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim label Oct 24, 2023
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 <[email protected]>
* Update the HW models module to
f7842d717c73aaeb0354f9e70e6d5ad275106f52

Including the following:
* f7842d7 INT CNTLR: Bugfix for more than 32 interrupts
* 903f643 MUTEX: Add nrf5340 MUTEX peripheral model
* e84fca4 IPC: Add nrf5340 IPC peripheral model
* dacbaa0 EGU: Minor: Use new irq ctrl API
* 9a4e0ba Templates: Add intenset/clr template for multi instance per
* c77ba72 nrf_dppi_hack: Add extra nrf like APIs meant for simulation
* 99ae791 RTC: Fix subscribe prototypes and calls from HAL
* ca554e9 FICR (53): Fix links to documentation
* d3758a2 docs: Fix links to HW sources
* 693a36c doc: Implementation status: Change checkmarks

Signed-off-by: Alberto Escolar Piedras <[email protected]>
Update libmetal to the latest version which includes
support for the POSIX architecture.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
Provide the actual shared memory buffer for the
IPC rpmsg backend in this platform.

Signed-off-by: Alberto Escolar Piedras <[email protected]>
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 <[email protected]>
@carlescufi carlescufi merged commit 7ea95b0 into zephyrproject-rtos:main Oct 24, 2023
20 checks passed
@aescolar aescolar deleted the amp_nrf53bsim branch October 24, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants