Difference between revisions of "Managing Compiler Options"

From Flowcode Help
Jump to navigationJump to search
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<sidebar>Sidebar: Adding Finishing Touches</sidebar>
 
 
Flowcode helps you to manage different compiler settings efficiently by allowing you to save preset configurations and quickly switch between them using a dropdown menu. You can also import and export compiler settings across Flowcode installations.
 
Flowcode helps you to manage different compiler settings efficiently by allowing you to save preset configurations and quickly switch between them using a dropdown menu. You can also import and export compiler settings across Flowcode installations.
 +
<br /><br />
 +
[[File:Gen_Compiler_Options_Programmer_PIC.png|right]]
 +
===Option list===
  
 +
The list menu to the left shows all the currently saved compiler settings (including the default settings), clicking on any of these will load the options stored under that name.
  
'''<img>'''
 
  
 +
The default settings are locked and unable to be changed, you will need to create and save a new set of options to edit and configure the settings.
  
'''Option list'''
+
To create a new set of compiler options, first select the 'Save' [[File:Compiler_Options_Save.png]] button next to the 'Setting name:' box and type a new name for your settings. To create a new set of options select the 'Target platform:', 'Compiler language:' and choose which group to save it under, or create your own group to save it under, once these requirements have been chosen click 'OK' to save your option set.
  
This drop down menu shows all the currently saved compiler settings, clicking on any of these will load the options stored under that name.
+
Once your set of options has been created, you may alter and configure the settings and they will save automatically when you click 'OK' to apply and confirm the settings.
  
<default> - this will load the default compiler settings
 
  
<current> - these are the currently unsaved compiler settings
+
To delete a set of compiler options, select the arrow [[File:Btn_Arrow.png]] button next to the saved setting name from the down menu and press the 'Delete' option. This will bring up a menu to confirm that you wish to delete the setting, click 'Yes' and then the setting will be removed.
  
 +
===Compiler variables===
 +
The following variables are substituted into the compiler settings when Flowcode is to compile. In Flowcode 6 these settings are substituted in any field - this may be the pathname of the program to load or the arguments section.
  
To create a new set of compiler options, first input all the required data into the respective fields, then click inside the 'Options list' box and type a new name for your settings. To store the new settings under that name, click the '''save''' button. This will then save your new settings.
 
  
 +
In earlier versions of Flowcode these variables consisted of a percent '%' symbol followed by a single letter. From version 6 this has been replaced with more meaningful variable names, starting with a dollar '$' symbol and surrounded by brackets. So ''%T'' becomes ''$(chip)''.
  
To delete a set of compiler options, select it from the drop down menu and then once it has loaded press the '''delete''' button. This will then remove those settings.
+
{|class="wikitable" width=90%
 +
|-
 +
!width=20%|Flowcode 5 setting
 +
!width=20%|From Flowcode 6 setting
 +
!width=60%|Meaning
 +
|-
 +
|%T
 +
|$(chip)
 +
|Target name as written e.g. AT91SAM7S128 (generally used by the compiler)
 +
|-
 +
|%t
 +
|$(chip:l)
 +
|Target name forced to lower-case
 +
|-
 +
|%p
 +
|$(chip:u)
 +
|Target name forced to upper-case
 +
|-
 +
|%a
 +
|$(chipalt)
 +
|Alternative target name as written e.g. m32 (generally used by the programmer)
 +
|-
 +
|%A
 +
|$(chipalt:u)
 +
|Alternative target name forced to upper-case
 +
|-
 +
|''N/A''
 +
|$(family)
 +
|Family of chip, eg: 16F, 18F...
 +
|-
 +
|''N/A''
 +
|$(platform)
 +
|Platform name from the FCD file, eg: PIC, AVR, ARM, PIC16
 +
|-
 +
|''N/A''
 +
|$(chippath)
 +
|Full pathname of chip for identification in Flowcode, eg: PIC.16F.16F88
 +
|-
 +
|%f
 +
|$(target)
 +
|Long file name without extension e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
  
 +
    TestProgram
 +
|-
 +
|%F
 +
|''N/A''
 +
|Short filename without extension e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
  
'''Importing and exporting compiler options'''
+
    TestPr~1
 +
|-
 +
|%d
 +
|''N/A''
 +
|Long file path for the Flowcode files folder e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
  
Flowcode now allows you to import and export your compiler options, allowing you to store your configurations or pass them to another Flowcode user.
+
    C:\Development\Flowcode  
 +
|-
 +
|%D
 +
|$(srcdir)
 +
|Short file path for the Flowcode files folder C:\Development\Flowcode\TestProgram.fcfx becomes:
  
When clicking on the export button the program will prompt you to save the currently loaded configuration settings to somewhere on your harddrive.
+
    C:\Develo~1\Flowcode
Similarly on importing the program will prompt you to search for the desired '.fcs' file to use the settings as the current configuration.
+
|-
 +
|%D
 +
|$(outdir)
 +
|Short file path for the Flowcode output directory - by default the same as $(outdir)
 +
|-
 +
|''N/A''
 +
|$(appdir)
 +
|Path of the folder wither the Flowcode.exe is installed
 +
|-
 +
|''N/A''
 +
|$(cfga)
 +
|Address of config available, 0x... hexadecimal syntax
 +
|-
 +
|%c0
 +
|$(cfgb)
 +
|Configuration byte count
 +
|-
 +
|''N/A''
 +
|$(cfgen)
 +
|1 if config is enabled else 0
 +
|-
 +
|%c1
 +
|$(cfg0)
 +
|Config word 0
 +
|-
 +
|%c2 or %c3
 +
|$(cfg1) ... $(cfg''N'')
 +
|Config word 1 to ''N''
 +
|}
  
''Note: You may want to "save" the configuration after import as it will not store the settings in your current list.''
+
===Importing and exporting compiler options===
  
 +
Flowcode now allows you to import and export your compiler options, allowing you to store your configurations or pass them to another Flowcode user.
  
'''Chip specific compiler options'''
+
When clicking on the export button the program will prompt you to save the currently loaded configuration settings to somewhere on your harddrive.
  
[[Selecting Compiler Options (PIC micro)]]
+
Similarly on importing the program will prompt you to search for the desired '.fcs' file to use the settings as the current configuration.
 
 
[[|Selecting Compiler Options (dsPIC/PIC24)|Selecting Compiler Options (16-Bit PIC)]]
 
  
[[Selecting Compiler Options (AVR)]]
 
  
[[Selecting Compiler Options (ARM)]]
+
{| class="wikitable" style="margin:auto; width:70%; text-align:center;"
 +
|-
 +
! colspan="2"| '''Chip specific compiler options'''
 +
|-
 +
| width="40%" align="center" | [[Selecting Compiler Options (PICmicro)]]
 +
| width="60%" |Detailed information about specific PICmicro compiler options
 +
|-
 +
| width="40%" align="center" | [[Selecting Compiler Options (dsPIC/PIC24)]]
 +
| width="60%" |Detailed information about specific dsPIC/PIC24 compiler options
 +
|-
 +
| width="40%" align="center" | [[Selecting Compiler Options (AVR)]]
 +
| width="60%" |Detailed information about specific AVR compiler options
 +
|-
 +
| width="40%" align="center" | [[Selecting Compiler Options (ARM)]]
 +
| width="60%" |Detailed information about specific ARM compiler options
 +
|-
 +
| width="40%" align="center" | [[Selecting Compiler Options (ESP)]]
 +
| width="60%" |Detailed information about specific ESP compiler options
 +
|}

Latest revision as of 11:10, 21 March 2023

Flowcode helps you to manage different compiler settings efficiently by allowing you to save preset configurations and quickly switch between them using a dropdown menu. You can also import and export compiler settings across Flowcode installations.

Gen Compiler Options Programmer PIC.png

Option list

The list menu to the left shows all the currently saved compiler settings (including the default settings), clicking on any of these will load the options stored under that name.


The default settings are locked and unable to be changed, you will need to create and save a new set of options to edit and configure the settings.

To create a new set of compiler options, first select the 'Save' Compiler Options Save.png button next to the 'Setting name:' box and type a new name for your settings. To create a new set of options select the 'Target platform:', 'Compiler language:' and choose which group to save it under, or create your own group to save it under, once these requirements have been chosen click 'OK' to save your option set.

Once your set of options has been created, you may alter and configure the settings and they will save automatically when you click 'OK' to apply and confirm the settings.


To delete a set of compiler options, select the arrow Btn Arrow.png button next to the saved setting name from the down menu and press the 'Delete' option. This will bring up a menu to confirm that you wish to delete the setting, click 'Yes' and then the setting will be removed.

Compiler variables

The following variables are substituted into the compiler settings when Flowcode is to compile. In Flowcode 6 these settings are substituted in any field - this may be the pathname of the program to load or the arguments section.


In earlier versions of Flowcode these variables consisted of a percent '%' symbol followed by a single letter. From version 6 this has been replaced with more meaningful variable names, starting with a dollar '$' symbol and surrounded by brackets. So %T becomes $(chip).

Flowcode 5 setting From Flowcode 6 setting Meaning
%T $(chip) Target name as written e.g. AT91SAM7S128 (generally used by the compiler)
%t $(chip:l) Target name forced to lower-case
%p $(chip:u) Target name forced to upper-case
%a $(chipalt) Alternative target name as written e.g. m32 (generally used by the programmer)
%A $(chipalt:u) Alternative target name forced to upper-case
N/A $(family) Family of chip, eg: 16F, 18F...
N/A $(platform) Platform name from the FCD file, eg: PIC, AVR, ARM, PIC16
N/A $(chippath) Full pathname of chip for identification in Flowcode, eg: PIC.16F.16F88
%f $(target) Long file name without extension e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
   TestProgram 
%F N/A Short filename without extension e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
   TestPr~1 
%d N/A Long file path for the Flowcode files folder e.g. C:\Development\Flowcode\TestProgram.fcfx becomes:
   C:\Development\Flowcode 
%D $(srcdir) Short file path for the Flowcode files folder C:\Development\Flowcode\TestProgram.fcfx becomes:
   C:\Develo~1\Flowcode 
%D $(outdir) Short file path for the Flowcode output directory - by default the same as $(outdir)
N/A $(appdir) Path of the folder wither the Flowcode.exe is installed
N/A $(cfga) Address of config available, 0x... hexadecimal syntax
%c0 $(cfgb) Configuration byte count
N/A $(cfgen) 1 if config is enabled else 0
%c1 $(cfg0) Config word 0
%c2 or %c3 $(cfg1) ... $(cfgN) Config word 1 to N

Importing and exporting compiler options

Flowcode now allows you to import and export your compiler options, allowing you to store your configurations or pass them to another Flowcode user.

When clicking on the export button the program will prompt you to save the currently loaded configuration settings to somewhere on your harddrive.

Similarly on importing the program will prompt you to search for the desired '.fcs' file to use the settings as the current configuration.


Chip specific compiler options
Selecting Compiler Options (PICmicro) Detailed information about specific PICmicro compiler options
Selecting Compiler Options (dsPIC/PIC24) Detailed information about specific dsPIC/PIC24 compiler options
Selecting Compiler Options (AVR) Detailed information about specific AVR compiler options
Selecting Compiler Options (ARM) Detailed information about specific ARM compiler options
Selecting Compiler Options (ESP) Detailed information about specific ESP compiler options