Switching Compiler warnings OFF

For general Flowcode discussion that does not belong in the other sections.
Post Reply
User avatar
p.erasmus
Posts: 434
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Switching Compiler warnings OFF

Post 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 :D 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
1.png (22.38 KiB) Viewed 6317 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
2.png (5.06 KiB) Viewed 6317 times
Thank you for helping out
Regards Peter - QME Electronics

mnfisher
Valued Contributor
Posts: 1460
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 712 times

Re: Switching Compiler warnings OFF

Post 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

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Switching Compiler warnings OFF

Post by p.erasmus »

Hi Martin

Serial numbers are needed , :D

Thanks
Regards Peter - QME Electronics

mnfisher
Valued Contributor
Posts: 1460
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 135 times
Been thanked: 712 times

Re: Switching Compiler warnings OFF

Post 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

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Switching Compiler warnings OFF

Post by p.erasmus »

Hi Martin
Thanks for the ideas, :D

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 :D
Regards Peter - QME Electronics

LeighM
Valued Contributor
Posts: 447
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 81 times
Been thanked: 243 times

Re: Switching Compiler warnings OFF

Post 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 ;)

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Switching Compiler warnings OFF

Post by p.erasmus »

Hi Leigh

Yea I hear you :D why do you think I am asking at the address of the professional programmers :D :D
If we could undertand the Manual we do not need flowcode right :D

Thanks for hint :D
Regards Peter - QME Electronics

Steve-Matrix
Matrix Staff
Posts: 1471
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 348 times

Re: Switching Compiler warnings OFF

Post 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:
  1. Edit the "pic_xc8_comp.bat" file and add 1510 to the disabled messages list: "--MSGDISABLE=359,1273,1388,1510"
  2. 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.

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Switching Compiler warnings OFF

Post by p.erasmus »

Hi Steve,

:D :D :D Thank you very much for the help,
I will give it a try ,I was expalining the customer this is only a warning(mesaage) can be ignored safly but they are adiment on this issue :D :D
Regards Peter - QME Electronics

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Switching Compiler warnings OFF

Post by p.erasmus »

HI Steve.

The pragma satement works fine and easy to add to the project Thanks a million you saved me from loosing this project . :D :D :D :D
Regards Peter - QME Electronics

Post Reply