Hi,
I have to execute two firmware images from my boot code. The images are allocated in flash memory at addresses 0x4000 and 0x084000. To execute these images currently I am doing as shown below,
if(st%2==0)
{
asm(" movs r0, #0x00004000");
asm(" ldr sp, [r0]");
asm(" ldr pc, [r0, #4]"); // Jump to starting address + 4
asm(" bx r0");
}
else
{
asm(" movs r0, #0x00084000");
asm(" ldr sp, [r0]");
asm(" ldr pc, [r0, #4]"); // Jump to starting address + 4
asm(" bx r0");
}
Here st is a variable incremented just for testing purpose. This code is working properly. But to execute these images, I have to set the application vector address of the images to the corresponding flash memory address in the cmd file of the image. Can I execute the image from boot code without setting application vector address of the image in its cmd file? Is there any method to fetch the application vector address of the image from the boot code?
Regards
Sandra