JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++


The IAR Compiler Models



Using the Model

The IAR compiler models are provided for use with all IAR compilers.

Compiler
model
Native compiler Source file extensions Description
iccarm iccarm any IAR ARM compiler v. 5.30.0.51174.
iccavr iccavr any IAR AVR compiler.
iccm32c iccm32c any IAR M32C compiler v. 3.21A/W32.
icc430 icc430 any IAR MSP430 compiler v. 4.20.1.20017/W32.
icc78k icc78k any IAR Renesas 78k compiler
iccrx iccrx any IAR RX compiler v. 4.13.
iccstm8 iccstm8 any IAR STM8 compiler.
iccv850 iccv850 any IAR C/C++ Compiler for V850.
iccgeneric other any Use for other IAR compilers.

Compiler model alias iar is also available: this is always treated as iccgeneric.

File Extensions

Typical file extensions are .c and .cpp, but all file extensions (including no extension) are accepted. Note in particular that file extensions don't imply source language. File fname.cpp will be compiled as C code unless --c++, --ec++ or --eec++ is specified.

If a file name is specified without an extension and a file with that name does not exist, the model will append .c. For example, if myfile does not exist, then the following command line will compile myfile.c (if it exists).

iccarm myfile

Availability

Platform Availability The icc430, icc78k, iccarm, iccavr, iccm32c, iccrx, iccstm8, iccv850, and iccgeneric compiler models are available for all platforms.
Default Recognition/Handling By default, compilations are recognized and handled as follows.
Platform Native Compiler Model Used
Windows only icc430.exe icc430
Windows only icc78k.exe icc78k
Windows only iccarm.exe iccarm
Windows only iccavr.exe iccavr
Windows only iccm32c.exe iccm32c
Windows only iccrx.exe iccrx
Windows only iccstm8.exe iccstm8
Windows only iccv850.exe iccv850
Specifying Additional Mappings On other systems, edit your configuration file to add COMPILER_MODELS rules instructing CodeSonar to use the IAR compiler model:
COMPILER_MODELS += iccarm -> iccarm
COMPILER_MODELS += iccavr -> iccavr
COMPILER_MODELS += iccm32c -> iccm32c
COMPILER_MODELS += icc430 -> icc430
COMPILER_MODELS += icc78k -> icc78k
COMPILER_MODELS += iccrx -> iccrx
COMPILER_MODELS += iccstm8 -> iccstm8
COMPILER_MODELS += iccv850 -> iccv850
COMPILER_MODELS += iccm16c -> iccm16c
If you are using an IAR compiler that is not directly modeled, edit your configuration file to add a suitable COMPILER_MODELS rule.
For example, suppose you are using the IAR 8051 compiler. Its executable is icc8051.exe on Windows, icc8051 on other platforms, so your rule will look something like the following.
Windows:
COMPILER_MODELS += icc8051.exe -> iccgeneric
Other systems:
COMPILER_MODELS += icc8051 -> iccgeneric

If you encounter unexpected parse errors, contact CodeSecure support for assistance.

For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.

Command Arguments

Command arguments can be specified:

 

To report problems with this documentation, please visit https://support.codesecure.com/.