Skip to content

Commit be5296e

Browse files
danieldegrassecarlescufi
authored andcommitted
boards: mimxrt1170_evk: add support for loading M4 image from OCRAM
Add support for loading M4 image from OCRAM when running with dual core operation. The M7 core will copy the M4 image from flash into OCRAM, and the M4 core will execute it there. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 63266e4 commit be5296e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

boards/arm/mimxrt1170_evk/Kconfig.defconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,25 @@ config BOARD
1111

1212
choice CODE_LOCATION
1313
default CODE_FLEXSPI if BOARD_MIMXRT1170_EVK_CM7
14+
default CODE_OCRAM if BOARD_MIMXRT1170_EVK_CM4 && SECOND_CORE_MCUX
1415
default CODE_SRAM0 if BOARD_MIMXRT1170_EVK_CM4
1516
endchoice
1617

18+
if SECOND_CORE_MCUX && BOARD_MIMXRT1170_EVK_CM4
19+
20+
config BUILD_OUTPUT_INFO_HEADER
21+
default y
22+
23+
DT_CHOSEN_IMAGE_M4 = nxp,m4-partition
24+
25+
# Adjust the offset of the output image if building for RT11xx SOC
26+
config BUILD_OUTPUT_ADJUST_LMA
27+
default "($(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_M4)) + \
28+
$(dt_node_reg_addr_hex,/soc/spi@400cc000,1)) - \
29+
$(dt_node_reg_addr_hex,/soc/ocram@20200000)"
30+
31+
endif
32+
1733
if DISK_DRIVERS
1834

1935
config IMX_USDHC_DAT3_PWR_TOGGLE

boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm4.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
zephyr,canbus = &flexcan2;
2727
zephyr,flash-controller = &is25wp128;
2828
zephyr,flash = &is25wp128;
29+
nxp,m4-partition = &slot1_partition;
2930
};
3031

3132
sdram0: memory@80000000 {

boards/arm/mimxrt1170_evk/mimxrt1170_evk_cm7.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
zephyr,code-partition = &slot0_partition;
3131
zephyr,display = &lcdif;
3232
zephyr,keyboard-scan = &touch_controller;
33+
zephyr,cpu1-region = &ocram;
3334
};
3435

3536
sdram0: memory@80000000 {

0 commit comments

Comments
 (0)