Specifications
CAVR-4
38
Data segments
AVR® IAR C/C++ Compiler
Reference Guide
would yield the segment base name
NEAR.
The suffix indicates what type of declared data the segment holds. The following table
summarizes the different suffixes, which XLINK segment memory type they are, and
which category of declared data they denote:
For information about the static data segments, their possible memory ranges, and in
what type of memory they can be placed, see the chapter Segment reference in this guide.
For more details about segment memory types, see Segment memory type, page 34.
Examples
Assume the following examples:
Suffix Categories of declared data
_N Non-initialized data
_Z Zero-initialized data
_I Non-zero initialized data
_ID Initializers for the above
_C Constants
_F Data placed in flash memory
_AN Non-initialized absolute addressed data
_AC Constant absolute addressed data
Table 11: Segment name suffixes
__near int j;
__near int i = 0;
The near variables that are to be initialized to zero
when the system starts will be placed in the segment
NEAR_Z.
__no_init __near int j; The near non-initialized variables will be placed in the
segment NEAR_N.
__near int j = 4;
When using the -y option, the near non-zero
initialized variables will be placed in the segment
NEAR_I, and initializer data in segment NEAR_ID.