Skip to content

Commit 06b7168

Browse files
nordic-bamirlubos
authored andcommitted
[nrf fromtree] samples: subsys: ipc: Run multi-endpoint IPC sample on nrf54h20
Extend IPC multi-endpont sample for 54h20 Signed-off-by: Bartosz Miller <[email protected]> (cherry picked from commit 86fb21502c86b0ca4f1151ef3594a7bf6a7bf46c)
1 parent d24c26f commit 06b7168

File tree

7 files changed

+109
-8
lines changed

7 files changed

+109
-8
lines changed

samples/subsys/ipc/ipc_service/multi_endpoint/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ cmake_minimum_required(VERSION 3.20.0)
88

99
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1010

11-
if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP AND
12-
NOT CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP )
13-
message(FATAL_ERROR "${BOARD} is not supported for this sample")
14-
endif()
15-
1611
project(ipc_service)
1712

18-
target_sources(app PRIVATE src/main.c)
13+
FILE(GLOB app_sources src/*.c)
14+
target_sources(app PRIVATE ${app_sources})

samples/subsys/ipc/ipc_service/multi_endpoint/Kconfig.sysbuild

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ source "share/sysbuild/Kconfig"
66

77
config NET_CORE_BOARD
88
string
9-
default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk"
10-
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim"
9+
default "$(BOARD)/nrf5340/cpunet" if $(BOARD) = "nrf5340dk"
10+
default "$(BOARD)/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim"
11+
default "$(BOARD)/nrf54h20/cpurad" if $(BOARD) = "nrf54h20dk"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SOC_NRF54H20_CPURAD_ENABLE=y
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/ {
2+
reserved-memory {
3+
/delete-node/ memory@2f0bf000;
4+
/delete-node/ memory@2f0bf800;
5+
6+
cpuapp_cpurad_ipc_shm_a: memory@2f0bf000 {
7+
reg = <0x2f0bf000 DT_SIZE_K(1)>;
8+
};
9+
10+
cpurad_cpuapp_ipc_shm_a: memory@2f0bf400 {
11+
reg = <0x2f0bf400 DT_SIZE_K(1)>;
12+
};
13+
14+
cpuapp_cpurad_ipc_shm_b: memory@2f0bf800 {
15+
reg = <0x2f0bf800 DT_SIZE_K(1)>;
16+
};
17+
18+
cpurad_cpuapp_ipc_shm_b: memory@2f0bfC00 {
19+
reg = <0x2f0bfC00 DT_SIZE_K(1)>;
20+
};
21+
};
22+
23+
ipc {
24+
cpuapp_cpurad_ipc_b: ipc-2-3-b {
25+
compatible = "zephyr,ipc-icbmsg";
26+
dcache-alignment = <32>;
27+
status = "okay";
28+
mboxes = <&cpuapp_bellboard 20>,
29+
<&cpurad_bellboard 14>;
30+
};
31+
};
32+
};
33+
34+
&cpuapp_bellboard {
35+
nordic,interrupt-mapping = <0x146041 0x0>;
36+
};
37+
38+
&ipc0 {
39+
tx-region = <&cpuapp_cpurad_ipc_shm_a>;
40+
rx-region = <&cpurad_cpuapp_ipc_shm_a>;
41+
};
42+
43+
ipc1: &cpuapp_cpurad_ipc_b {
44+
status = "okay";
45+
mbox-names = "rx", "tx";
46+
tx-region = <&cpuapp_cpurad_ipc_shm_b>;
47+
rx-region = <&cpurad_cpuapp_ipc_shm_b>;
48+
tx-blocks = <32>;
49+
rx-blocks = <32>;
50+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/ {
2+
reserved-memory {
3+
/delete-node/ memory@2f0bf000;
4+
/delete-node/ memory@2f0bf800;
5+
6+
cpuapp_cpurad_ipc_shm_a: memory@2f0bf000 {
7+
reg = <0x2f0bf000 DT_SIZE_K(1)>;
8+
};
9+
10+
cpurad_cpuapp_ipc_shm_a: memory@2f0bf400 {
11+
reg = <0x2f0bf400 DT_SIZE_K(1)>;
12+
};
13+
14+
cpuapp_cpurad_ipc_shm_b: memory@2f0bf800 {
15+
reg = <0x2f0bf800 DT_SIZE_K(1)>;
16+
};
17+
18+
cpurad_cpuapp_ipc_shm_b: memory@2f0bfC00 {
19+
reg = <0x2f0bfC00 DT_SIZE_K(1)>;
20+
};
21+
};
22+
23+
ipc {
24+
cpuapp_cpurad_ipc_b: ipc-2-3-b {
25+
compatible = "zephyr,ipc-icbmsg";
26+
dcache-alignment = <32>;
27+
status = "okay";
28+
mboxes = <&cpuapp_bellboard 20>,
29+
<&cpurad_bellboard 14>;
30+
};
31+
};
32+
};
33+
34+
&cpurad_bellboard {
35+
nordic,interrupt-mapping = <0x5041 0>;
36+
};
37+
38+
&ipc0 {
39+
tx-region = <&cpurad_cpuapp_ipc_shm_a>;
40+
rx-region = <&cpuapp_cpurad_ipc_shm_a>;
41+
};
42+
43+
ipc1: &cpuapp_cpurad_ipc_b {
44+
status = "okay";
45+
mbox-names = "tx", "rx";
46+
tx-region = <&cpurad_cpuapp_ipc_shm_b>;
47+
rx-region = <&cpuapp_cpurad_ipc_shm_b>;
48+
tx-blocks = <32>;
49+
rx-blocks = <32>;
50+
};

samples/subsys/ipc/ipc_service/multi_endpoint/sample.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ tests:
1717
platform_allow:
1818
- nrf5340dk/nrf5340/cpuapp
1919
- nrf5340bsim/nrf5340/cpuapp
20+
- nrf54h20dk/nrf54h20/cpuapp
2021
integration_platforms:
2122
- nrf5340dk/nrf5340/cpuapp
2223
- nrf5340bsim/nrf5340/cpuapp
24+
- nrf54h20dk/nrf54h20/cpuapp
2325
tags: ipc
2426
sysbuild: true
2527
sample.ipc.multi_endpoint.icbmsg:

samples/subsys/ipc/ipc_service/multi_endpoint/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ static void ipc1_entry(void *dummy0, void *dummy1, void *dummy2)
228228
return;
229229
}
230230

231+
printf("Waiting for bind\n");
231232
k_sem_take(&ipc1_bound_sem, K_FOREVER);
232233

233234
/*

0 commit comments

Comments
 (0)