Atmel CAVR-4 Manual De Usuario
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
CAVR-4
Part 2. Compiler reference
Compiler options
187
By default the compiler generates code for the Tiny memory model for all processor
options except
options except
-v4
and
-v6
where the Small memory model is the default.
Use the
-m
or the
--memory_model
option if you want to generate code for a different
memory model.
For example, to generate code for the Large memory model, give the command:
iccavr filename -ml
or:
iccavr filename --memory_model=large
To read more about the available memory models, see Memory model, page 9.
These options are related to the Memory model option in the General Options
category in IAR Embedded Workbench.
category in IAR Embedded Workbench.
--migration_preprocessor_
extensions
--migration_preprocessor_extensions
If you need to migrate code from an earlier IAR C or C/C++ compiler, you may want to
use this option. With this option, the following can be used in preprocessor expressions:
use this option. With this option, the following can be used in preprocessor expressions:
●
Floating-point expressions
●
Basic type names and sizeof
●
All symbol names (including typedefs and variables).
Note: If you use this option, not only will the compiler accept code that is not standard
conformant, but it will also reject some code that does conform to the standard.
conformant, but it will also reject some code that does conform to the standard.
Important! Do not depend on these extensions in newly written code, as support for
them may be removed in future compiler versions.
them may be removed in future compiler versions.
--misrac
--misrac[={tag1,tag2-tag3,…|all|required}]
Use this option to enable the compiler to check for deviations from the rules described
in the MISRA Guidelines for the Use of the C Language in Vehicle Based Software. By
using one or more arguments with the option, you can restrict the checking to a specific
subset of the MISRA C rules. The possible arguments are described in this table:
in the MISRA Guidelines for the Use of the C Language in Vehicle Based Software. By
using one or more arguments with the option, you can restrict the checking to a specific
subset of the MISRA C rules. The possible arguments are described in this table:
Command line option
Description
--misrac
Enables checking for all MISRA C rules
--misrac=n
Enables checking for the MISRA C rule with number n
--misrac=m,n
Enables checking for the MISRA C rules with numbers m
and n
Table 48: Enabling MISRA C rules (--misrac)