fmu-v6xrt: Add DTCM to heap (#25733)

Move ramvectors from DTCM to ITCM, this seems to better in general.
Also ITCM is marked as RO so is safer anyhow, now that DTCM is fully
unused we add DTCM region of 256kB to memory allocator. Increases usable
memory from 1536kB to 1792kB and decrease system load a bit since DTCM
is faster
This commit is contained in:
Peter van der Perk 2025-10-10 19:46:26 +02:00 committed by GitHub
parent 2fba5b4c1a
commit edc7a2bb80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 9 deletions

View File

@ -78,7 +78,8 @@ CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_I2C=y
CONFIG_I2C_RESET=y
CONFIG_IDLETHREAD_STACKSIZE=2048
CONFIG_IMXRT_DTCM=0
CONFIG_IMXRT_DTCM=256
CONFIG_IMXRT_DTCM_HEAP=y
CONFIG_IMXRT_EDMA=y
CONFIG_IMXRT_EDMA_EDBG=y
CONFIG_IMXRT_EDMA_ELINK=y
@ -104,7 +105,7 @@ CONFIG_IMXRT_GPIO6_0_15_IRQ=y
CONFIG_IMXRT_GPIO6_16_31_IRQ=y
CONFIG_IMXRT_GPIO_IRQ=y
CONFIG_IMXRT_INIT_FLEXRAM=y
CONFIG_IMXRT_ITCM=0
CONFIG_IMXRT_ITCM=256
CONFIG_IMXRT_LPI2C1=y
CONFIG_IMXRT_LPI2C2=y
CONFIG_IMXRT_LPI2C3=y
@ -190,6 +191,7 @@ CONFIG_MEMSET_64BIT=y
CONFIG_MEMSET_OPTSPEED=y
CONFIG_MMCSD=y
CONFIG_MMCSD_SDIO=y
CONFIG_MM_REGIONS=2
CONFIG_MTD=y
CONFIG_MTD_BYTE_WRITE=y
CONFIG_MTD_PARTITION=y

View File

@ -35,7 +35,7 @@
MEMORY
{
flash (rx) : ORIGIN = 0x30020000, LENGTH = 4M-128K /* We have 64M but we do not want to wait to program it all */
sram (rwx) : ORIGIN = 0x20240000, LENGTH = 2M-256k-512k
sram (rwx) : ORIGIN = 0x20240000, LENGTH = 2M-256k
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 256K /* TODO FlexRAM partition */
dtcm (rwx) : ORIGIN = 0x20000000, LENGTH = 256K
}
@ -83,6 +83,7 @@ SECTIONS
_sitcmfuncs = ABSOLUTE(.);
FILL(0xFF)
. = 0x40 ;
*(.ram_vectors)
INCLUDE "itcm_static_functions.ld"
INCLUDE "itcm_functions_includes.ld"
. = ALIGN(8);
@ -91,12 +92,6 @@ SECTIONS
_fitcmfuncs = LOADADDR(.itcmfunc);
/* The RAM vector table (if present) should lie at the beginning of SRAM */
.ram_vectors (COPY) : {
*(.ram_vectors)
} > dtcm
.text : ALIGN(4)
{
_stext = ABSOLUTE(.);