Hello
I hope somebody could help me. I know the text is long and I have much questions but maybe there is an answer.
I would like to develop a "bootloader" for a Motorola Microcontroller "MC68HC912D60A". The development has started yet but there are still some problems.
The bootloader is able to communicate with existing software over the CAN-Bus. By this software we can flash the memory with the existing firmware. The bootloader still exists after the flashing and has to start the firmware if no flashing command occurs.
Summery of the bootloader features:
- Communication via CAN-Bus
- Flashing Firmware, starting an existing firmware
The structure is as follows:
- the bootloader lies in the 8k boot sector of the flash memory
- the interrupt vector table of the bootloader is also in this area, at the beginning
- the boot sector is write-protected because when I'm flashing the firmware the bootloader must still be existing
- the firmware is in an area in top of the bootloader, the firmware has its own interrupt vector table
There are two Projects... the bootloader and the firmware. Both are compiled and linked for there self. The Target is that the bootloader has, if a firmware exists, to jump to the address where the main-routine of the firmware begins. That's why we make an absolute-jump to the reset vector of the firmware interrupt-vector-table. We also have tried to jump to the firmware-main-routine directly. Now the problems begin... The bootloader is jumping... but then the firmware isn't starting.
Questions:
- is it possible to make a jump in a main-routine(bootloader) to an other main-routine(firmware) with an absolute-jump to an address?
- both bootloader and firmware are using interrupts, if an interrupt occurs the bootloader-ISR is started... in this ISR we are jumping to the interrupt vector of the firmware-ISR? Is this a way that is possible?
Thank you for your help!!
Steffen