HelloI hope somebody could help me. I know the text is long and I have muchquestions but maybe there is an answer.I would like to develop a "bootloader" for a MotorolaMicrocontroller "MC68HC912D60A". The development has started yetbut there are still some problems.The bootloader is able to communicate with existing software over theCAN-Bus.By this software we can flash the memory with the existing firmware.The bootloader still exists after the flashing and has to start thefirmware if no flashing command occurs.Summery of the bootloader features:- Communication via CAN-Bus- Flashing Firmware, starting an existing firmwareThe 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, atthe beginning- the boot sector is write-protected because when I'm flashing thefirmware the bootloader must still be existing- the firmware is in an area in top of the bootloader, the firmware hasits own interrupt vector tableThere are two Projects... the bootloader and the firmware. Both arecompiled and linked for there self. The Target is that the bootloaderhas, if a firmware exists, to jump to the address where themain-routine of the firmware begins. That's why we make anabsolute-jump to the reset vector of the firmwareinterrupt-vector-table. We also have tried to jump to thefirmware-main-routine directly. Now the problems begin... Thebootloader is jumping... but then the firmware isn't starting.Questions:- is it possible to make a jump in a main-routine(bootloader) to another main-routine(firmware) with an absolute-jump to an address?- both bootloader and firmware are using interrupts, if an interruptoccurs the bootloader-ISR is started... in this ISR we are jumping tothe interrupt vector of the firmware-ISR? Is this a way that ispossible?Thank you for your help!!Steffen
"Steffen" <steffen.kuehn@gmail.com> wrote in messagenews:1124437813.293214.43460@g44g2000cwa.googlegroups.com...>> 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?Yes It is possible to make jump from boot main to firmware main provided youhave mapped interrupt vector table propertly.> - 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?>Yes!!!!!!!!!> Thank you for your help!!>> Steffen>Rajashekhar.
If you are interested in a complete, ready to run HC12 CAN bootloaderwith all the source code, PC and HC12, and hardware, you mightwant to check out my Cheetah12 bootloader kit at www.zanthic.comTo answer your questions, yes this is possible. You can have auser vector table located just below your bootloader code and whenan interrupt occurs the vector table in the bootloader jumps to a smallsnippet of code that gets the user jump vector and jumps there. It takes a couple of extra machine cycles to execute the extrajmp instruction.Steve"Steffen" <steffen.kuehn@gmail.com> wrote in messagenews:1124437813.293214.43460@g44g2000cwa.googlegroups.com...> 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>
Before you can participate to the *related sites forums, you need to login orcreate an account.