Atmel CAVR-4 사용자 설명서
CAVR-4
Part 2. Compiler reference
Extended keywords
209
_ _hugeflash
Controls the storage of data objects in flash (code) memory space.
The
_ _hugeflash
memory attribute places objects in flash (code) memory.
Note that it is preferable to declare flash objects as constant. The
_ _hugeflash
memory attribute is only available for AVR chips with at least 64 Kbytes of flash
memory.
memory.
__
interrupt
Creates an interrupt function.
The __
interrupt
keyword specifies interrupt functions. The
#pragma
vector
directive can be used for specifying the interrupt vector(s), see #pragma vector, page
225. An interrupt function must have a
225. An interrupt function must have a
void
return type and cannot have any
parameters.
The following example declares an interrupt function with an interrupt vector with offset
0x14
in the
INTVEC
segment:
#pragma vector=0x14
_ _interrupt void my_interrupt_handler(void);
An interrupt function cannot be called directly from a C program. It can only be
executed as a response to an interrupt request.
executed as a response to an interrupt request.
It is possible to define an interrupt function without a vector, but then the compiler will
not generate an entry in the interrupt vector table. For additional information, see
INTVEC, page 160.
not generate an entry in the interrupt vector table. For additional information, see
INTVEC, page 160.
The range of the interrupt vectors depends on the device used.
The header file
ioderivative.h
, where
derivative
corresponds to the selected
derivative, contains predefined names for the existing interrupt vectors.
For additional information, see Interrupt functions, page 29.
Address range
Max object size
Pointer size
Memory region
0-0x7FFFFF
(8 Mbytes)
8 Mbytes
24 bits
Code
Table 63: Hugeflash address ranges