Skip to content

Commit 90e3650

Browse files
danieldegrassecarlescufi
authored andcommitted
samples: ipc: enable openamp sample for RT1170 EVKB
Enable openamp sample for RT1170 EVKB. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent d5329d1 commit 90e3650

File tree

5 files changed

+88
-1
lines changed

5 files changed

+88
-1
lines changed

samples/subsys/ipc/openamp/Kconfig.sysbuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 NXP
1+
# Copyright 2022-2023 NXP
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

@@ -12,3 +12,4 @@ string
1212
default "v2m_musca_b1_ns" if $(BOARD) = "v2m_musca_b1"
1313
default "mimxrt1170_evk_cm4" if $(BOARD) = "mimxrt1170_evk_cm7"
1414
default "mimxrt1160_evk_cm4" if $(BOARD) = "mimxrt1160_evk_cm7"
15+
default "mimxrt1170_evkb_cm4" if $(BOARD) = "mimxrt1170_evkb_cm7"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#
2+
# Copyright 2023, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
CONFIG_INCLUDE_REMOTE_DIR=y
7+
CONFIG_SECOND_CORE_MCUX=y
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright 2023 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,ipc_shm = &ocram2_overlay;
10+
};
11+
12+
/* OpenAMP fails with full 512K OCRAM2 memory region as shared memory.
13+
* Define a subset of the OCRAM2 region for demo to use
14+
* Note that shared memory must have specific MPU attributes set.
15+
*/
16+
ocram2_overlay: memory@202c0000{
17+
compatible = "zephyr,memory-region", "mmio-sram";
18+
reg = <0x202c0000 DT_SIZE_K(16)>;
19+
zephyr,memory-region="OCRAM2_OVERLAY";
20+
zephyr,memory-region-mpu = "IO";
21+
};
22+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Copyright 2023, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
CONFIG_BUILD_OUTPUT_INFO_HEADER=y
7+
CONFIG_BUILD_OUTPUT_HEX=y
8+
CONFIG_SECOND_CORE_MCUX=y
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright 2023 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
/* Switch to lpuart2, since primary core uses lpuart1 */
9+
chosen {
10+
zephyr,flash = &ocram;
11+
zephyr,console = &lpuart2;
12+
zephyr,shell-uart = &lpuart2;
13+
zephyr,ipc_shm = &ocram2_overlay;
14+
};
15+
16+
soc {
17+
/delete-node/ gpt@400f0000;
18+
19+
/* Replace GPT2 with another GPT kernel timer */
20+
gpt2_hw_timer:gpt@400f0000 {
21+
compatible = "nxp,gpt-hw-timer";
22+
reg = <0x400f0000 0x4000>;
23+
interrupts = <120 0>;
24+
status = "okay";
25+
};
26+
};
27+
28+
/* OpenAMP fails with full 512K OCRAM2 memory region as shared memory.
29+
* Define a subset of the OCRAM2 region for demo to use
30+
* Note that shared memory must have specific MPU attributes set
31+
*/
32+
ocram2_overlay: memory@202c0000 {
33+
compatible = "zephyr,memory-region", "mmio-sram";
34+
reg = <0x202c0000 DT_SIZE_K(16)>;
35+
zephyr,memory-region="OCRAM2_OVERLAY";
36+
zephyr,memory-region-mpu = "IO";
37+
};
38+
};
39+
40+
/* Enable secondary LPUART */
41+
&lpuart2 {
42+
status = "okay";
43+
current-speed = <115200>;
44+
};
45+
46+
/* Disable primary GPT timer */
47+
&gpt_hw_timer {
48+
status = "disabled";
49+
};

0 commit comments

Comments
 (0)