Hi Vane,
Sorry for the long pause. I was able to use the code that you had provided (thanks a ton for that) and my bootloader is jumping to the application address (0x00500000). In the application I am blinking an LED in a while loop and it is executing properly. However, now there is a new issue:
When I added UART callback in my application code, along with the blinking LED, it works fine when I am testing it by flashing it into my board using Design Studio. However when I flash it through my bootloader and jump to the application, the LED blinks, however, the UART callback is not triggered. I suspect that the IVT is not being initialized properly and thus the UART callback is not working.
Following is my jump to application code: [Using RTD 2.0.0]
void Jump(uint32 address_location){
uint32 ADDR_APP = address_location;
Intrrupt_DeInit();
__asm("cpsid i");
S32_SCB->VTOR =ADDR_APP;
__asm("ldr r0, =0x00500000");
__asm("msr msp, r0");
func = *(uint32 volatile *)(ADDR_APP + 0xC);
func = *(uint32 volatile *)(((uint32)func) + 0x4);
func = (((uint32)func) & 0xFFFFFFFEU | 1U);
(* (void (*) (void)) func)();
}
My application linker file is set to start at 0x00500000. This is the only change I have made in the application project (the one with LED and UART). I have not made any changes to the startup code.
Any pointers will be really appreciated. Been at it for almost a week now. This is the only blocking point in my application