Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
Part 2. Compiler reference
Compiler options
189
Example
The following example—in which 
%1
 is an operating system variable containing the 
name of the source file—will give duplicate name errors from the linker:
preproc %1.c temp.c
; preprocess source,  
 
; generating temp.c
iccavr temp.c 
; module name is  
 
; always 'temp'
To avoid this, use 
--module_name=name
 to retain the original name:
preproc %1.c temp.c
; preprocess source,  
 
; generating temp.c
iccavr temp.c --module_name=%1
; use original source 
 
; name as module name
Note: In this example, 
preproc
 is an external utility.
To set the equivalent option in IAR Embedded Workbench, select 
Project>Options>C/C++ Compiler>Output.
--no_clustering
--no_clustering
This option will disable clustering of variables. Clustered variables may be accessed 
through a common base pointer which will, in most cases, reduce the size of the 
generated code.
--no_code_motion
--no_code_motion 
Use this option to disable optimizations that move code. These optimizations, which are 
performed at optimization levels 6 and 9, normally reduce code size and execution time. 
However, the resulting code may be difficult to debug.
Note: This option has no effect at optimization levels below 6.
To set the equivalent option in IAR Embedded Workbench, select 
Project>Options>C/C++ Compiler>Code.
--no_cross_call
--no_cross_call
Use this option to disable the cross-call optimization. This is highly recommended if 
your target processor has a hardware stack or a small internal return stack segment, 
RSTACK
, since this option reduces the usage of 
RSTACK
This optimization is performed at size optimization, level 7–9. Note that, although it can 
drastically reduce the code size, this option increases the execution time.