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.
Microchip xc16 compiler settings with Flowcode 11
-
canary_wharfe
- Posts: 122
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 8 times
- Been thanked: 13 times
Microchip xc16 compiler settings with Flowcode 11
- Attachments
-
- Help.zip
- (3.87 KiB) Downloaded 66 times
-
mnfisher
- Valued Contributor
- Posts: 1931
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 156 times
- Been thanked: 910 times
Re: Microchip xc16 compiler settings with Flowcode 11
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
Currently the compiler is looking for "flowcode1".c rather than flowcode1.c
Martin
-
canary_wharfe
- Posts: 122
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 8 times
- Been thanked: 13 times
Re: Microchip xc16 compiler settings with Flowcode 11
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
regards
Charles
-
mnfisher
- Valued Contributor
- Posts: 1931
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 156 times
- Been thanked: 910 times
Re: Microchip xc16 compiler settings with Flowcode 11
... 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
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
-
canary_wharfe
- Posts: 122
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 8 times
- Been thanked: 13 times
Re: Microchip xc16 compiler settings with Flowcode 11
Thanks Martin
Will try those edits when I get home. What I don’t understand is why that same batch file works with the slightly older version of the Microchip compiler? It leads me to believe the batch file in its original form must be ok but then only Ben or someone from Matrix can pass a comment on that. I’m sorely tempted to uninstall the new compiler and reinstall it into Program Files (x86) instead of the default 64 bit Program Files but I’m damned sure the moment I do that MPLABx is going to throw a wobbly. Ho hum!
Will try those edits when I get home. What I don’t understand is why that same batch file works with the slightly older version of the Microchip compiler? It leads me to believe the batch file in its original form must be ok but then only Ben or someone from Matrix can pass a comment on that. I’m sorely tempted to uninstall the new compiler and reinstall it into Program Files (x86) instead of the default 64 bit Program Files but I’m damned sure the moment I do that MPLABx is going to throw a wobbly. Ho hum!
-
canary_wharfe
- Posts: 122
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 8 times
- Been thanked: 13 times
Re: Microchip xc16 compiler settings with Flowcode 11
OK just realised those last settings you quoted are the latest batchfile from Flowcode 11. That doesn't work with the external Microchip directory. I tried that bat file yesterday. When I run the compiler from Flowcode it gives similar errors. The actual output text is:-
D:\Downloads>REM DATE: 25\03\2024
D:\Downloads>REM DIR: FCD\PIC16\batchfiles\pic16_C30_comp.bat
The system cannot find the path specified.
'xc16-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error returned from [xc16-gcc.exe]
C:\Program Files\Microchip\xc16\v1.70\bin\pic16_C30_comp.bat reported error code 0x1
Autoclose turned off
D:\Downloads>REM DATE: 25\03\2024
D:\Downloads>REM DIR: FCD\PIC16\batchfiles\pic16_C30_comp.bat
The system cannot find the path specified.
'xc16-gcc' is not recognized as an internal or external command,
operable program or batch file.
Error returned from [xc16-gcc.exe]
C:\Program Files\Microchip\xc16\v1.70\bin\pic16_C30_comp.bat reported error code 0x1
Autoclose turned off
-
mnfisher
- Valued Contributor
- Posts: 1931
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 156 times
- Been thanked: 910 times
Re: Microchip xc16 compiler settings with Flowcode 11
See compiler->options->parameters:
"$(compilerpic16)" "$(target)" "$(outdir)" "$(chip:u)"
(at least in v11) - so compiler is %1, target(file) %2 etc
You can change these - but check the settings 'stick'....
Martin
"$(compilerpic16)" "$(target)" "$(outdir)" "$(chip:u)"
(at least in v11) - so compiler is %1, target(file) %2 etc
You can change these - but check the settings 'stick'....
Martin
-
canary_wharfe
- Posts: 122
- Joined: Thu Dec 10, 2020 3:54 pm
- Has thanked: 8 times
- Been thanked: 13 times
Re: Microchip xc16 compiler settings with Flowcode 11
Martin. You ARE a G E N I U S !!!! That does it! It's working. Thank you so much.
Charles
Charles