Atmel CAVR-4 Manuale Utente
CAVR-4
Part 2. Compiler reference
Data representation
145
Type attributes can be further divided into memory attributes and general type
attributes.
attributes.
Memory attributes
A memory attribute corresponds to a certain logical or physical memory in the
microcontroller.
microcontroller.
●
Available memory attributes for functions:
_ _nearfunc
, and
_ _farfunc
●
Available memory attributes for data objects:
_ _tiny
,
_ _near
,
_ _far
,
_ _huge
,
_ _regvar
,
_ _eeprom
,
_ _tinyflash
,
_ _flash
,
_ _farflash
,
_ _hugeflash
,
_ _generic
,
_ _io
, and
_ _ext_io
For each level of indirection, you can only specify one memory attribute.
General type attributes
The following general type attributes are available:
●
Function type attributes change the calling convention of a function:
_ _interrupt
,
_ _task
, and
_ _version_1
●
Data type attributes:
const
, and
volatile
For each level of indirection, you can specify as many type attributes as required.
To read more about volatile, see Declaring objects volatile, page 146.
OBJECT ATTRIBUTES
Object attributes affect functions and data objects, but not how the function is called or
how the data is accessed. This means that an object attribute does not need to be present
in the declaration of an object.
how the data is accessed. This means that an object attribute does not need to be present
in the declaration of an object.
The following object attributes are available:
●
Object attributes that can be used for variables:
_ _no_init
●
Object attributes that can be used for functions and variables:
location
,
@
, and
_ _root
●
Object attributes that can be used for functions:
_ _intrinsic
,
_ _monitor
,
_ _noreturn
, and
vector.
Note: The
_ _intrinsic
attribute is reserved for compiler internal use only.
You can specify as many object attributes as required.