Specifications

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.
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