STM32H743 Stack and Heap
Hi,
I have my scatter file defined thus:
// Scatter file
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM2 0x24000000 0x00080000 { ; RW data
.ANY (+RW +ZI)
}
RW_DMARxDscrTab 0x30040000 0x60 {
*(.RxDecripSection)
}
RW_DMATxDscrTab 0x30040060 0x140 {
*(.TxDecripSection)
}
RW_Rx_Buffb 0x30040200 0x1800 {
*(.RxArraySection)
}
}
The startup file defines the following:
// startup_xx.asm
Stack_Size EQU 0x8000 (32,768 -> 32k)
Heap_Size EQU 0x0F800 (63,488 -> 62k)
As per the RM;
RAM
------------------------------------------
0x20000000 - 0x2001FFFF DTCM-RAM <-- Stack & Heap is here (Size: 0x1ffff = 131071, 128kB)
0x20020000 - 0x23FFFFFF Reserved
0x24000000 - 0x2407FFFF AXI SRAM <-- Current IRAM2: (Size: 0x7ffff, 524287, 511kB)
0x24080000 - 0x2FFFFFFF Reserved
0x30000000 - 0x3001FFFF SRAM1 <-- (Size: 0x1ffff, 131,071, 128kB)
0x30020000 - 0x3003FFFF SRAM2 <-- (Size: 0x1ffff, 131,071, 128kB)
0x30040000 - 0x30047FFF SRAM3 <-- Current Rx/Tx Descriptors, Rx buffers (Size: 32767, 128kB)
0x30048000 - 0x37FFFFFF Reserved
0x38000000 - 0x3800FFFF SRAM4 <-- (Size: 0xffff, 65535, 64kB)
0x38010000 - 0x387FFFFF Reserved
0x38800000 - 0x38800FFF Backup SRAM <-- NVRAM (Size: 0xfff, 4095, 4kB)
0x38801000 - 0x3FFFFFFF Reserved
As per the RM, the stack and heap are located @0x20000000 (IRAM1), Size=128k
According to my scatter file:
IRAM2 (0x24000000) is used
So, does that really mean that the Stack and heap are now in IRAM2, Size=511k ?
Can someone clarify ?
Thanks,
Manu
