Atmel CAVR-4 Manuale Utente
CAVR-4
220
Descriptions of pragma directives
AVR® IAR C/C++ Compiler
Reference Guide
#pragma language
#pragma language={extended|default}
The
#pragma
language
directive is used for turning on the IAR language extensions
or for using the language settings specified on the command line:
#pragma location
#pragma location=address
The
#pragma
location
directive specifies the location—the absolute address—of the
variable whose declaration follows the pragma directive. For example:
#pragma location=0x2000
char PORT1; /* PORT1 is located at address 0x2000 */
The directive can also take a string specifying the segment placement for either a
variable or a function, for example:
variable or a function, for example:
#pragma location="foo"
For additional information and examples, see Located data, page 46.
#pragma message
#pragma message(message)
Makes the compiler print a message on
stdout
when the file is compiled. For example:
#ifdef TESTING
#pragma message("Testing")
#endif
#pragma object_attribute
#pragma object_attribute=keyword
The
#pragma
object_attribute
directive affects the definition of the identifier that
follows immediately after the directive. The object is modified, not its type.
The following keyword can be used with
#pragma
object_attribute
for a variable:
The following keyword can be used with
#pragma
object_attribute
for a variable:
extended
Turns on the IAR language extensions and turns off the
--strict_ansi
command line option.
default
Uses the settings specified on the command line.
_ _no_init
Suppresses initialization of a variable at startup.
_ _monitor
Supports atomic execution of a function.