Specifications

CAVR-4
234
Predefined symbols
AVR® IAR C/C++ Compiler
Reference Guide
The value (m) corresponding to the --memory_model option in use; where the
value 1 corresponds to Tiny, the value 2 corresponds to Small, and the value 3
corresponds to Large.
The __TID__value is constructed as:
((t << 8) | (c << 4) | m)
You can extract the values as follows:
To find the value of the target identifier for the current compiler, execute:
printf("%ld",(__TID__ >> 8) & 0x7F)
Note: The use of __TID__ is not recommended. We recommend that you use the
symbols __ICCAVR__ and __CORE__ instead.
__TIME__
Current time.
Expands to the time of compilation in the form
hh:mm:ss.
__VER__
Compiler version number.
Expands to an integer representing the version number of the compiler. The value of the
number is calculated in the following way:
(100 * the major version number + the minor version number)
Example
The example below prints a message for version 3.34.
#if __VER__ == 334
#pragma message("Compiler version 3.34")
#endif
In this example, 3 is the major version number and 34 is the minor version number.
__VERSION_1_CALLS__
Calling convention.
Expands to 1 if the used calling convention is the old calling convention used in
compiler version 1.x. If zero, the new calling convention is used.
t = (__TID__ >> 8) & 0x7F; /* target identifier */
c = (__TID__ >> 4) & 0x0F; /* cpu core */
m = __TID__ & 0x0F; /* memory model */