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 --- spec/build/bsps/arm/imxrt/linkcmdsmemory.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'spec/build/bsps/arm/imxrt/linkcmdsmemory.yml') diff --git a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml index 86dc37c3bd..3f7885c589 100644 --- a/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml +++ b/spec/build/bsps/arm/imxrt/linkcmdsmemory.yml @@ -2,9 +2,10 @@ build-type: config-file content: | MEMORY { NULL : ORIGIN = 0x00000000, LENGTH = ${IMXRT_MEMORY_NULL_SIZE:#010x} - ITCM : ORIGIN = ${IMXRT_MEMORY_NULL_SIZE:#010x}, LENGTH = 512k - ${IMXRT_MEMORY_NULL_SIZE:#010x} - DTCM : ORIGIN = 0x20000000, LENGTH = 512k - OCRAM : ORIGIN = 0x20200000, LENGTH = 512k + ITCM : ORIGIN = ${IMXRT_MEMORY_NULL_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_ITCM_SIZE:#010x} - ${IMXRT_MEMORY_NULL_SIZE:#010x} + DTCM : ORIGIN = 0x20000000, LENGTH = ${IMXRT_MEMORY_DTCM_SIZE:#010x} + OCRAM : ORIGIN = 0x20200000, LENGTH = ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} + OCRAM_NOCACHE : ORIGIN = 0x20200000 + ${IMXRT_MEMORY_OCRAM_SIZE:#010x} - ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_OCRAM_NOCACHE_SIZE:#010x} PERIPHERAL : ORIGIN = 0x40000000, LENGTH = 0x20000000 FLEXSPI_CONFIG : ORIGIN = 0x60000000, LENGTH = ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x} FLEXSPI_IVT : ORIGIN = 0x60000000 + ${IMXRT_MEMORY_FLASH_CFG_SIZE:#010x}, LENGTH = ${IMXRT_MEMORY_FLASH_IVT_SIZE:#010x} @@ -30,6 +31,10 @@ content: | imxrt_memory_ocram_end = ORIGIN (OCRAM) + LENGTH (OCRAM); imxrt_memory_ocram_size = LENGTH (OCRAM); + imxrt_memory_ocram_nocache_begin = ORIGIN (OCRAM_NOCACHE); + imxrt_memory_ocram_nocache_end = ORIGIN (OCRAM_NOCACHE) + LENGTH (OCRAM_NOCACHE); + imxrt_memory_ocram_nocache_size = LENGTH (OCRAM_NOCACHE); + imxrt_memory_peripheral_begin = ORIGIN (PERIPHERAL); imxrt_memory_peripheral_end = ORIGIN (PERIPHERAL) + LENGTH (PERIPHERAL); imxrt_memory_peripheral_size = LENGTH (PERIPHERAL); -- cgit v1.2.3