I have a UC3A based system:
Bootloader 0x80000000 - 0x80003FFF
Main program header 0x80004000 - 0x800041FF
Main program 0x80004200 - 0x8000xxxx
The header contains information about the main program including a CRC to verify integrity. Once the bootloader verifies the header it does a procedure call to 0x80004200. This of course starts the normal startup routines and such since the main program is linked to start at 0x80004200.
What I would like to do is pass the 16 bit bootloader version number to the main program. I figure the startup is going to clear out internal RAM so I didn't try that.
What I did try is to store it in the ABDAC data register in the bootloader and then load that in the main program, but it shows up as zero. Not sure what I'm doing wrong there.
What about all those unused system registers? Especially the "Implementation Defined" ones. Do those actually exist and could they be used for this purpose?