How bootloader knows where to jump
How bootloader knows where to jump
I am looking at HID Bootloader example code and cant figure out where it writes the application entry address to jump to. I can see code that creates a placeholder for the app reset vector in ConfigMem() procedure but I do not see that vector placeholder getting updated with the actual application reset vector after an application is loaded. Can someone explain please how bootloader knows where to jump to?
Re: How bootloader knows where to jump
hi,
if i right remember, the new vector is write by the USB bootloader software (PC) at the last flash memory address available before the bootloader firmware start.
try to read the flash PIC memory after you upload your application firmware and check the value before the beginning of the bootloader
regards
if i right remember, the new vector is write by the USB bootloader software (PC) at the last flash memory address available before the bootloader firmware start.
try to read the flash PIC memory after you upload your application firmware and check the value before the beginning of the bootloader
regards
Re: How bootloader knows where to jump
You are correct, I have figured that out by now. It is the PC microbootloader software that writes the application reset address to 0x9D07BFF0 (for PIC32 with 512kB), which is the 16 bytes right before the bootloader starts at 0x9D07C000.
So Microe - how hard was that to answer?
So Microe - how hard was that to answer?
Re: How bootloader knows where to jump
Hi,
I apologize if I haven't answered appropriately, but the phil31 answered just before I did, so I thought I shouldn't post the same answer again.
Thank you for the understanding.
Regards,
Filip.
I apologize if I haven't answered appropriately, but the phil31 answered just before I did, so I thought I shouldn't post the same answer again.
Thank you for the understanding.
Regards,
Filip.