Skip to content

Commit 1ff8fb9

Browse files
danieldegrassecarlescufi
authored andcommitted
samples: ipc: openamp: Enable openamp sample for iMX.RT1160 EVK
Enable the openamp sample for RT1160EVK. CM4 core has a custom DTS overlay to use LPUART2 for console information, and use a secondary GPT timer for the system tick. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
1 parent b09f2b8 commit 1ff8fb9

File tree

5 files changed

+76
-0
lines changed

5 files changed

+76
-0
lines changed

samples/subsys/ipc/openamp/Kconfig.sysbuild

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

0 commit comments

Comments
 (0)