ds30 Loader free edition forums
Program Checksum issue [solved] - Printable Version

+- ds30 Loader free edition forums (https://picbootloader.com/forum)
+-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3)
+--- Forum: GUI (https://picbootloader.com/forum/forumdisplay.php?fid=4)
+--- Thread: Program Checksum issue [solved] (/showthread.php?tid=490)



Program Checksum issue [solved] - GerryB - 2012-03-16

I have used the bootloader on PIC24FJ without problem. Think the GUI is version 1.4.6. and bootloader 1.04? Probably superseded now, but, if it isn't broken don't fix it.

I have a requirement for runtime program checksum verification.

Cutting a long story short programming the device with the same hex file by importing to MPLAB and bootloading produces different results. The bootloader appears to fill gaps in the hex file with zeros and MPLAB with FFs.

Is this expected behaviour? is it adjustable or changed in later versions?


RE: Program Checksum issue - Mikael Gustavsson - 2012-03-18

That is not expected behavior. It is supposed to fill with 0xff. Can you send me the the two hex files.
The checksum won't match anyway because the goto at 0x00 is moved to just before the boot loader and in it's a goto to the boot loader is placed.


RE: Program Checksum issue - GerryB - 2012-03-18

(2012-03-18, 16:00:46)Mikael Gustafsson Wrote: That is not expected behavior. It is supposed to fill with 0xff. Can you send me the the two hex files.
The checksum won't match anyway because the goto at 0x00 is moved to just before the boot loader and in it's a goto to the boot loader is placed.

My checksum generation and checking skips the reset GOTO at 0. The difference between MPLAB and bootloader programming is two words at 0x100 (the start of the aivt which is a gap in the hex file) and a block after the last address (excepting the config words) in the hex file. These are FFs with MPLAB and 00s with the bootloader.

I have worked around the problem by filling in the gap with this
Code:
int hexpad[2] __attribute__ ((space(prog), address(0x100)));
in the program.


RE: Program Checksum issue - Mikael Gustavsson - 2012-03-18

Thanks, this is fixed in the version that will be released soon.


RE: Program Checksum issue - GerryB - 2012-03-18

(2012-03-18, 21:11:17)Mikael Gustafsson Wrote: Thanks, this is fixed in the version that will be released soon.

Ok, my workaround seems to be good. I assume the fix is in the GUI and I posted this in the right forum? Smile


RE: Program Checksum issue - Mikael Gustavsson - 2012-03-18

You are absolutely correct and the new version is finally released now Smile
http://mrmackey.no-ip.org/elektronik/ds30loader/news_120318.php