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

From Flowcode Help
Jump to navigationJump to search
 
(6 intermediate revisions by 3 users not shown)
Line 8: Line 8:
  
  
'''Substitute variables used by Flowcode'''
+
[[Managing_Compiler_Options#Compiler_variables|Substitute variables used by Flowcode]] are the same for all platforms.
  
'''%T'''      Target name as written e.g. <code>'''atmega32'''</code>
+
__NOTOC__
 +
==Compiler==
 +
[[File:Gen_Compiler_Options_Compiler_AVR.png|right|524x400px]]
 +
'''Compiler location'''
  
: (generally used by the compiler)
+
Sets the location of the file controlling compilation
  
'''%t'''        Target name forced to lower-case
+
Default:
  
'''%p'''       Target name forced to upper-case
+
<code>'''$(compileravr)batchfiles\avra.bat'''</code>
  
'''%a'''      Alternative target name as written <code>'''e.g. m32'''</code>
 
  
: (generally used by the programmer)
+
'''Compiler parameters'''
  
'''%A'''      Alternative target name forced to upper-case
+
Adds command line parameters when called from flowcode
  
'''%f'''        Long file name without extension e.g. <code>'''C:\Development\Flowcode\TestProgram.fcf'''</code> becomes:
+
Default:
 +
 
 +
<code>'''$(chip:l) "$(outdir)$(target).elf" "$(outdir)$(target).c" "$(outdir)$(target).lst"'''</code>
  
: TestProgram
 
  
'''%F'''      Short filename without extension e.g. <code>'''C:\Development\Flowcode\TestProgram.fcf'''</code> becomes:
 
  
: <code>'''TestPr~1'''</code>
 
  
'''%d'''      Long file path for the Flowcode file e.g. <code>'''C:\Development\Flowcode\TestProgram.fcf'''</code> becomes:
 
  
: C:\Development\Flowcode
 
  
'''%D'''      Short file path for the Flowcode file <code>'''C:\Development\Flowcode\TestProgram.fcf'''</code> becomes:
 
  
: <code>'''C:\Develo~1\Flowcode'''</code>
 
  
[[File:Gen_Compiler_Options_Compiler_AVR.png|right|524x400px]]
 
  
'''%c0'''      Configuration byte count
 
  
'''%c1'''      Configuration byte #1
 
  
'''%c2'''      Configuration byte #2
 
  
'''%c3'''      Configuration byte #3
 
  
  
'''Compiler location'''
+
==Linker/Assembler==
 +
[[File:Gen_Compiler_Options_Linker_Assembler_AVR.png|right|524x400px]]
 +
'''Linker/Assembler location'''
  
Sets the location of the file controlling compilation
+
Sets the location of the file controlling linking and assembly
  
 
Default:
 
Default:
  
<code>'''$(appdir)compilers\avr\batchfiles\avra.bat'''</code>
+
<code>'''$(compileravr)batchfiles\avrb.bat'''</code>
  
  
'''Compiler parameters'''
+
'''Linker/Assembler parameters'''
  
 
Adds command line parameters when called from flowcode
 
Adds command line parameters when called from flowcode
Line 66: Line 60:
 
Default:
 
Default:
  
<code>'''$(chip:l) "$(outdir)$(target).elf" "$(outdir)$(target).c" "$(outdir)$(target).lst"'''</code>
+
<code>'''<empty>'''</code>
[[File:Gen_Compiler_Options_Linker_Assembler_AVR.png|right|524x400px]]
+
 
<br /><br />
+
There are no default parameters
'''Linker/Assembler location'''
+
 
 +
 
 +
 
 +
 
 +
 
  
Sets the location of the file controlling linking and assembly
 
  
Default:
 
  
<code>'''$(appdir)compilers\avr\batchfiles\avrb.bat'''</code>
 
  
  
'''Linker/Assembler parameters'''
 
  
Adds command line parameters when called from flowcode
 
  
Default:
 
  
<code>'''<empty>'''</code>
 
  
There are no default parameters
+
==Programmer==
 
[[File:Gen_Compiler_Options_Programmer_AVR.png|right|524x400px]]
 
[[File:Gen_Compiler_Options_Programmer_AVR.png|right|524x400px]]
<br /><br />
 
 
'''Programmer location'''
 
'''Programmer location'''
  
 
Sets the location of the file controlling the programming of the target device
 
Sets the location of the file controlling the programming of the target device
  
Default:
+
Default HP3006 AVR Programmer:
 +
 
 +
<code>'''$(compileravr)batchfiles\avrc_usbtiny.bat'''</code>
 +
 
 +
 
 +
AVRISPmkII AVR Programmer:
 +
 
 +
<code>'''$(compileravr)batchfiles\avrc.bat'''</code>
  
<code>'''$(appdir)compilers\avr\batchfiles\avrc.bat'''</code>
 
  
  
Line 117: Line 113:
  
  
Note: The above parameters assume you are using the AVRDUDE programming application and AVRISPmkII programmer. If you are using an alternative programming application or programmer you will need to consult the relevant documentation for the required parameters and settings.
+
[[Supporting_Third_Party_Programming_Tools|Click here for details on using a third party programming e.g. AVRISP]]
[[File:Gen_Compiler_Options_File_Viewer_AVR.png|right|524x400px]]
 
<br /><br />
 
'''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).lst'''</code>
 
 
 
Default external program to view source files:
 
 
 
<code>'''$(outdir)$(target).c'''</code>
 

Latest revision as of 10:39, 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 AVR.png

Compiler location

Sets the location of the file controlling compilation

Default:

$(compileravr)batchfiles\avra.bat


Compiler parameters

Adds command line parameters when called from flowcode

Default:

$(chip:l) "$(outdir)$(target).elf" "$(outdir)$(target).c" "$(outdir)$(target).lst"








Linker/Assembler

Gen Compiler Options Linker Assembler AVR.png

Linker/Assembler location

Sets the location of the file controlling linking and assembly

Default:

$(compileravr)batchfiles\avrb.bat


Linker/Assembler parameters

Adds command line parameters when called from flowcode

Default:

<empty>

There are no default parameters








Programmer

Gen Compiler Options Programmer AVR.png

Programmer location

Sets the location of the file controlling the programming of the target device

Default HP3006 AVR Programmer:

$(compileravr)batchfiles\avrc_usbtiny.bat


AVRISPmkII AVR Programmer:

$(compileravr)batchfiles\avrc.bat


Programmer parameters

Adds command line parameters when called from flowcode

Default:

AVRDUDE $(chipalt) $(chip:l) "$(outdir)$(target).hex" "$(target).hex" 0 $(cfg0) $(cfg1) $(cfg2) $(cfg3)


Use programmer to set configuration options

This box should be left unchecked


Configuration parameters

This box should be left empty. Configuration parameters are set and downloaded from the Build > Configure menu.


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