Dear, My friend,
I ported the APP based on free RTOS and found that the RAM space distribution was as follows after compilation:
64KB DTCM 296%,
64KB ITCM 0%、
128KBOCRAM 0%
f:/install/mcuxpressoide_11.1.1_3241/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: evkmimxrt1020_freertosApp.axf section `.bss' will not fit in region `SRAM_DTC'
f:/install/mcuxpressoide_11.1.1_3241/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.1.0.202001081728/tools/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: region `SRAM_DTC' overflowed by 120384 bytes
collect2.exe: error: ld returned 1 exit status Error 1
How to change DTCM size to 128KB( MCUXpresso) ?
I press the following operate to adjust and modify DTCM, can't run.How do I change the code, is there a routine?
thank you!
一、ported here
1、DTCM mem resize to 0x20000
OCRAM size resize to 0x10000
2、add here:startup_mimxrt1021.c -->
attribute ((section(".after_vectors.reset"))) void ResetISR(void) -->
SystemInit();//add here函数开始的位置添加
//reset dtcm to 6 blank,itcm to 1 blank,otcm to 1 blank
IOMUXC_GPR->GPR17 = 0xfaa5; //分配相关的blank
//dtcm config dtcm分配后的大小
IOMUXC_GPR->GPR14 &= ~IOMUXC_GPR_GPR14_CM7_CFGDTCMSZ_MASK;
IOMUXC_GPR->GPR14 |= IOMUXC_GPR_GPR14_CM7_CFGDTCMSZ(8);
IOMUXC_GPR->GPR16 |= IOMUXC_GPR_GPR16_INIT_DTCM_EN_MASK;
//itcm config itcm分配后的大小
IOMUXC_GPR->GPR14 &= ~IOMUXC_GPR_GPR14_CM7_CFGITCMSZ_MASK;
IOMUXC_GPR->GPR14 |= IOMUXC_GPR_GPR14_CM7_CFGITCMSZ(7);
IOMUXC_GPR->GPR16 |= IOMUXC_GPR_GPR16_INIT_ITCM_EN_MASK;
//select ram allocate source from FLEXRAM_BANK_CFG
IOMUXC_GPR->GPR16 &=
~IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL_MASK;
IOMUXC_GPR->GPR16 |= IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL(1U);
Hello,
Just to be sure that I completely understood your question, you want to know how to reallocate the FlexRAM during the startup, am I correct? I would appreciate if you could please post your question and reply in English.
Regards,
Victor