Difference between revisions of "Selecting Compiler Options (PICmicro)"

From Flowcode Help
Jump to navigationJump to search
 
(13 intermediate revisions by 3 users not shown)
Line 6: Line 6:
  
 
See the [[Managing Compiler Options]] topic for more information on using this feature.
 
See the [[Managing Compiler Options]] topic for more information on using this feature.
<br /><br />
 
[[File:Gen_Compiler_Options_Compiler_PIC.png|right|524x400px]]
 
'''Substitute variables used by Flowcode'''
 
  
<code>'''$(chip)'''</code> Target name e.g. <code>30F2011</code>
 
  
<code>'''$(chipalt)'''</code> Alternate target name e.g. <code>dsPIC30F2011</code>
+
[[Managing_Compiler_Options#Compiler_variables|Substitute variables used by Flowcode]] are the same for all platforms.
  
<code>'''$(target)'''</code> Filename without extension e.g. <code>C:\Dev\Test\Mytest.fcf</code> becomes - <code>C:\Dev\Test\Mytest</code>
+
__NOTOC__
 
 
<code>'''$(srcdir)'''</code> Directory location of the Flowcode file
 
 
 
<code>'''$(appdir)'''</code> Directory location of Flowcode
 
 
 
 
 
'''Using the BoostC Compiler'''
 
  
 +
==PIC XC8 Compiler==
 +
[[File:Gen_Compiler_Options_Compiler_PIC.png|right|524x400px]]
 
'''Compiler location'''
 
'''Compiler location'''
  
Line 29: Line 20:
 
Default:
 
Default:
  
<code>'''$(appdir)compilers\pic\boostc\boostc_$(family:/12F/16F).exe'''</code>
+
<code>'''$(compilerpic)batch\pic_xc8_comp.bat'''</code>
  
  
Line 38: Line 29:
 
Default:
 
Default:
  
<code>'''-v -t PIC$(chip:u) "$(target).c"'''</code>
+
<code>'''$(chip) "$(outdir)" "$(target)"'''</code>
[[File:Gen_Compiler_Options_Linker_Assembler_PIC.png|right|524x400px]]
 
<br />
 
'''Linker/Assembler location'''
 
 
 
Sets the Assembler program location.
 
 
 
Default:
 
 
 
<code>'''$(appdir)compilers\pic\boostc\boostlink_picmicro.exe'''</code>
 
 
 
 
 
'''Linker/Assembler parameters'''
 
 
 
Adds command line parameters when called from Flowcode
 
 
 
Default:
 
 
 
<code>'''-ld "$(appdir)compilers\pic\boostc\lib" libc_$(family:/12F/16F).lib rand_$(family:/12F/16F).lib float_$(family:/12F/16F).lib "$(target).obj" -t PIC$(chip:u) -d "$(outdir:~-1)" -p "$(target)"'''</code>
 
 
 
 
 
'''Using the HI TECH C Compiler'''
 
 
 
 
 
'''Compiler location'''
 
 
 
Sets the Compiler location.
 
 
 
Default 16F:
 
 
 
<code>'''C:\Program Files (x86)\HI-TECH Software\PICC\PRO\9.65\bin\picc.exe'''</code>
 
 
 
Default 18F:
 
 
 
<code>'''C:\Program Files (x86)\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe'''</code>
 
 
 
 
 
'''Compiler parameters'''
 
 
 
Adds command line parameters when called from Flowcode
 
 
 
Default:
 
 
 
<code>'''--CHIP=$(chip) -N48 $(target).c'''</code>
 
  
  
 +
==PIC XC8 Linker/Assembler==
 +
[[File:Gen_Compiler_Options_Linker_Assembler_PIC.png|right|524x400px]]
 
'''Linker/Assembler location'''
 
'''Linker/Assembler location'''
  
Line 90: Line 40:
 
Default:
 
Default:
  
<code>'''$(appdir)\tools\Dummy\DoNothing.exe'''</code>
+
<code>'''$(appdir)tools\DoNothing\DoNothing.exe'''</code>
  
  
Line 99: Line 49:
 
Default:
 
Default:
  
<code>'''<empty>'''</code>
+
<code>''''''</code>
  
  
 +
==Programmer==
 +
[[File:Gen_Compiler_Options_Programmer_PIC.png|right|524x400px]]
 
'''Programmer location'''
 
'''Programmer location'''
[[File:Gen_Compiler_Options_Programmer_PIC.png|right|524x400px]]
 
  
 
Sets the Programmer application location.
 
Sets the Programmer application location.
Line 109: Line 60:
 
Default:
 
Default:
  
<code>'''$(appdir)tools\PPP\PPPv3.exe'''</code>
+
<code>'''$(appdir)tools\mLoader\mLoader.exe'''</code>
 
 
 
 
To use the PICkit2 programmer change the location to
 
 
 
<code>'''$(appdir)tools\PICkit2\pk2cmd.exe'''</code>
 
 
 
 
 
To use the PICkit3 programmer change the location to
 
 
 
<code>'''$(appdir)tools\PICkit3\pk3cmd.exe'''</code>
 
  
  
Line 128: Line 69:
 
Default:
 
Default:
  
<code>'''-cs 2 -chip PIC$(chip) -nogui "$(outdir)$(target).hex"'''</code>
+
<code>'''-chip $(chip:u) "$(outdir)$(target).hex"'''</code>
 
 
 
 
To use the PICkit2 programmer change the parameters to
 
 
 
<code>'''-B $(appdir)tools\PICkit2\ -PPIC%p -F$(target).hex -M -A5 -R'''</code>
 
 
 
 
 
To use the PICkit3 programmer change the parameters to
 
 
 
<code>'''-P$(chip) -F$(target).hex -E -M -Y'''</code>
 
 
 
 
 
'''Use Programmer to set configuration options'''
 
 
 
Check box to allow the Programmer application to be used to set up the configuration of the device. This setting needs to be unticked to allow you to use non default programming applications such as the PicKit2.
 
 
 
 
 
'''Configuration parameters'''
 
 
 
Supplies the command line parameters needed for configuration.
 
 
 
Default:
 
 
 
<code>'''-cs 2 -chip PIC$(chip) -config'''</code>
 
 
 
Note: The above Programmer defaults assume that you are using the PPP Programming application from Matrix Multimedia.
 
If you are using an alternative programming application you will need to consult the documentation for that application for the required parameters and settings.
 
[[File:Gen_Compiler_Options_File_Viewer_PIC.png|right|524x400px]]
 
 
 
Additionally configuration words can be embedded into the program using the Supplementary code feature, or C Code icons.
 
 
 
 
 
For help using the PicKit2 Programmer with Flowcode, untick the "Use Programmer to set configuration options" button and then click here to view the configuration settings required.
 
 
 
 
 
'''File Viewer location'''
 
 
 
Sets the File viewer location for viewing C and Assembly files.
 
 
 
Default:
 
 
 
<code>'''C:\Windows\Notepad.exe'''</code>
 
 
 
 
 
'''File Viewer parameters'''
 
 
 
Adds command line parameters for the File viewer program
 
 
 
Default Assembly file viewer
 
 
 
<code>'''$(outdir)$(target).asm'''</code>
 
  
Default external program to view source files
 
  
<code>'''$(outdir)$(target).c'''</code>
+
[[Supporting_Third_Party_Programming_Tools|Click here for details on using a third party programming e.g. PICkit]]

Latest revision as of 10:36, 14 November 2018

<sidebar>Sidebar: Managing Compiler Options</sidebar> Allows users to set the Compiler options.


Options list

See the Managing Compiler Options topic for more information on using this feature.


Substitute variables used by Flowcode are the same for all platforms.


PIC XC8 Compiler

Gen Compiler Options Compiler PIC.png

Compiler location

Sets the Compiler location.

Default:

$(compilerpic)batch\pic_xc8_comp.bat


Compiler parameters

Adds command line parameters when called from Flowcode

Default:

$(chip) "$(outdir)" "$(target)"


PIC XC8 Linker/Assembler

Gen Compiler Options Linker Assembler PIC.png

Linker/Assembler location

Sets the Assembler program location.

Default:

$(appdir)tools\DoNothing\DoNothing.exe


Linker/Assembler parameters

Adds command line parameters when called from Flowcode

Default:

'


Programmer

Gen Compiler Options Programmer PIC.png

Programmer location

Sets the Programmer application location.

Default:

$(appdir)tools\mLoader\mLoader.exe


Programmer parameters

Adds command line parameters for the Programmer application.

Default:

-chip $(chip:u) "$(outdir)$(target).hex"


Click here for details on using a third party programming e.g. PICkit