Good day
I would like to increase the size of the SRAM_DTC in my MCUXpresso project. I am using NXP's RT1064 EVK.
The reason I would like to increase this is because I get the following error when compiling my code: "region SRAM_DTC overflowed by 13664 bytes". I believe my stack is too large to fit into the default 128kB that is allocated for DTC.
After some searching, I found this post https://community.nxp.com/t5/i-MX-RT/How-to-modify-the-default-ITCM-DTCM-OCRAM-memory-allocations-fo... . However, I am new to embedded systems, so this is a very advanced topic for me. I also tried reading the application note AN12077 (Using the i.MX RT FlexRAM), but I don't understand the 'demonstration' part, so this wasn't particularly helpful.
From the above reading, I learned that the FlexRAM consists of 16 banks of 32kB. By default, 8 banks are for OCRAM and both ITC and DTC get 4 banks. I was thinking I could simply re-allocate one of the banks from ITC to DTC, so that my project's stack would not overflow (5 banks for DTC and 3 for ITC). However, I'm not sure if I can simply do this - is ITC and DTC memory exactly the same apart from their software configuration? Or do they differ in their hardware?
I tried looking at the evkmimxrt1064_flexram_ram_allocate SDK example, but it seems this is more for using the OCRAM. I know I *can* use the OCRAM, but I also know it is slower than the TC memories (from AN12077). My project is a real-time application, so I would like to avoid slower accesses as far as possible.
Could someone please explain to me how I can increase the size of the SRAM_DTC? I tried increasing the size in Project properties -> C/C++ Build -> MCU Settings, but this only 'fixes' the linking error and causes a hard fault when I try to debug the program.
Thank you in advance.