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

From Flowcode Help
Jump to navigationJump to search
Line 10: Line 10:
 
'''Substitute variables used by Flowcode'''
 
'''Substitute variables used by Flowcode'''
  
'''%t''' Target name e.g. <code>'''30F2011'''</code>
+
'''$(chip)''' Target name e.g. <code>'''30F2011'''</code>
  
'''%a''' Alternate target name e.g. <code>'''dsPIC30F2011'''</code>
+
'''$(chipalt)''' Alternate target name e.g. <code>'''dsPIC30F2011'''</code>
  
'''%f'''  Filename without extension e.g. <code>'''C:\Dev\Test\Mytest.fcf'''</code> becomes - <code>'''C:\Dev\Test\Mytest'''</code>  
+
'''$(target)'''  Filename without extension e.g. <code>'''C:\Dev\Test\Mytest.fcf'''</code> becomes - <code>'''C:\Dev\Test\Mytest'''</code>  
  
'''%d''' Directory location of the Flowcode file
+
'''$(srcdir)''' Directory location of the Flowcode file
 +
 
 +
'''$(appdir)''' Directory location of Flowcode
  
  
Line 66: Line 68:
 
To use the PICkit2 programmer change the location to
 
To use the PICkit2 programmer change the location to
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PICkit2\pk2cmd.exe'''</code>
+
<code>'''$(appdir)Tools\PICkit2\pk2cmd.exe'''</code>
  
  
 
To use the PICkit3 programmer change the location to
 
To use the PICkit3 programmer change the location to
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PICkit3\pk3cmd.exe'''</code>
+
<code>'''$(appdir)Tools\PICkit3\pk3cmd.exe'''</code>
  
  
Line 85: Line 87:
 
To use the PICkit2 programmer change the parameters to
 
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>
+
<code>'''-B$(appdir)Tools\PICkit2\ -P%a -F%f.hex -M -R'''</code>
  
  
 
To use the PICkit3 programmer change the parameters to
 
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>
+
<code>'''$(appdir)Tools\PICkit3\ -P%p -F%f.hex -E -M'''</code>
  
  
 
'''Use Programmer to set configuration options'''
 
'''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.
+
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 PPP as used in previous versions of Flowcode.
  
  
Line 104: Line 106:
 
Default:
 
Default:
  
<code>'''C:\Program Files\Matrix Multimedia\Flowcode PIC24&dsPIC V4\Tools\PPP\PPPv3.exe'''</code>
+
<code>'''$(appdir)Tools\PPP\PPPv3.exe'''</code>
  
  

Revision as of 08:33, 19 September 2013

<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.

Gen Compiler Options Compiler PIC16.png


Substitute variables used by Flowcode

$(chip) Target name e.g. 30F2011

$(chipalt) Alternate target name e.g. dsPIC30F2011

$(target) Filename without extension e.g. C:\Dev\Test\Mytest.fcf becomes - C:\Dev\Test\Mytest

$(srcdir) Directory location of the Flowcode file

$(appdir) Directory location of Flowcode


Compiler location

Sets the location of the Microchip C30 compiler.

Default:

$(appdir)compilers\pic16\batchfiles\pic16_C30_comp.bat

Gen Compiler Options Linker Assembler PIC16.png



Compiler parameters

Adds command line parameters when called from Flowcode

Default:

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


Linker/Assembler location

Sets the Assembler program location.

Default:

$(appdir)compilers\pic16\batchfiles\pic16_C30_link.bat


Linker/Assembler parameters

Adds command line parameters when called from Flowcode

Default:

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

Gen Compiler Options Programmer PIC16.png



Programmer location

Sets the Programmer application location.

Default:

$(appdir)tools\mLoader\mLoader.exe


To use the PICkit2 programmer change the location to

$(appdir)Tools\PICkit2\pk2cmd.exe


To use the PICkit3 programmer change the location to

$(appdir)Tools\PICkit3\pk3cmd.exe


Programmer parameters

Adds command line parameters for the Programmer application.

Default:

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


To use the PICkit2 programmer change the parameters to

-B$(appdir)Tools\PICkit2\ -P%a -F%f.hex -M -R


To use the PICkit3 programmer change the parameters to

$(appdir)Tools\PICkit3\ -P%p -F%f.hex -E -M


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 PPP as used in previous versions of Flowcode.


Configuration Location

Sets the Configuration application location.

Default:

$(appdir)Tools\PPP\PPPv3.exe


Configuration parameters

Supplies the command line parameters needed for configuration.

Default:

-cs 1 -chip %a -config


Note: The above Programmer defaults assume that you are using the mLoader 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. 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.

Gen Compiler Options File Viewer PIC16.png


Alternatively configuration words can be embedded into the program using the Supplementary code feature, or C Code icons.


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:

C:\Windows\Notepad.exe


File Viewer parameters

Adds command line parameters for the File viewer program

Default Assembly file viewer:

$(outdir)$(target).asm

Default external program to view source files:

$(outdir)$(target).c