Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 2. Compiler reference
167
Compiler options
This chapter explains how to set the compiler options from the command line, 
and gives detailed reference information about each option.
Refer to the AVR® IAR Embedded Workbench™ IDE User Guide
 
for information 
about the compiler options available in IAR Embedded Workbench and how 
to set them.
Setting command line options
To set compiler options from the command line, include them on the command line after 
the 
iccavr
 command, either before or after the source filename. For example, when 
compiling the source 
prog.c
, use the following command to generate an object file 
with debug information:
iccavr prog --debug
Some options accept a filename, included after the option letter with a separating space. 
For example, to generate a listing to the file 
list.lst
:
iccavr prog -l list.lst 
Some other options accept a string that is not a filename. The string is included after the 
option letter, but without a space. For example, to define a symbol:
iccavr prog -DDEBUG=1 
Generally, the order of options on the command line, both relative to each other and to 
the source filename, is not significant. There is, however, one exception: when you use 
the -
I
 option, the directories are searched in the same order as they are specified on the 
command line.
Note that a command line option has a short name and/or a long name:
A short option name consists of one character, with or without parameters. You 
specify it with a single dash, for example 
-e
A long name consists of one or several words joined by underscores, and it may 
have parameters. You specify it with double dashes, for example 
--char_is_signed
.