Page 1 of 1

FC7 Compile to Hex - files created

Posted: Mon Aug 22, 2016 11:34 pm
by triokenwood
Hi all,

Has there ever been a discussion or explanation of the files that are created during the compilation of a flowchart into a hex file?

Obviously, it is easy enought to see which files are dreated by the <compile to hex> request, but I have searched high and low (both within Matrix and across the global internet) to find out what the purpose of each created file actually is, but cannot find anything useful.

It would be nice to have an understanding of this 'hidden' step as well - especially because I have a program that demostrates the weirdest behaviour I have come across in a very long time - where the sending, to an attached LCD, of just ONE extra character in a string, causes TOTAL program corruption and run-time failure. I have even been able to narrow this down to the observation of the counter variable in an 'initialisation_loop' counter being constantly reset by the inclusion of the extra character - even though the sending of that character happens in an LCD macro call outside of that initialisation loop, and at a point in the code flow that has not even been reached at that point! (like I said, wierd - and something that has now cost me twe new programmer boards - to get to v9 from v4 and v7, just to be able to see if GHOST will help now that there no longer seems to be any support for ICD).

I'm trying to keep a 'happy' face on - but I do sometimes feel that all I am actually doing is debugging FC7, instead of just getting on and using the IDE for the projects I wish to amuse myself with.

Any suggestions?

Cheers,
Bill

Re: FC7 Compile to Hex - files created

Posted: Tue Aug 23, 2016 12:49 am
by kersing
Bill,

It would help if you post your flowchart. Now we are left guessing. With regards to the files, have you checked the compiler documentation for XC8? The only file generated by flowcode is the .c file, everything else is compiler generated.
My gut feeling for the behavior you describe is an array out of bounds condition. Are you setting elements of an array in your code? Could it be the index increments beyond the storage space allocated for that array?

Best regards,

Jac

Re: FC7 Compile to Hex - files created

Posted: Tue Aug 23, 2016 2:30 am
by triokenwood
Hi Jac,

Thanks for the quick response.

I intentionally did not include my .fcfx file - as my enquiry was actually primarily looking for information on the compilation process itself.

However, in the meantime, I have downloaded the (huge) XC8 User Manual, and found some specific information that has helped me answer my own question:-
2016-08-23_02-04-35.jpg
(111.87 KiB) Downloaded 788 times
The interesting behaviour is that, if I recompile for an 18F4331 (instead of an 18F2331) the problem disappears

This is the code - already heavily stripped back as I have been trying to isolate the problem:-
DPC 05x skeleton for upload.fcfx
(48.33 KiB) Downloaded 282 times
Cheers,
Bill