Skip to content

Commit

Permalink
samples: drivers: mbox: add support for nrf54h20dk cpuapp<>cpuflpr
Browse files Browse the repository at this point in the history
Add support for testing IPC between cpuapp<>cpuflpr. Some adjustments
have been done to be able to support two different remote targets for
the nrf54h20dk cpuapp.

Signed-off-by: Gerard Marull-Paretas <[email protected]>
  • Loading branch information
gmarull committed Jul 8, 2024
1 parent a46187a commit 797e143
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 2 deletions.
3 changes: 1 addition & 2 deletions samples/drivers/mbox/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
source "share/sysbuild/Kconfig"

config REMOTE_BOARD
string
string "Remote board"
default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk"
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP"
default "adp_xc7k/ae350" if $(BOARD) = "adp_xc7k"
default "mimxrt1170_evkb/mimxrt1176/cm4" if $(BOARD) = "mimxrt1170_evkb"
default "mimxrt1170_evk/mimxrt1176/cm4" if $(BOARD) = "mimxrt1170_evk"
default "mimxrt1160_evk/mimxrt1166/cm4" if $(BOARD) = "mimxrt1160_evk"
default "lpcxpresso55s69/lpc55s69/cpu1" if $(BOARD) = "lpcxpresso55s69"
default "nrf54h20dk/nrf54h20/cpuppr" if "$(BOARD)${BOARD_QUALIFIERS}" = "nrf54h20dk/nrf54h20/cpuapp"
default "nrf54h20dk/nrf54h20/cpuapp" if "$(BOARD)${BOARD_QUALIFIERS}" = "nrf54h20dk/nrf54h20/cpurad"
default "nrf54l15pdk/nrf54l15/cpuflpr" if $(BOARD) = "nrf54l15pdk"
default "stm32h747i_disco/stm32h747xx/m4" if $(BOARD) = "stm32h747i_disco"
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2024 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/

/ {
mbox-consumer {
compatible = "vnd,mbox-consumer";
mboxes = <&cpuflpr_vevif 16>, <&cpuapp_bellboard 18>;
mbox-names = "tx", "rx";
};
};

&cpuapp_bellboard {
status = "okay";
};

&cpuflpr_vevif {
status = "okay";
};
1 change: 1 addition & 0 deletions samples/drivers/mbox/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if(CONFIG_BOARD_NRF5340DK_NRF5340_CPUNET OR
CONFIG_BOARD_MIMXRT1160_EVK_MIMXRT1166_CM4 OR
CONFIG_BOARD_LPCXPRESSO55S69_LPC55S69_CPU1 OR
CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUPPR OR
CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUFLPR OR
CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP OR
CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUFLPR OR
CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUFLPR_XIP OR
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2024 Nordic Semiconductor ASA
* SPDX-License-Identifier: Apache-2.0
*/

/ {
mbox-consumer {
compatible = "vnd,mbox-consumer";
mboxes = <&cpuflpr_vevif 16>, <&cpuapp_bellboard 18>;
mbox-names = "rx", "tx";
};
};

&cpuapp_bellboard {
status = "okay";
};

&cpuflpr_vevif {
status = "okay";
};
20 changes: 20 additions & 0 deletions samples/drivers/mbox/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ tests:
- nrf54h20dk/nrf54h20/cpuapp
extra_args:
mbox_SNIPPET=nordic-ppr
mbox_EXTRA_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_cpuppr.overlay"
SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuppr.conf
sysbuild: true
harness: console
harness_config:
Expand All @@ -40,6 +42,24 @@ tests:
- "Ping \\(on channel 15\\)"
- "Pong \\(on channel 18\\)"

sample.drivers.mbox.nrf54h20_app_flpr:
platform_allow:
- nrf54h20dk/nrf54h20/cpuapp
integration_platforms:
- nrf54h20dk/nrf54h20/cpuapp
extra_args:
mbox_SNIPPET=nordic-flpr
mbox_EXTRA_DTC_OVERLAY_FILE="boards/nrf54h20dk_nrf54h20_cpuapp_cpuflpr.overlay"
SB_CONF_FILE=sysbuild/nrf54h20dk_nrf54h20_cpuflpr.conf
sysbuild: true
harness: console
harness_config:
type: multi_line
ordered: false
regex:
- "Ping \\(on channel 16\\)"
- "Pong \\(on channel 18\\)"

sample.drivers.mbox.nrf54h20_rad_app:
platform_allow:
- nrf54h20dk/nrf54h20/cpurad
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpuflpr"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SB_CONFIG_REMOTE_BOARD="nrf54h20dk/nrf54h20/cpuppr"

0 comments on commit 797e143

Please sign in to comment.