AnsweredAssumed Answered

Stack length wrong in Atollic linker file

Question asked by Giampaolo Pantaleoni on Mar 23, 2018
Latest reply on Mar 23, 2018 by Andrew Neil


I had a problem (now solved) of hard fault on STM32F303K8 MCU using TrueSTUIDIO V 9.0.0.

The cause was the wrong linker file.

In the file generated by TrueSTUDIO for STM32F303K8, the stack was allocated to addres 0x20004000.
This memory location is in a reserved area. At the first access to the stack after reset, a hard fault was generated.
The data sheet of the STM32F303K8 indicates that ram ends at 0x20003000.
With the stack correctly located at this value everything works correctly.
Attached the right and the wrong files.