Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 2. Compiler reference
Compiler options
193
--only_stdout
--only_stdout 
Use this option to make the compiler use the standard output stream (
stdout
) also for 
messages that are normally directed to the error output stream (
stderr
).
 --preinclude
--preinclude includefile
Use this option to make the compiler include the specified include file before it starts to 
read the source file. This is useful if you want to change something in the source code 
for the entire application, for instance if you want to define a new symbol.
--preprocess
--preprocess[=[c][n][l]] {filename|directory}
Use this option to direct preprocessor output to a named file.
The following table shows the mapping of the available preprocessor modifiers:
 
 
If a 
filename
 is specified, the compiler stores the output in that file. 
If a 
directory
 is specified, the compiler stores the output in that directory, in a file with 
the extension 
i
. The filename will be the same as the name of the compiled source file, 
unless a different name has been specified with the option 
-o
, in which case that name 
will be used.
To specify the working directory, replace 
directory
 with a period (
.
).
Example 1
To store the compiler output with preserved comments to the file 
output.i
, use:
iccavr prog --preprocess=c output
Example 2
If you compile the file 
mysource.c
 and want to store the compiler output with 
#line
 
directives to a file 
mysource.i
 in the working directory, you could use:
iccavr mysource --preprocess=l .
Note: Both 
\
 and 
/
 can be used as directory delimiters.
Command line option
Description
--preprocess=c
Preserve comments
--preprocess=n
Preprocess only
--preprocess=l
Generate #line directives
Table 49: Directing preprocessor output to file (--preprocess)