cancel
Showing results for 
Search instead for 
Did you mean: 

Stack length wrong in Atollic linker file

Giampaolo Pantaleoni
Associate II
Posted on March 23, 2018 at 00:11

Hi,

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.

Giampaolo

#atollic-truestudio #linker-file #stm32f303 #hard-fault
3 REPLIES 3
Andrew Neil
Evangelist III
Posted on March 23, 2018 at 09:30

So when you say, 'Bug

s

on file

s

provided by Atollic TrueSTUDIO' - it's really just 1 bug in 1 file?

It would be more helpful if you changed the title to something specific; eg, 'Stack length wrong in Atollic linker file'

Giampaolo Pantaleoni
Associate II
Posted on March 23, 2018 at 10:25

Hi, 

I completely agree with you, but I don't know how to change the title. 

Giampaolo

Posted on March 23, 2018 at 11:07

There is a gear wheel icon at the top of the thread marked 'Actions' - it's in there:

0690X00000609uaQAA.png