Difference between revisions of "Selecting Compiler Options (dsPIC/PIC24)"

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.
[[File:Compiler_Options_Compiler_PIC16.png|right|524x400px]]
 
<br />
 
'''Substitute variables used by Flowcode'''
 
  
'''%t''' Target name e.g. 30F2011
 
 
'''%a''' Alternate target name e.g. dsPIC30F2011
 
 
'''%f'''  Filename without extension e.g. C:\Dev\Test\Mytest.fcf becomes - C:\Dev\Test\Mytest
 
 
'''%d''' Directory location of the Flowcode file
 
  
 +
[[Managing_Compiler_Options#Compiler_variables|Substitute variables used by Flowcode]] are the same for all platforms.
  
 +
__NOTOC__
 +
==Compiler==
 +
[[File:Gen_Compiler_Options_Compiler_PIC16.png|right|524x400px]]
 
'''Compiler location'''
 
'''Compiler location'''
  
Line 25: Line 19:
 
Default:
 
Default:
  
<code>'''$(appdir)compilers\pic16\batchfiles\pic16_C30_comp.bat'''</code>
+
<code>'''$(compilerpic16)batchfiles\pic16_C30_comp.bat'''</code>
[[File:Compiler_Options_Linker_Assembler_PIC16.png|right|524x400px]]
+
 
<br /><br />
+
 
 
'''Compiler parameters'''
 
'''Compiler parameters'''
  
Line 37: Line 31:
  
  
'''Linker/Assembler location'''
 
  
Sets the Assembler program location.
 
  
Default:
 
  
<code>'''$(appdir)compilers\pic16\batchfiles\pic16_C30_link.bat'''</code>
 
  
  
'''Linker/Assembler parameters'''
 
  
Adds command line parameters when called from Flowcode
 
  
Default:
 
  
<code>'''"$(outdir)$(target)" $(chip:u) $(family)'''</code>
 
[[File:Compiler_Options_Programmer_PIC16.png|right|524x400px]]
 
<br /><br />
 
'''Programmer location'''
 
  
Sets the Programmer application location.
 
  
Default:
 
  
<code>'''$(appdir)tools\mLoader\mLoader.exe'''</code>
 
  
  
To use the PICkit2 programmer change the location to
 
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PICkit2\pk2cmd.exe'''</code>
+
==Linker/Assembler==
 +
[[File:Gen_Compiler_Options_Linker_Assembler_PIC16.png|right|524x400px]]
 +
'''Linker/Assembler location'''
  
 +
Sets the Assembler program location.
  
To use the PICkit3 programmer change the location to
+
Default:
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PICkit3\pk3cmd.exe'''</code>
+
<code>'''$(compilerpic16)batchfiles\pic16_C30_link.bat'''</code>
  
  
'''Programmer parameters'''
+
'''Linker/Assembler parameters'''
  
Adds command line parameters for  the Programmer application.
+
Adds command line parameters when called from Flowcode
  
 
Default:
 
Default:
  
<code>'''-chip $(chip:u) "$(target).hex"'''</code>
+
<code>'''"$(outdir)$(target)" $(chip:u) $(family)'''</code>
  
  
To use the PICkit2 programmer change the parameters to
 
  
<code>'''-BC:\Program Files\Matrix Multimedia\Flowcode PIC16BIT V4\Tools\PICkit2\ -P%a -F%f.hex -M -R'''</code>
 
  
  
To use the PICkit3 programmer change the parameters to
 
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC16BIT V4\Tools\PICkit3\ -P%p -F%f.hex -E -M'''</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 Location'''
 
  
Sets the Configuration application location.
 
  
Default:
 
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PPP\PPPv3.exe'''</code>
 
  
  
'''Configuration parameters'''
+
==Programmer==
 +
[[File:Gen_Compiler_Options_Programmer_PIC16.png|right|524x400px]]
 +
'''Programmer location'''
  
Supplies the command line parameters needed for configuration.
+
Sets the Programmer application location.
  
 
Default:
 
Default:
  
<code>'''-cs 1 -chip %a -config'''</code>
+
<code>'''$(appdir)tools\mLoader\mLoader.exe'''</code>
  
  
Note: The above Programmer defaults assume that you are using the mLoader Programming application from Matrix Multimedia.
+
'''Programmer parameters'''
If you are using an alternative programming application you will need to consult the documentation for that application for the required parameters and settings. The above configuration editor defaults assume that you are using the PPP configuration tool from Matrix Multimedia. We recommend that you retain these settings to allow PPP to be able to specify the correct configuration for your device.
 
[[File:Compiler_Options_File_Viewer_PIC16.png|right|524x400px]]
 
<br />
 
Alternatively configuration words can be embedded into the program using the Supplementary code feature, or C Code icons.
 
  
 
+
Adds command line parameters for the Programmer application.
'''File Viewer location'''
 
 
 
Sets the File viewer location for viewing C and Assembly files.
 
 
 
The default is empty, this activates the use of the internal C code viewer.
 
  
 
Default:
 
Default:
  
<code>'''C:\Windows\Notepad.exe'''</code>
+
<code>'''-chip $(chip:u) "$(target).hex"'''</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:38, 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.


Compiler

Gen Compiler Options Compiler PIC16.png

Compiler location

Sets the location of the Microchip C30 compiler.

Default:

$(compilerpic16)batchfiles\pic16_C30_comp.bat


Compiler parameters

Adds command line parameters when called from Flowcode

Default:

"$(outdir)$(target)" "$(outdir)" "$(chip:u)"









Linker/Assembler

Gen Compiler Options Linker Assembler PIC16.png

Linker/Assembler location

Sets the Assembler program location.

Default:

$(compilerpic16)batchfiles\pic16_C30_link.bat


Linker/Assembler parameters

Adds command line parameters when called from Flowcode

Default:

"$(outdir)$(target)" $(chip:u) $(family)









Programmer

Gen Compiler Options Programmer PIC16.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) "$(target).hex"


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