diff --git a/src/link/stm32_flash_g474.ld b/src/link/stm32_flash_g474.ld index c5fcc1d8d..2635809dd 100644 --- a/src/link/stm32_flash_g474.ld +++ b/src/link/stm32_flash_g474.ld @@ -20,9 +20,14 @@ MEMORY SYSTEM_MEMORY (r) : ORIGIN = 0x1FFF0000, LENGTH = 64K - - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K - CCM (xrw) : ORIGIN = 0x20018000, LENGTH = 32K +/* Below are the true lengths for normal and close coupled RAM + * RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K + * CCM (xrw) : ORIGIN = 0x20018000, LENGTH = 32K + * Allow normal RAM overflow to occupy start of CCM, and only reserve 2560 bytes for vector table and stack in CCM + * CCM is aligned to a 512 byte boundary + */ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128512 + CCM (xrw) : ORIGIN = 0x2001F600, LENGTH = 2560 MEMORY_B1 (rx) : ORIGIN = 0x60000000, LENGTH = 0K }