Hi Team,
Can you please share the solution for this issue. I am trying to jump from boootloader to application. But it is not working.
This is the Linker file of Bootloader .
MEMORY
{
ITCM (RWX) : ORIGIN = 0x00000000, LENGTH = 0x8000
PFLASH_BOOT (RX) : ORIGIN = 0x00400000, LENGTH = 0xA000
FW_VER_CONFIG (RX) : ORIGIN = 0x00419FE0, LENGTH = 0x20
/* Configuration Manager 1Kb */
CONFIG (RX) : ORIGIN = 0x0041A000, LENGTH = 0x400
PFLASH_BAF (RX) : ORIGIN = 0x004F4000, LENGTH = 0xC000
DFLASH (RX) : ORIGIN = 0x10000000, LENGTH = 0x10000
DTCM (RW) : ORIGIN = 0x20000000, LENGTH = 0x10000
SRAM0_STDBY (RW) : ORIGIN = 0x20400000, LENGTH = 0x2000
SRAM (RW) : ORIGIN = 0x20402000, LENGTH = 0x6000
}
This is the Linker file of application
MEMORY
{
ITCM (RWX) : ORIGIN = 0x00000000, LENGTH = 0x8000
PFLASH_APP (RX) : ORIGIN = 0x00480000, LENGTH = 0xFFE0
FW_VER_CONFIG (RX) : ORIGIN = 0x0048FFE0, LENGTH = 0x20
CONFIG (RX) : ORIGIN = 0x00490000, LENGTH = 0x400
PFLASH_BAF (RX) : ORIGIN = 0x004F4000, LENGTH = 0xC000
DFLASH (RX) : ORIGIN = 0x10000000, LENGTH = 0x10000
DTCM (RW) : ORIGIN = 0x20000000, LENGTH = 0x10000
SRAM0_STDBY (RW) : ORIGIN = 0x20400000, LENGTH = 0x2000
SRAM (RW) : ORIGIN = 0x20402000, LENGTH = 0x6000
}
I am using the following code to jump to application.
__disable_irq();
SCB->VTOR = 0x00480000;
func = *(uint32_t volatile *)(0x00480000 + 0xC);
func = *(uint32_t volatile *)(((uint32_t)func) + 0x4);
func = ((((uint32_t)func) & 0xFFFFFFFFU)); // Reset_Handler+1 --> required to avoid hard fault
(* (void (*) (void)) func)();
But jump to application is not happening.
Can you please support me on this.
Thanks
Kiran