Atmel CAVR-4 Manuale Utente
CAVR-4
Part 2. Compiler reference
203
Extended keywords
This chapter describes the extended keywords that support specific features
of the AVR microcontroller, the general syntax rules for the keywords, and a
detailed description of each keyword.
For information about the address ranges of the different memory areas, see
the chapter Segment reference.
Summary of extended keywords
Some extended keywords are used on data, some on functions, and some can be used on
both data and functions.
both data and functions.
The keywords and the
@
operator are only available when language extensions are
enabled in the AVR IAR C/C++ Compiler.
In IAR Embedded Workbench, language extensions are enabled by default.
Use the
-e
compiler option to enable language extensions. See -e, page 179 for
additional information.
The following table summarizes the extended keywords that can be used on functions:
Extended keywords for
functions
Description
@
Controls the storage of variables and functions
asm
, __asm
Inserts an assembler instruction
_ _farfunc
Controls the storage of functions in code memory space
_ _interrupt
Creates an interrupt function
_ _intrinsic
Reserved for compiler internal use only
_ _monitor
Supports atomic execution of a function
_ _nearfunc
Controls the storage of functions in code memory space
_ _noreturn
Informs the compiler that the declared function will not return
_ _root
Ensures that a function or variable is included in the object code even
if unused
_ _task
Allows functions to exit without restoring registers
_ _version_1
Uses old calling convention; available for backward compatibility.
Table 53: Summary of extended keywords for functions