AnsweredAssumed Answered

STM32F405RGTx_FLASH.ld uses unaligned SP

Question asked by Burton.Mark on Jun 1, 2015
Latest reply on Jul 1, 2015 by STM32Cube-T

Hello ST People,

The .ld file that the cube generates for me (STM32F405RGTx_FLASH.ld) contains:

_estack = 0x2001FFFF;    /* end of RAM */

but this makes the initial SP unaligned which I only noticed because some floating point numbers were
not getting printed out correctly (I was using vprintf()). I changed it to the following and floats now print OK.

_estack = 0x20020000;    /* end of RAM */

I believe that ARM require that the stack is 8 byte aligned.

Cheers,

Mark


Outcomes