Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
186
Descriptions of options
AVR® IAR C/C++ Compiler
Reference Guide
Example 2
If you compile the file 
mysource.c
 and want to generate a listing to a file 
mysource.lst
 in the working directory, you could use:
iccavr mysource -l .
Note: Both 
\
 and 
/
 can be used as directory delimiters.
To set the equivalent option in IAR Embedded Workbench, select 
Project>Options>C/C++ Compiler>List.
--library_module
--library_module 
Use this option to make the compiler generate a library module rather than a program 
module. A program module is always included during linking. A library module will 
only be included if it is referenced in your program.
To set the equivalent option in IAR Embedded Workbench, select 
Project>Options>C/C++ Compiler>Output.
--lock_regs
--lock_regs N
Use this option to lock registers that are to be used for global register variables. The 
value 
N
 can be 
0–12
 where 
0
 means that no registers are locked. When you use this 
option, the registers 
R15
 and downwards will be locked.
In order to maintain module consistency, make sure to lock the same number of registers 
in all modules.
Note: Locking more than nine registers may cause linking to fail. Because the pre-built 
libraries delivered with the product do not lock any registers, a library function may 
potentially use any of the lockable registers. Any such resource conflict between locked 
registers and compiler-used registers will be reported at link time.
If you need to lock any registers in your code, the library must therefore be rebuilt with 
the same set of locked registers.
This option is related to the Code options in the C/C++ Compiler category in IAR 
Embedded Workbench.
-m, --memory_model
-m[tiny|t|small|s|large|l] 
--memory_model=[tiny|t|small|s|large|l] 
Specifies the memory model for which the code is to be generated.