Skip to main content
M_Deloizy
Associate II
November 5, 2019
Question

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

  • November 5, 2019
  • 1 reply
  • 2597 views

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)

This topic has been closed for replies.

1 reply

BSpoe.1
Associate III
May 26, 2020

Is there anything new for this issue?

Tesla DeLorean
Guru
May 26, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..