Difference between revisions of "Using a new version of XC8"

From Flowcode Help
Jump to navigationJump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
__TOC__
 +
 
==Replacing the original  compiler with a new version==
 
==Replacing the original  compiler with a new version==
  
Select '''File''' > '''Global Settings…''' > '''Locations tab'''  
+
Download compiler from [https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers here]
 +
 
 +
Find required compiler version to install then remember the compiler install path.
 +
 
 +
Within Flowcode, select '''File''' > '''Global Settings…''' > '''Locations tab'''  
  
Under Override toolchain locations, enter the path where the Bin folder is located, e.g.  
+
Under Override toolchain locations, enter the path where installed XC8 is located, e.g. for v2.50:
'''C:\Program Files\Microchip\xc8\v2.46'''
+
'''C:\Program Files\Microchip\xc8\v2.50'''
 +
The end \ can be left off, Select OK.
  
The end \ can be left off.
+
You now be able to compile used the latest XC8 compiler.
  
 
To change back to the original compiler, replace the above path with:
 
To change back to the original compiler, replace the above path with:
  
'''C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\'''  
+
'''C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\'''
 +
 
 +
''<span style="color:red;">Note. Currently XC8 v3.0 and above is not yet supported.</span>''
  
 
==Keeping the original compiler and adding a new compiler==
 
==Keeping the original compiler and adding a new compiler==
 +
 +
Download compiler from [https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers here]
 +
 +
Find required compiler version to install then remember the compiler install path.
  
 
Copy  '''pic_xc8_comp.bat''' '''from C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC\batch\'''
 
Copy  '''pic_xc8_comp.bat''' '''from C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC\batch\'''
Line 20: Line 33:
 
Edit the file and change '''"%MX_COMPILER%bin\xc8-cc.exe"'''  to the path for the new XC8 location of xc8-cc.exe.
 
Edit the file and change '''"%MX_COMPILER%bin\xc8-cc.exe"'''  to the path for the new XC8 location of xc8-cc.exe.
 
For example:
 
For example:
'''"C:\Program Files\Microchip\xc8\v2.46\bin\xc8-cc.exe"'''
+
'''"C:\Program Files\Microchip\xc8\v2.50\bin\xc8-cc.exe"'''
  
Save the new batch file0.
+
Save the new batch file.
  
 
Within Flowcode Load a typical PIC xc8 target e.g. 16F18877via New project or Build > Project options.
 
Within Flowcode Load a typical PIC xc8 target e.g. 16F18877via New project or Build > Project options.

Latest revision as of 07:49, 14 May 2025

Replacing the original compiler with a new version

Download compiler from here

Find required compiler version to install then remember the compiler install path.

Within Flowcode, select File > Global Settings… > Locations tab

Under Override toolchain locations, enter the path where installed XC8 is located, e.g. for v2.50: C:\Program Files\Microchip\xc8\v2.50 The end \ can be left off, Select OK.

You now be able to compile used the latest XC8 compiler.

To change back to the original compiler, replace the above path with:

C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\

Note. Currently XC8 v3.0 and above is not yet supported.

Keeping the original compiler and adding a new compiler

Download compiler from here

Find required compiler version to install then remember the compiler install path.

Copy pic_xc8_comp.bat from C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC\batch\

Give it a new name so you have two batch files, place it anywhere you won’t accidently delete it.

Edit the file and change "%MX_COMPILER%bin\xc8-cc.exe" to the path for the new XC8 location of xc8-cc.exe. For example: "C:\Program Files\Microchip\xc8\v2.50\bin\xc8-cc.exe"

Save the new batch file.

Within Flowcode Load a typical PIC xc8 target e.g. 16F18877via New project or Build > Project options.

Select Build > Compiler Options and if use Eblocks, select E-Blocks from PIC selection.

For the location select Browse then change Executable Files (*.exe) to Batch Files (*.bat)

Select the new batch file, then Open

Click on the save icon then enter a new name, then OK.

Finally make sure the new version is selected and click the Default compiler for the platform C for PIC ,then Click OK