Hello,
I am using the MC9S12XDT256 microcontroller.
I am trying to develop bootloader software. The program structure is designed to receive S-record type data via CAN and write it to the appropriate addresses in the flash memory.
The program flow should be as follows:
1- The bootloader software will run and check for an update request.
1.1- If there is an update request, the bootloader software will update the application software.
1.2- If there is no update request, the application software will be executed.
2-The system must be restarted and should operate with the existing application software.
I use "asm JMP 0xC000" to switch from the bootloader software to the application software. (0xC000 is the address of the _Startup function in the application software.)
When I merge the bootloader and application software and program them using Cyclone, the program works without any issues. Similarly, when I reload the same application software using the bootloader program, it also works fine.
However, when I make a small change in the application software and try to load it via the bootloader, the application software does not work. The program goes to the _Startup function of the new application software but fails to proceed to the main function. During debugging, I noticed that it enters the _Startup function but cannot proceed beyond the Init() function within _Startup.
Could you please help me? Thank you!