Skip to content

Commit 2cb0a07

Browse files
jaz1-nordicnashif
authored andcommitted
samples: ipc: icmsg: Align icmsg sample for nRF54L15
Add nRF54L15 APP and FLPR cores to icmsg sample application. Signed-off-by: Jakub Zymelka <[email protected]>
1 parent bd40190 commit 2cb0a07

File tree

6 files changed

+99
-6
lines changed

6 files changed

+99
-6
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ cmake_minimum_required(VERSION 3.20.0)
99
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
1010

1111
if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP AND
12-
NOT CONFIG_BOARD_STM32H747I_DISCO)
12+
NOT CONFIG_BOARD_STM32H747I_DISCO AND
13+
NOT CONFIG_BOARD_NRF54L15PDK_NRF54L15_CPUAPP)
1314
message(FATAL_ERROR "${BOARD} is not supported for this sample")
1415
endif()
1516

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ source "share/sysbuild/Kconfig"
77
config REMOTE_BOARD
88
string
99
default "nrf5340dk/nrf5340/cpunet" if $(BOARD) = "nrf5340dk"
10+
default "nrf54l15pdk/nrf54l15/cpuflpr" if $(BOARD) = "nrf54l15pdk"
1011
default "stm32h747i_disco/stm32h747xx/m4" if $(BOARD) = "stm32h747i_disco"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
soc {
9+
reserved-memory {
10+
#address-cells = <1>;
11+
#size-cells = <1>;
12+
13+
sram_rx: memory@20018000 {
14+
reg = <0x20018000 0x0800>;
15+
};
16+
17+
sram_tx: memory@20020000 {
18+
reg = <0x20020000 0x0800>;
19+
};
20+
};
21+
};
22+
23+
ipc {
24+
ipc0: ipc0 {
25+
compatible = "zephyr,ipc-icmsg";
26+
tx-region = <&sram_tx>;
27+
rx-region = <&sram_rx>;
28+
mboxes = <&cpuapp_vevif_rx 15>, <&cpuapp_vevif_tx 16>;
29+
mbox-names = "rx", "tx";
30+
status = "okay";
31+
};
32+
};
33+
};
34+
35+
&cpuapp_vevif_rx {
36+
status = "okay";
37+
};
38+
39+
&cpuapp_vevif_tx {
40+
status = "okay";
41+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
soc {
9+
reserved-memory {
10+
#address-cells = <1>;
11+
#size-cells = <1>;
12+
13+
sram_tx: memory@20018000 {
14+
reg = <0x20018000 0x0800>;
15+
};
16+
17+
sram_rx: memory@20020000 {
18+
reg = <0x20020000 0x0800>;
19+
};
20+
};
21+
};
22+
23+
ipc {
24+
ipc0: ipc0 {
25+
compatible = "zephyr,ipc-icmsg";
26+
tx-region = <&sram_tx>;
27+
rx-region = <&sram_rx>;
28+
mboxes = <&cpuflpr_vevif_rx 16>, <&cpuflpr_vevif_tx 15>;
29+
mbox-names = "rx", "tx";
30+
status = "okay";
31+
};
32+
};
33+
};
34+
35+
&cpuflpr_vevif_rx {
36+
status = "okay";
37+
};
38+
39+
&cpuflpr_vevif_tx {
40+
status = "okay";
41+
};

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ tests:
1818
- "host: Sent"
1919
- "host: Received"
2020
- "host: IPC-service HOST demo ended"
21+
sample.ipc.icmsg.nrf54l15:
22+
platform_allow: nrf54l15pdk/nrf54l15/cpuapp
23+
integration_platforms:
24+
- nrf54l15pdk/nrf54l15/cpuapp
25+
tags: ipc
26+
extra_args:
27+
icmsg_SNIPPET=nordic-flpr
28+
sysbuild: true
29+
harness: remote

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#include <zephyr/device.h>
99

1010
#include <zephyr/ipc/ipc_service.h>
11-
#if CONFIG_NET_CORE_BOARD
11+
#if defined(CONFIG_SOC_NRF5340_CPUAPP)
1212
#include <nrf53_cpunet_mgmt.h>
13-
#endif /* CONFIG_NET_CORE_BOARD */
13+
#endif
1414
#include <string.h>
1515

1616
#include "common.h"
@@ -134,12 +134,12 @@ int main(void)
134134
return ret;
135135
}
136136

137-
LOG_INF("Wait 500ms. Let net core finish its sends");
137+
LOG_INF("Wait 500ms. Let remote core finish its sends");
138138
k_msleep(500);
139139

140140
LOG_INF("Received %zu [Bytes] in total", received);
141141

142-
#if CONFIG_NET_CORE_BOARD
142+
#if defined(CONFIG_SOC_NRF5340_CPUAPP)
143143
LOG_INF("Stop network core");
144144
nrf53_cpunet_enable(false);
145145

@@ -178,7 +178,7 @@ int main(void)
178178
LOG_ERR("send_for_time() failure");
179179
return ret;
180180
}
181-
#endif /* CONFIG_NET_CORE_BOARD */
181+
#endif /* CONFIG_SOC_NRF5340_CPUAPP */
182182

183183
LOG_INF("IPC-service HOST demo ended");
184184

0 commit comments

Comments
 (0)