Page 1 of 1
Switching Compiler warnings OFF
Posted: Tue Oct 26, 2021 1:21 pm
by p.erasmus
Hallo Team,
My customer is complaining that the Flowchart with a PIC18F14K50 and HID component when compiling a few compiler warnings is generated
they do not like this

is it possible to do a c code line that will surpress the XC8 warnings as a first question.These warnings are generated by the HID component as the FC chart only contains the HID component at the moment

- 1.png (22.38 KiB) Viewed 6668 times
Then when in debug it show the below message (what is this message) and can we switch it also off
They are building a few hundred controllers with this PIC and they do not want to see these messages during compilation
(They have FC and professional License )

- 2.png (5.06 KiB) Viewed 6668 times
Thank you for helping out
Re: Switching Compiler warnings OFF
Posted: Tue Oct 26, 2021 5:21 pm
by mnfisher
Hi Peter,
Do they need to recompile every time (serial number or something else 'changing') - or could they just compile once and upload many?
Martin
Re: Switching Compiler warnings OFF
Posted: Tue Oct 26, 2021 5:29 pm
by p.erasmus
Hi Martin
Serial numbers are needed ,
Thanks
Re: Switching Compiler warnings OFF
Posted: Tue Oct 26, 2021 8:38 pm
by mnfisher
A couple of ideas - particularly if it's a big program with a long compilation time...
1) From StackOverflow:
One easy way is to start with a master HEX file as produced by the firmware tools. This contains a blank serial number. You write a small program that grabs a new serial number according to whatever your strategy is, reads the master HEX file, substitutes the new serial number for the blank one, and writes out a temporary HEX file. The temporary HEX file is used to program the part, then deleted.
2) Have a initial 'setup' where the programs enters a 'start' routine if there is no serial - that attempts to read and store a serial number''
3) There are id chips available cheaply (i2c) that store a unique id in hardware.
4) Use MAC address (connected hardware)
5) Some PICs have a unique id.
Try
https://electronics.stackexchange.com/q ... n-hex-file
Re: Switching Compiler warnings OFF
Posted: Wed Oct 27, 2021 6:36 am
by p.erasmus
Hi Martin
Thanks for the ideas,
We are in the development phase and the issue remains how to switch of these warnings that is generated when the HID component is used ,
The customer want code that compiles error and warning free ,once the development of the product is completed and we have a FC chart that compiles warning free and the product if validated the mass programming comes ito place ,they can even order the chips preprogrammed from Microchip .
Their concern is the Warnings generated by the flow chart how to solve that is the real question

Re: Switching Compiler warnings OFF
Posted: Wed Oct 27, 2021 8:24 am
by LeighM
Hi Peter,
The XC8 Compiler manual should indicate if it's possible to remove these two warnings,
although it's not an easy read

Re: Switching Compiler warnings OFF
Posted: Wed Oct 27, 2021 8:50 am
by p.erasmus
Hi Leigh
Yea I hear you

why do you think I am asking at the address of the professional programmers
If we could undertand the Manual we do not need flowcode right
Thanks for hint

Re: Switching Compiler warnings OFF
Posted: Thu Oct 28, 2021 10:38 am
by Steve-Matrix
Hopefully this will help...
The "non-reentrant function" message is IMO a message rather than a warning and can be safely ignored. If you really want to disable this message, then you have 2 choices:
- Edit the "pic_xc8_comp.bat" file and add 1510 to the disabled messages list: "--MSGDISABLE=359,1273,1388,1510"
- Add the line "#pragma warning disable 1510" into the 'declarations' section of supplementary code
The first option will affect all 16-bit PIC projects compiled, and the second will only affect this project.
The other message (about the debug bit) can also be ignored. It can possibly be removed by setting the "BKBUG" ("Background Debug") config setting to "enabled" (via the "project options" screen).
Personally I would prefer to keep these messages displayed in the compiler output. They are not showing anything wrong with the project and are potentially useful messages that help explain what the compiler and debugger are doing. I would try to explain this to your customer, but if they insist on removing these messages, then the above should work.
Re: Switching Compiler warnings OFF
Posted: Fri Oct 29, 2021 4:24 pm
by p.erasmus
Re: Switching Compiler warnings OFF
Posted: Fri Oct 29, 2021 4:34 pm
by p.erasmus