Dear Shiv,
I write bootloader (with limited memory) which:
a) handle all interrups form NXP (register them in VECTOR_TABLE_NAME)
b) redirect it to main program, for example (i had to compute address of IRQ/Vector table of main program, for example):
void RF_IRQHandler(void)
{
/* Re-direct interrupt, get handler address from application vector table */
asm volatile("ldr r0, =0x207048");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
}
c) in main jump to main program:
if(is_in_app){
/* Load main stack pointer with application stack pointer initial value,
stored at first location of application area */
asm volatile("ldr r0, =0x207000");
asm volatile("ldr r0, [r0]");
asm volatile("mov sp, r0");
/* Load program counter with application reset vector address, located at
second word of application area. */
asm volatile("ldr r0, =0x207004");
asm volatile("ldr r0, [r0]");
asm volatile("mov pc, r0");
}
Main program:
I create interrups in main program normaly
That is all what I rememeber from this project...