8 years, 8 months ago.

INITIAL_SP in RTX_CM_lib.h

I want to know meaning of this varible: INITIAL_SP

It is defined like:

  1. elif defined(TARGET_STM32L152RE)
  2. define INITIAL_SP (0x20014000UL)

And, if use an TARGET_STM32L152RC here, then what value should it be?

1 Answer

8 years, 8 months ago.

It is the initial value of the stackpointer. Which is in the mbed memory model equal to the top of your RAM memory: If your device has the same amount of SRAM memory it will be the same. Otherwise you need to check in either the scatter file or the manual for the top of the SRAM.

Accepted Answer

Thanks minion :-)

posted by Martin Kojtal 07 Sep 2015