How to interpret MEMORY areas in STM32H747XIHX_FLASH.ld file
The H747I-DISCO specs say 2MB Flash and 1MB RAM. From that, I am trying to understand what the start addresses of both areas are.
I see that for both processors (M7 and M4) two .ld files get created:STM32H..._FLASH.ld and STM32..._RAM.ld, for a new STM32 project, with default peripheral settings, generated by CubeIDE 1.1 with CubeMX 5.4
In the FLASH file, I see a MEMORY structure that contains
{
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
}My questions:
1) If 0x08000000 is in fact the start address of FLASH, why is the length only 1024K. Similarly for RAM - if 0x20000000 is the start address, why is the length 128K.
More to the point, if I change the LENGTH values to 2048 and 1024 to correspond to what is supposedly on the board, is that valid, and is that the way to use all memory available?
2) Why is there a separate RAM.ld file, which has completely different values for FLASH and RAM:
MEMORY
{
FLASH (rx) : ORIGIN = 0x24000000, LENGTH = 256K
RAM (xrw) : ORIGIN = 0x24040000, LENGTH = 256K
}I need to want to specify larger heap and stack sizes than the defaults, and in fact want to get close to the maximum possible. But I would like to understand the role of these structures before I just start changing values.
Thanks,