seems the linker picks the addresses - hopefully reading the manual not needed.
Seems a rewrite/reorder of this:
Code:
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_heap_end = ORIGIN(RAM) + LENGTH(RAM);
_itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFF) >> 15;
_flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
_estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);
Perhaps with ref to prior post as - this allowing 32KB for stack - that 15 could be smaller if small heap is good enough to protect the stack as needed.
Does this work? for: _heap_start and _heap_end::
Code:
_itcm_block_count = (SIZEOF(.text.itcm) + 0x7FFF) >> 15;
_flexram_bank_config = 0xAAAAAAAA | ((1 << (_itcm_block_count * 2)) - 1);
_estack = ORIGIN(DTCM) + ((16 - _itcm_block_count) << 15);
_heap_start = ORIGIN(DTCM) + ( _itcm_block_count << 15);
_heap_end = ORIGIN(DTCM) + ((15 - _itcm_block_count) << 15);