It seems this does point to a problem:
Code:
ITCM: 160 KB 512 KB 31.25%
DTCM: 353 KB 512 KB 68.95%
ITCM (code) and DTCM (prealloc RAM) are in in RAM1 of 512KB. The 1MB of memory is not contiguous into RAM2
For memory layout see:: pjrc.com/store/teensy40.html
calc shows :: 100.2% and 513KB
That leaves negative room ... and the stack will come down.
Some code needs to be marked to stay in flash with FLASHMEM - some or all of a 32KB block until it drops 32KB and shows 128KB in ITCM
Or some RAM buffers need to shrink or move to DMAMEM/RAM2 with malloc.
@luni: --print-memory-usage is cool it works in board.txt on the .ld line. Not as complete for ITCM usage as (windows program) imxrt-size.exe with linker showing:
Code:
Memory region Used Size Region Size %age Used
ITCM: 64 KB 512 KB 12.50%
DTCM: 17216 B 512 KB 3.28%
RAM: 24736 B 512 KB 4.72%
FLASH: 68484 B 7936 KB 0.84%
ERAM: 0 GB 16 MB 0.00%
versus imxrt-size.exe - also showing the Stack room:
Code:
FlexRAM section ITCM+DTCM = 512 KB
Config : aaaaaaaf (DDDDDDDDDDDDDDII)
ITCM : 49720 B (75.87% of 64 KB)
DTCM : 17216 B ( 3.75% of 448 KB)
Available for Stack: 441536
OCRAM: 512KB
DMAMEM: 24736 B ( 4.72% of 512 KB)
Available for Heap: 499552 B (95.28% of 512 KB)
Flash: 68480 B ( 0.84% of 7936 KB)