cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE linker, LPTIM, LSI clock.

ax0018
Associate III

1) In the linker script file for the project generated by STM32CubeMX for TrueStudio the highest address of the stack (_estack, end of RAM) is set to 0x20020000 (STM32F407VG)

In the linker script file for the project generated by built-in CubeMx in the STM32CubeIDE the highest address of the stack (_estack) is set to 0x2001ffff (same MCU, same configuration settings).

This results in different initial values of sp register and might result in incorrect operation of sprintf function converting float to string (stack alignment?). Changing _estack value manually to 0x20020000 in the linker script seems to solve the problem.

2) LSI clock for LPTIM cannot be selected using built-in STM32CubeIDE CubeMx GUI (STM32L476RG). After generating the code LSI is not enabled in the clock configuration function. Same settings work perfectly with standalone CubeMx and Keil.

1 REPLY 1

>>In the linker script file for the project generated by built-in CubeMx in the STM32CubeIDE the highest address of the stack (_estack) is set to 0x2001ffff (same MCU, same configuration settings).

This flaw has been pointed out to ST for many years.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..