Hi,
I'm using MCUXpress IDE with the MIMXRT1010-EVK.
I want to increase the size of the OCRAM. The ITCM and DTCM can be somewhat smaller.
I did fill in new sizes in the Properties of the project at C/C++ Build -> MCU Settings.
But the application crashes or values are not accepted.
See the attached picture.
The top-left MCU-settings in the picture are the original setting.
I decreased the ITCM and DTCM sizes and increase the OCRAM as in the top-right settings in the picture. The compiler/linker seems to accept this but when running the application, it crashes. The function HardFault_Handler(void) is called even before the first breakpoint in main.
Note that I decreased the RAM3 base address because it may not overlap RAM4. And increasing the RAM4 base address results in the error that the size is 0! See bottom-left in the picture. the strange thing is that the size of RAM4 originally was also 0!
As a test I decreased the ITCM and DTCM sizes without increasing the OCRAM so that no overlap exists. See bottom-right in the picture. This is accepted by the compiler/linker and the code runs.
But off course I want to increase the OCRAM size with 0x8000. How to do this???
PS: Sorry for my oversight, since it has to be an integer power of 2, then 96KB is also not supported, so there is only one option, 128-0-0KB.
Hi,
Thanks for your interest in NXP MIMXRT series!
NXP provides a detailed AN to guide this operation, please refer to it.
https://www.nxp.com/docs/en/application-note/AN12077.pdf
There are a few notes in it, firstly, since the size of the TCM must be an integer power of 2 and the OCRAM must be greater than 64KB. then, if you want to increase the OCRAM, there must be at least one TCM that has a value of 0. Therefore, please choose the configuration that is right for you from the following three options.
Also, if there is a TCM that needs to be 0, then it must be noted:
If the requested ITCM/DTCM size is 0 Bytes, disable the corresponding TCM in
IOMUXC_GPR_GPR16->INIT_xTCM_EN before configuring the size to 0 Bytes in
IOMUXC_GPR_GPR14->CM7_CFGxTCMSZ.
For a more specific guide, see also this post, which is a good place to start: Reallocating the FlexRAM - NXP Community
Best regards,
Gavin