Skip to content

Commit 46a16a6

Browse files
samples: zbus: ipc_forwarder: Add support for nrf5340bsim target
Adds support for running the Zbus IPC forwarder sample on the nrf5340bsim simulation platform to enable development and CI without physical hardware. Signed-off-by: Trond F. Christiansen <[email protected]>
1 parent 68cf75c commit 46a16a6

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

samples/subsys/zbus/ipc_forwarder/Kconfig.sysbuild

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ choice
1010
prompt "Remote board target"
1111
default REMOTE_BOARD_NRF54H20_CPURAD if BOARD = "nrf54h20dk"
1212
default REMOTE_BOARD_NRF5340_CPUNET if BOARD = "nrf5340dk"
13+
default REMOTE_BOARD_NRF5340_CPUNET_SIM if BOARD = "nrf5340bsim"
1314

1415
config REMOTE_BOARD_NRF54H20_CPURAD
1516
bool "nrf54h20dk/nrf54h20/cpurad"
@@ -28,6 +29,12 @@ config REMOTE_BOARD_NRF54H20_CPUFLPR_XIP
2829
config REMOTE_BOARD_NRF5340_CPUNET
2930
bool "nrf5340dk/nrf5340/cpunet"
3031

32+
config REMOTE_BOARD_NRF5340_CPUNET_SIM
33+
bool "nrf5340bsim/nrf5340/cpunet"
34+
help
35+
Use this option to run the sample on nRF5340 CPU network simulator target.
36+
This option is useful for development and testing without requiring physical hardware.
37+
3138
endchoice
3239

3340
config REMOTE_BOARD
@@ -36,4 +43,5 @@ config REMOTE_BOARD
3643
default "nrf54h20dk/nrf54h20/cpuppr" if REMOTE_BOARD_NRF54H20_CPUPPR
3744
default "nrf54h20dk/nrf54h20/cpuppr/xip" if REMOTE_BOARD_NRF54H20_CPUPPR_XIP
3845
default "nrf54h20dk/nrf54h20/cpuflpr/xip" if REMOTE_BOARD_NRF54H20_CPUFLPR_XIP
39-
default "nrf5340dk/nrf5340/cpunet" if REMOTE_BOARD_NRF5340_CPUNET
46+
default "nrf5340dk/nrf5340/cpunet" if REMOTE_BOARD_NRF5340_CPUNET
47+
default "nrf5340bsim/nrf5340/cpunet" if REMOTE_BOARD_NRF5340_CPUNET_SIM
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_SOC_NRF53_CPUNET_ENABLE=y

samples/subsys/zbus/ipc_forwarder/sysbuild.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ ExternalZephyrProject_Add(
3636
BOARD_REVISION ${BOARD_REVISION}
3737
)
3838

39+
# Configure BabbleSim multi-core setup for nrf5340bsim targets
40+
if("${SB_CONFIG_REMOTE_BOARD}" MATCHES "nrf5340bsim")
41+
native_simulator_set_child_images(${DEFAULT_IMAGE} remote_app)
42+
native_simulator_set_final_executable(${DEFAULT_IMAGE})
43+
endif()
44+
3945
# Setup PM partitioning for remote
4046
set_property(GLOBAL APPEND PROPERTY PM_DOMAINS REMOTE)
4147
set_property(GLOBAL APPEND PROPERTY PM_REMOTE_IMAGES remote_app)

0 commit comments

Comments
 (0)