Microchip xc16 compiler settings with Flowcode 11

Use this section to discuss your embedded Flowcode projects.
Post Reply
canary_wharfe
Posts: 115
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 12 times

Microchip xc16 compiler settings with Flowcode 11

Post by canary_wharfe »

Can anyone please advise on what needs to be changed in my Flowcode settings to get a later version of Microchip's PIC xc16 compiler working. I have an earlier version of the xc16 compiler working perfectly but when I try the same settings and batch file it seems that although the compiler is found within the Microchip directory on the computer, the coff-gcc.exe doesn't see any input files and the compilation kicks out an error. At first I thought the problem was PATH related because the earlier Microchip compiler is installed in Program Files (x86) and the later compiler is installed in the 64 bit path of just Program Files. However, my newer xc8 compiler is also installed in just the Program Files location and Flowcode runs and handles it just like the earlier xc8 version. It has to be something to do with the batch file not allowing the coff-gcc.exe to handle the compilation.

I am enclosing a zip file with the ultra simple flowcode test file, my compiler settings and the text error message in the hope that somebody can tell me what needs changing in my system. I'm a version 10 user and have just installed version 11 with a view to testing it before moving over fully from Flowcode 10 to 11.

Many thanks.
Attachments
Help.zip
(3.87 KiB) Downloaded 15 times

mnfisher
Valued Contributor
Posts: 1923
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 156 times
Been thanked: 902 times

Re: Microchip xc16 compiler settings with Flowcode 11

Post by mnfisher »

I think you need to use %~1 (instead of %1) to remove the double quotes...

Currently the compiler is looking for "flowcode1".c rather than flowcode1.c

Martin

canary_wharfe
Posts: 115
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 12 times

Re: Microchip xc16 compiler settings with Flowcode 11

Post by canary_wharfe »

Thanks for replying Martin. I did try adding the %~1 to the bat file but no joy I'm afraid. Exactly the same error. When I looked at the the bat file I immediately thought you had found the problem because the %~ is used in other parts of the text. However, it didn't work sadly. I get exactly the same error message. Any other possible ideas?
regards
Charles

mnfisher
Valued Contributor
Posts: 1923
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 156 times
Been thanked: 902 times

Re: Microchip xc16 compiler settings with Flowcode 11

Post by mnfisher »

... and looks like the source is parameter 2 not 1....

I added ECHO to output the command line from the batch file. Though it seems to get truncated a bit (at output at least).

From the FC batch:

@SET MX_COMPILER=%~1
@SET MX_PROJECT=%2 // Flowcode1!
@SET MX_OUTDIR=%~3
@SET MX_CHIP=%4

Post Reply