AnsweredAssumed Answered

Bootloader + Two applications

Question asked by Santhosh KM on Sep 7, 2017
Latest reply on Sep 18, 2017 by Santhosh KM


I have to download second application and enter second application from the first application.


Bootloader to First application jump is happening and working fine.

I have problem to jump to second application from the first application ( downloaded second application from the bootloader same as first application) using the same approach as jump is made from bootloader to first application.


Bootloader -> jump to first application -> Jump to Second application.  I am getting this error


The stack pointer for stack 'CSTACK' (currently 0xF000FB64) is outside the stack range (0x2000DFC0 to 0x2000FFC0) and followed by first application restarts and enters booloader


I have this changes in the linker file ( .icf file)


define symbol __ICFEDIT_intvec_start__ = 0x08000000;   f

define symbol __ICFEDIT_size_cstack__ = 0x4000;
define symbol __ICFEDIT_size_heap__ = 0x200;

First application:

define symbol __ICFEDIT_intvec_start__ = 0x08010000;   for first application

define symbol __ICFEDIT_size_cstack__ = 0x4000;
define symbol __ICFEDIT_size_heap__ = 0x200;

Second application: 

define symbol __ICFEDIT_intvec_start__ = 0x08020000;   for second application 

define symbol __ICFEDIT_size_cstack__ = 0x6000;
define symbol __ICFEDIT_size_heap__ = 0x200;


Using this code to jump to second application, used same from bootloader to first application:

JumpAddress = *(__IO uint32_t*) (ApplicationAddress + 4);
SCB->VTOR = ApplicationAddress;
Jump_To_Application = (pFunction) JumpAddress;
__set_MSP(*(__IO uint32_t*) ApplicationAddress);


Any help is welcome, I think I have problem with the linker settings