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

From Flowcode Help
Jump to navigationJump to search
 
(5 intermediate revisions by 2 users not shown)
Line 11: Line 11:
  
 
__NOTOC__
 
__NOTOC__
==BoostC Compiler==
+
 
[[File:Gen_Compiler_Options_Compiler_PIC.png|right|524x400px]]
+
==PIC XC8 Compiler==
 +
[[File:Gen_Compiler_Options_Compiler_PIC.png|right]]
 
'''Compiler location'''
 
'''Compiler location'''
  
 
Sets the Compiler location.
 
Sets the Compiler location.
  
Default:
+
Default for E-Blocks:
  
<code>'''$(appdir)compilers\pic\boostc\boostc_$(family:/12F/16F).exe'''</code>
+
<code>'''$(fcddir)PIC\batch\pic_xc8_comp.bat'''</code>
  
  
Line 26: Line 27:
 
Adds command line parameters when called from Flowcode
 
Adds command line parameters when called from Flowcode
  
Default:
+
Default for E-Blocks:
 
 
<code>'''-v -t PIC$(chip:u) "$(target).c"'''</code>
 
  
 +
<code>'''"$(compilerpic)" $(chip) "$(outdir)" "$(target)""'''</code>
  
  
Line 45: Line 45:
  
  
==BoostC Linker/Assembler==
 
[[File:Gen_Compiler_Options_Linker_Assembler_PIC.png|right|524x400px]]
 
'''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>
 
  
  
 +
==PIC XC8 Linker/Assembler==
  
 +
[[File:Gen_Compiler_Options_Linker_Assembler_PIC.png|right]]
 +
'''Linker/Assembler location'''
  
 +
Sets the Assembler program location.
  
 +
Default for E-Blocks:
  
 +
<code>'''$(appdir)tools\DoNothing\DoNothing.exe'''</code>
  
  
 
+
'''Linker/Assembler parameters'''
 
 
 
 
 
 
==HI-TECH C Compiler==
 
[[File:Gen_HI-TECH_C_Compiler.png|right|524x400px]]
 
'''Compiler location'''
 
 
 
Sets the Compiler location.
 
 
 
Default 10/12/16F:
 
 
 
<code>'''C:\Program Files (x86)\HI-TECH Software\PICC\PRO\9.83\bin\picc.exe'''</code>
 
 
 
Default 18F:
 
 
 
<code>'''C:\Program Files (x86)\HI-TECH Software\PICC-18\PRO\9.80\bin\picc18.exe'''</code>
 
 
 
 
 
'''Compiler parameters'''
 
  
 
Adds command line parameters when called from Flowcode
 
Adds command line parameters when called from Flowcode
  
Default:
+
Default for E-Blocks:
 
 
<code>'''--CHIP=$(chip) -N48 $(target).c'''</code>
 
 
 
  
 +
<code>''''''</code>
  
  
Line 107: Line 81:
  
  
==HI-TECH C Linker/Assembler==
 
[[File:Gen_HI-TECH_C_Linker_Assembler.png|right|524x400px]]
 
'''Linker/Assembler location'''
 
  
Sets the Assembler program location.
 
 
Default:
 
  
<code>'''$(appdir)\tools\Dummy\DoNothing.exe'''</code>
 
  
  
'''Linker/Assembler parameters'''
 
  
Adds command line parameters when called from Flowcode
 
  
Default:
 
  
<code>'''<empty>'''</code>
 
  
  
Line 135: Line 98:
  
  
 +
==Programmer==
 +
[[File:Gen_Compiler_Options_Programmer_PIC.png|right]]
 +
'''Programmer location'''
  
 +
Sets the Programmer application location.
  
 +
Default for E-Blocks:
  
 +
<code>'''$(appdir)tools\mLoader\mLoader.exe'''</code>
  
  
 +
'''Programmer parameters'''
  
==Programmer==
+
Adds command line parameters for the Programmer application.
[[File:Gen_Compiler_Options_Programmer_PIC.png|right|524x400px]]
 
'''Programmer location'''
 
  
Sets the Programmer application location.
+
Default for E-Blocks:
  
Default:
+
<code>'''-chip $(chip:u) "$(outdir)$(target).hex"'''</code>
  
<code>'''$(appdir)tools\PPP\PPPv3.exe'''</code>
 
  
 +
[[Supporting_Third_Party_Programming_Tools|Click here for details on using a third party programming e.g. PICkit]]
  
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>
 
 
 
'''Programmer parameters'''
 
  
Adds command line parameters for  the Programmer application.
 
  
Default:
 
  
<code>'''-cs 2 -chip PIC$(chip) -nogui "$(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.
 
  
Additionally configuration words can be embedded into the program using the Supplementary code feature, or C Code icons.
 
  
 +
==File Viewer==
 +
[[File:Gen_Compiler_Options_File_Viewer_PIC.png|right]]
  
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.
+
'''Use external program to view source files'''
  
 +
When ticked, allows an external viewer e.g Notepad to be used instead of the default internal viewer
  
==File Viewer==
+
'''Location'''
[[File:Gen_Compiler_Options_File_Viewer_PIC.png|right|524x400px]]
 
'''File Viewer location'''
 
  
Sets the File viewer location for viewing C and Assembly files.
+
Sets the file viewer location.
  
 
Default:
 
Default:
Line 214: Line 160:
  
  
'''File Viewer parameters'''
+
'''Parameters'''
  
Adds command line parameters for the File viewer program
+
Adds command line parameters for the file viewer application.
  
Default Assembly file viewer
+
Default:
  
<code>'''$(outdir)$(target).asm'''</code>
+
<code>'''$(outdir)$(target).c'''</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 11:01, 21 March 2023

<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 for E-Blocks:

$(fcddir)PIC\batch\pic_xc8_comp.bat


Compiler parameters

Adds command line parameters when called from Flowcode

Default for E-Blocks:

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













PIC XC8 Linker/Assembler

Gen Compiler Options Linker Assembler PIC.png

Linker/Assembler location

Sets the Assembler program location.

Default for E-Blocks:

$(appdir)tools\DoNothing\DoNothing.exe


Linker/Assembler parameters

Adds command line parameters when called from Flowcode

Default for E-Blocks:

'













Programmer

Gen Compiler Options Programmer PIC.png

Programmer location

Sets the Programmer application location.

Default for E-Blocks:

$(appdir)tools\mLoader\mLoader.exe


Programmer parameters

Adds command line parameters for the Programmer application.

Default for E-Blocks:

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


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













File Viewer

Gen Compiler Options File Viewer PIC.png

Use external program to view source files

When ticked, allows an external viewer e.g Notepad to be used instead of the default internal viewer

Location

Sets the file viewer location.

Default:

C:\Windows\Notepad.exe


Parameters

Adds command line parameters for the file viewer application.

Default:

$(outdir)$(target).c


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