Hi ,
I am working on KE02 and KL02 bootloader code and i want to have a fixed jump location address in application code. What are the options available to achieve a fixed known jump location in KDS?
Hello ,
Which bootloader do you used ?
If you want change the jump location , at least you need change two place.
On the bootlaoder code ,change the jump address ;
on the application code ,change the linker file , change it from the "jump address" to start.
If you still have question , you can show your code .
Hope it helps
Alice
Hi Alice,
I am using the sample bootloader supplied by the NXP using FC protocol.I have done it in the application code and downloaded it and it is not working..
how to make sure application jump address always remains same from version to version? is there any option?
Hi Alice,
I am using AN2295,Processor MKL02Z32VFM4 and KDS ver.2.0.0..After going through several posts in community and your reply, i found that Jump address(__thumb_startup function) is always located @RELOCATED_VECTORS+4 address. Thanks for that..
I am using the below function to JumpTouser_Application and bootloader is resetting..I am successfully able to download the user application but when i send quit command it is resetting..I am using AN2295,Processor MKL02Z32VFM4 and KDS ver.2.0.0.
void JumpToUserApplication(uint32_t userStartup)
{
SCB_VTOR=RELOCATION_VERTOR_ADDR;
/* set up stack pointer */
__asm("ldr r1, [r0,#0]"); //get the stack pointer value from the program's reset vector
__asm("mov sp, r1"); //copy the value to the stack pointer
__asm("ldr r0, [r0,#4]"); //get the program counter value from the program's reset vector
__asm("blx r0"); //jump to the start address
}
Kindly provide some inputs if the above code is correct??
Thanks in advance,
Girish Kumar
Hello Girish,
On kds , the jump application you can use this :
After load APP, you can compare the memory with when download the APP alone .
Hope it helps
Alice
Hello Vastrad,
Do you used KBOOT or AN2295 ?
No matter which version , you can find the jump address at here :
the MACRO of RELOCATED_VECTORS is the jump address , you can also change it refer to your demand.
And if you have flash the application into your board , you can check the memory , check whether it is right .
Hope it helps
Alice