AnsweredAssumed Answered

how could i update bootloader via bootloader?(s12xe)

Question asked by tao fu on Jan 24, 2016
Latest reply on Jan 28, 2016 by lama

I have built one boot loader mc9s12xet256 based on a Serial Bootloader (AN4258). But there is one problem, how could i update boot loader via the boot loader that i have built?

Now, i have merged the user application and bootloader in one *.s19 file.  A "out of range" error was reported when i download the merged s19 file in the mcu via the bootloader. I have found the reason of this error.

When application and boot loader code are merged , the boot loader code is behind of app code in the merged s19 file. The "out of range" error is occurred when the boot loader code is transferring to the mcu via serial port.

In the boot loader, code below restrict the range of bootloader.

if (!((ProgSRec.LoadAddr >= 0x780000UL) && (ProgSRec.LoadAddr <= 0x79FFFFUL)) && \

!((ProgSRec.LoadAddr >= 0x7E0000UL) && (ProgSRec.LoadAddr <= 0x7FEFDFUL)))

return(SRecRangeError);

The boot loader code is placed in

ROM_F000  = READ_ONLY 0xF000 TO   0xFCFF;

 

i want update boot loader code, but i can't erase the boot loader code, is there any method could solve this problem?

Any help would be greatly appreciated.

 

Regards,

taok

Outcomes