cancel
Showing results for 
Search instead for 
Did you mean: 

Linker script reporting incorrect SRAM size

SteveM732
Associate II

The linker scripts generated by MX for the STM32U5G9xx devices are reporting 2528 Kbytes of RAM. These are 3MB devices so I would expect there to be 3008 Kbytes of RAM when ECC is disabled.

 

MX output to STM32U5g9xx_FLASH.ld:

/*
** Abstract : Linker script for STM32U5G9xJ Device from STM32U5 series
** 4096Kbytes FLASH
** 2528Kbytes RAM
*/



/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 2496K
SRAM4 (xrw) : ORIGIN = 0x28000000, LENGTH = 16K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 4096K
}

 

See Table 2 and page 27 of https://www.st.com/resource/en/datasheet/stm32u5g9vj.pdf

 

On a somewhat related note, MX in Linux wasn't generating the linker scripts so I had to use a Windows computer to generate them.

 

5 REPLIES 5
STTwo-32
ST Employee

Hello @SteveM732 

Are you using the last version of the STM32CubeMX (V6.14.0). If so, could you please add a .ioc file that reproduce the same behavior (based on the STM32CubeMX V6.14.0). I'm not able to reproduce it on my side:

STTwo32_0-1744380346796.png

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Yes, it is 6.14.0.

Hello @SteveM732 

I've opened a project based on your .ioc file on the STM32CubeIDE V1.18.0 and I've been able to find the correct RAM value. Could you send me a screenshot of the error with the last CubeIDE and MX versions.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

SteveM732_0-1744393047206.png

 

I've seen the same behavior, and I've reported to the concerned team for correction on the future (under internal ticket number 207481). Thank you for reporting this.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.