Linker script reporting incorrect SRAM size
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.
