Question
[STM32L476] CubeMX generated project ends up in inf loop.
Posted on February 20, 2016 at 01:33
There is bug in linker script file generated by CubeMX for AC6 IDE. MCU ends up in infinite loop, I believe it has to do with incorrect SRAM memory areas as there are two banks on L4 of 96K and 32K, there are also other issues which i didn't track so far as I swapped linker file to the default one generated by Eclipse ARM Project without digging much into this issue.
Edit: Problem is in stack origin and SRAM mapping. Stack issue can be easily fixed with:__stack = ORIGIN(RAM) + LENGTH(RAM); /* end of RAM */
_estack = __stack;
Rest is to fix memory mapping of SRAM2 and change length of SRAM1 from 128K to 96K