Change size of ITCM in NXP iMXRT1062 #71455
-
I am working on adding some DSP function to a project using NXP iMXRT1062 processor and after enabling CMSIS_DSP and switching to NEWLIBC I am getting out of space errors in rodata. This project doesn't have any flash but uses the ITCM region in flexram as the FLASH region for zephyr. The initial baseline configuration shown in devicetree is 128 killobytes for ITCM. I would like to increase this by at least 64 KB. Is it enough to only change the devicetree or do I need to change the flexram regions? This NXP community post suggests it is necessary to update the reset startup routine to re-configure the flexram regions: Unfortunately this question was not answered and the solution remains a mystery. @DerekSnell, I would love your suggestions if you have time.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @asteriskSF , NXP provides appnote AN12077 for reconfiguring the FlexRAM. We recommend reviewing that appnote to understand the concerns when dynamically changing the FlexRAM config in the application. It is not recommended to execute from any FlexRAM when changing the FlexRAM config. That will be a challenge for you since you are executing from ITCM. Ideally, you would configure the FlexRAM before any access to the FlexRAM. That includes execution from ITCM, initializing any RAM or stack in FlexRAM, or before the copydown to RAM by the runtime library. Since you are executing from ITCM, it’s probably best to configure the FlexRAM before the app starts execution. You could program the fuses to do that. You mention using the sdphost and blhost tools to load the app in ITCM. Without using fuses, I do not know if those tools enable configuring the FlexRAM first, but perhaps that is an option. Another option could be to load a small executable in the non-FlexRAM OCRAM, boot to that with blhost, configure the FlexRAM, and then jump to the main app in ITCM. As for Zephyr, you would use the devicetree to configure the FlexRAM and the sizes of the FlexRAM memories. I happen to be working on an RT1060 application that needs more DTCM than the default size. Below is my DTS overlay I use to configure the FlexRAM memories.
|
Beta Was this translation helpful? Give feedback.
Hi @asteriskSF ,
NXP provides appnote AN12077 for reconfiguring the FlexRAM. We recommend reviewing that appnote to understand the concerns when dynamically changing the FlexRAM config in the application. It is not recommended to execute from any FlexRAM when changing the FlexRAM config. That will be a challenge for you since you are executing from ITCM. Ideally, you would configure the FlexRAM before any access to the FlexRAM. That includes execution from ITCM, initializing any RAM or stack in FlexRAM, or before the copydown to RAM by the runtime library.
Since you are executing from ITCM, it’s probably best to configure the FlexRAM before the app starts execution. You could program the …