Config Settings Checksum Error

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

Moderator: Benj

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

Config Settings Checksum Error

Postby sptcarl » Wed May 23, 2018 10:55 pm

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: 3071
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Re: Config Settings Checksum Error

Postby Steve » Thu May 24, 2018 6:43 am

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: 34
Joined: Thu Feb 18, 2010 10:53 am
Has thanked: 3 times
Contact:

Re: Config Settings Checksum Error

Postby sptcarl » Thu May 24, 2018 11:59 pm

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
(947 Bytes) Downloaded 27 times
Flowcode_test_V6.hex
Good file
(879 Bytes) Downloaded 28 times
Capture.JPG
Config settings
Capture.JPG (81.98 KiB) Viewed 1141 times

User avatar
Steve
Matrix Staff
Posts: 3071
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Re: Config Settings Checksum Error

Postby Steve » Fri May 25, 2018 9:06 am

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.
These users thanked the author Steve for the post:
medelec35 (Fri Jul 20, 2018 11:22 pm)
Rating: 5.56%
 

User avatar
Steve
Matrix Staff
Posts: 3071
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 87 times
Been thanked: 387 times
Contact:

Re: Config Settings Checksum Error

Postby Steve » Fri May 25, 2018 10:02 am

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.
These users thanked the author Steve for the post:
medelec35 (Fri Jul 20, 2018 11:22 pm)
Rating: 5.56%
 

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

Re: Config Settings Checksum Error

Postby sptcarl » Fri May 25, 2018 11:26 pm

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.