AnsweredAssumed Answered

STM32L476VGT6 STM32CubeMX RAM linker script bug

Question asked by sanchez.luis on Mar 9, 2016
Latest reply on Oct 7, 2016 by STM32Cube-T
The linker script after code generation con STM32CubeMx has a bug with the RAM size.

STM32L476VGT6 has 128Kb of ram but splitted in 2 banks (96k + 32k)





    </colgroup>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
Buggy Linker Script generated by STM32CubeMxCorrected Linker Script
/* Entry Point *//* Entry Point */
ENTRY(Reset_Handler)ENTRY(Reset_Handler)
/* Highest address of the user mode stack *//* Highest address of the user mode stack */
_estack = 0x20020000;    /* end of RAM */_estack = 0x20018000;    /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM *//* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x400;      /* required amount of heap  */_Min_Heap_Size = 0x400;      /* required amount of heap  */
_Min_Stack_Size = 0x200; /* required amount of stack */_Min_Stack_Size = 0x200; /* required amount of stack */
/* Specify the memory areas *//* Specify the memory areas */
MEMORYMEMORY
{{
FLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 1024KFLASH (rx)      : ORIGIN = 0x8000000, LENGTH = 1024K
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 128KRAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 96K
}}

Outcomes