Atmel CAVR-4 Manual De Usuario
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
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.
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:
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.
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 */