Hans Wedemeyer
Joined: 15 Sep 2003 Posts: 226
|
bootloader application RCALL gets changed to GOTO |
Posted: Sat Sep 22, 2007 6:48 pm |
|
|
Using the CCS ex_bootloader the last line of code in the hex file looks like this:
:04070000FFD7000C13 // from the LST this is a RCALL 0700
The loaded applications first line of code in the hex file looks like this
:04070000E6EFDFF051 // from lst file is GOTO 1BFCC (main() of application)
When the bootloader loads the application it overwrites the line at address 0700 with the line of code from the loaded application.
This changes the instruction at 0700 from RCALL to GOTO
Is it the intention to make the boot loader do a GOTO main() ?
Which I think it should as it needs to not push the stack at that point.
Also not sure what state the stack is in at that point ! It all seems to work and I've exercised my application code to use the worst case stack push / pops, and nothing failed (yet)
Everything works so seems OK. I would just like to understand it. |
|