Posts: 3
Threads: 1
Joined: Mar 2012
2012-03-16, 21:36:54
(This post was last modified: 2012-12-22, 00:48:37 by Mikael Gustavsson.)
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?
Posts: 623
Threads: 0
Joined: Nov 2009
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.
Posts: 3
Threads: 1
Joined: Mar 2012
(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.
Posts: 623
Threads: 0
Joined: Nov 2009
Thanks, this is fixed in the version that will be released soon.
Posts: 3
Threads: 1
Joined: Mar 2012
(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?
Posts: 623
Threads: 0
Joined: Nov 2009
2012-03-18, 23:29:09
(This post was last modified: 2024-07-04, 21:01:01 by Mikael Gustavsson.)
You are absolutely correct and the new version is finally released now
[broken link]