From 691fec407a0faae379cab23679ec8456ace9fb06 Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Tue, 11 May 2021 13:46:56 +0200 Subject: bsps/imxrt: Fix OCRAM, ITCM and DTCM sizes The sizes are configurable via fuses or per software via some registers. At the moment the registers are not changed. Changing the registers destroys data stored in the RAM areas (like application code or data). So either the fuses or some bootloader should be used to set them before the application starts. This also adds an OCRAM only linker command file. Update #4180 --- bsps/arm/imxrt/start/mpu-config.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bsps/arm/imxrt/start/mpu-config.c') diff --git a/bsps/arm/imxrt/start/mpu-config.c b/bsps/arm/imxrt/start/mpu-config.c index 31c39bc16f..683b26d45b 100644 --- a/bsps/arm/imxrt/start/mpu-config.c +++ b/bsps/arm/imxrt/start/mpu-config.c @@ -55,6 +55,12 @@ BSP_START_DATA_SECTION const ARMV7M_MPU_Region_config .rasr = ARMV7M_MPU_RASR_AP(0x3) | ARMV7M_MPU_RASR_TEX(0x2) | ARMV7M_MPU_RASR_ENABLE, + }, { + .begin = imxrt_memory_ocram_nocache_begin, + .end = imxrt_memory_ocram_nocache_end, + .rasr = ARMV7M_MPU_RASR_AP(0x3) + | ARMV7M_MPU_RASR_TEX(0x2) + | ARMV7M_MPU_RASR_ENABLE, }, { .begin = imxrt_memory_peripheral_begin, .end = imxrt_memory_peripheral_end, -- cgit v1.2.3