Config Settings Checksum Error

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Config Settings Checksum Error

Post by sptcarl »

So FC8 is released and I still can't get FC7 to work 100%!
I program PICs using the TL866 Universal programmer, but hex code generated by FC7 with XC8 compiler, the programmer software reports a mismatch of the config checksum. Of course I can get round this by either telling the programmer software not to verify, or by telling Flowcode not to write the config file.
I can load the same flowcode project in V6 with the same config settings and use the same programmer, and all is fine. Using a completely different computer produces the same results.

Could anyone shed some light on this please? Does anyone else have the same problem (I did notice someone mentioned it briefly in a post here once)
I can only assume its either an FC7 or XC8 problem and every other type of programmer doesn't verify the checksums.

Thanks in advance for any suggestions.
Carl.

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Config Settings Checksum Error

Post by Steve »

Please post the "good" HEX file from V6 and the "bad" HEX file from V7 and I will have a look.

Also, please tell me what chip you are using and what configuration settings you have set (in both V6 and V7).

sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Config Settings Checksum Error

Post by sptcarl »

Hi Steve, thanks for offering to look into this.

I have simplified my example to be just the basic 1 second flasher, and the results are still the same.

I use PIC16F887 Frequency set at 8Mhz (I really need to test it with a completely different type of chip I guess)
Configurations for both versions as in the attached image.

The config word produced by FC on both versions is 0x23e2 but when loaded in the programmer, with the V7.hex file it gets changed to 0xe3e2, yet the configuration checked bits remain correct.

Thanks,
Carl.
Attachments
Flowcode_test_V7.hex
Bad file
(924 Bytes) Downloaded 241 times
Flowcode_test_V6.hex
Good file
(856 Bytes) Downloaded 229 times
Config settings
Config settings
Capture.JPG (81.98 KiB) Viewed 6653 times

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Config Settings Checksum Error

Post by Steve »

Thanks, Carl.

I've looked into this and have replicated it, but it seems to be an issue with the XC8 compiler itself rather than Flowcode, because the C code generated for the configuration data is identical in Flowcode v7 and Flowcode v8. We have updated the compiler toolchain so I suspect the problem is there.

This makes it a little more tricky for us to solve. I'll continue investigating it.

However, I think it should not affect the running of the program on the target and you can probably ignore that message on programmer software.

Regards,
Steve.

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Config Settings Checksum Error

Post by Steve »

Hi Carl.

I've looked into this without success. It doesn't look like there should be an issue as the top two bits of CONFIG1 are not programmable and should be ignored by the programmer software (if you ignore these top two bits, 0x23e2 is equal to 0xe3e2).

But 2 further thoughts have struck me:

1) Maybe it is a bug in the programmer software itself and it is not ignoring these top two bits?

2) It could have something to do with the LVP bit. The LVP bit (bit 12 of CONFIG1) can only be set to 0 (i.e. to turn low voltage programming off) if a high voltage level is applied during reprogramming.

However, the fact that a config mismatch does not occur when sending 0x23e2 (which also sets LVP to 0) means it must be to do with the top two bits. So we should discount (2) above.

Therefore, it's either the XC8 compiler or the programmer software. I suspect it's XC8 because I've been able to 'fix' the problem by editing the "16f887.cfgdata" file in the XC8 compiler toolchain by changing the line:

Code: Select all

CWORD:2007:3FFF:FFFF:CONFIG1
to:

Code: Select all

CWORD:2007:3FFF:3FFF:CONFIG1
And this seems to generate a HEX file containing 0x23e2 instead of 0xe3e2, which should fix your issue.

sptcarl
Flowcode V4 User
Posts: 36
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Config Settings Checksum Error

Post by sptcarl »

Thanks Steve,

I edited the .cfgdata file as you suggested and yes, once I had done the same for CONFIG2 too, it "fixes" it.

I mostly only use the F887 (and F886) so that will keep me happy for now.

So one issue solved, I just need to figure out now why some of my FC6 creations will not compile with FC7. Think I'll leave that for another day!

thanks again,
Carl.

Post Reply