Starting uC after bootloader jump
sweeneykevin21 <sweeneykevin21 <at> yahoo.com>
2012-02-27 23:37:27 GMT
I'm trying to get uC to start after the jump from a 'bootloader'.
MPC565, my own board design. 36KRAM, 1Meg flash in two modules, lower 512k and upper 512k, 8 blocks per
module. No external ram or flash, chip runs in 'single chip mode'.
My problem; In the MPC5xx family you cannot write to flash in the module you are operating out of. Because of
this, my flash burning routine is located at 0x00080000. When I write my application (using uC) at 0x0
everything is fine. App runs and I am able to jump to the flash burning routine from the main application. I
want to install a bootloader, or more accurately, a recovery module, at 0x0, and move the application code
to 0x00010000. The bootloader would look for a signal on the serial input upon reset. If there is a signal it
would jump to x000080000 and start the flash burning routine, if no signal, it would jump to the main app and
I am unable to get uC to start despite trying a number of jump to addresses. The code is (I think) properly
relocated to 0x00010000 with the exception table.
My question; what is required to relocate a uC application in memory and what is required to get it to start?