I am developing a USB based bootloader for HCS08 family of micro-controllers. I have the bootloader code in assembly(which works fine for serial communication). I am calling a C functions for USB communication (Terminal<>Micro controller) from this assembly code. However, it seems that these C functions are not getting located in protected area ROM, I can see this in project.map.They are not in continuity with my bootloader code ie my bootloder code starts at F003, but these USB functions are at some ~1000-2000. My question is, how can I make these C functions to continue with the bootloader.asm code in ROM.
Here is the program flow:I have a C main function which jumps to the bootloader.asm on power up. Although, the bootloader.asm works fine but due to USB routines in non protected program ROM area, these are also ERASED and thereafter bootloader can not communicate with my terminal.
Any suggestion in this regard would be really helpful.
Thanks