Page 1 of 1

Microchip xc16 compiler settings with Flowcode 11

Posted: Sat Apr 18, 2026 10:18 pm
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.

Re: Microchip xc16 compiler settings with Flowcode 11

Posted: Sat Apr 18, 2026 10:39 pm
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

Re: Microchip xc16 compiler settings with Flowcode 11

Posted: Sat Apr 18, 2026 11:01 pm
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

Re: Microchip xc16 compiler settings with Flowcode 11

Posted: Sun Apr 19, 2026 11:42 am
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