cancel
Showing results for 
Search instead for 
Did you mean: 

Linker script files generated by STM32CubeIDE don't use entire RAM for STM32H745

M_Deloizy
Associate II

When generating code, files STM32H745ZITX_FLASH.ld are updated for CM4 and CM7

For CM4, I found :

/* Specify the memory areas */

MEMORY

{

FLASH (rx)     : ORIGIN = 0x08100000, LENGTH = 1024K

RAM (xrw)     : ORIGIN = 0x10000000, LENGTH = 288K

}

and for CM7 :

/* Specify the memory areas */

MEMORY

{

FLASH (rx)     : ORIGIN = 0x08000000, LENGTH = 1024K

RAM (xrw)     : ORIGIN = 0x20000000, LENGTH = 128K

ITCMRAM (xrw)     : ORIGIN = 0x00000000, LENGTH = 64K

}

Available RAM is 1M for such a device, so the whole space is not used.

I can modify the script files, but it isn't a good issue because these files are re-generated automatically when my project is evolving.

Could the IDE allow to define memory spaces ? (and well defined by default)

2 REPLIES 2
BSpoe.1
Associate III

Is there anything new for this issue?

Generally one needs ​to address these things directly as they involve complex interactions.

Modify the linker scripts to suit your memory floorplan.

Add code in startup.s to enable the memory clocks and unpack the load regions and statics you've described in the linker script.

If you use the heap you'll need to check that the _sbrk allocator understands the memory map and the heap / stack relationship properly.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..