Atmel CAVR-4 ユーザーズマニュアル
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
CAVR-4
206
Descriptions of extended keywords
AVR® IAR C/C++ Compiler
Reference Guide
_ _ext_io
Controls the storage of data objects in data memory space.
The
_ _ext_io
memory attribute implies that objects are
_ _no_init
and volatile, and
allows objects to be accessed by use of the special I/O instructions in the AVR
microcontroller.
microcontroller.
Your application may access the AVR I/O system by using the memory-mapped internal
special function registers (SFRs). To access the AVR I/O system efficiently, the
special function registers (SFRs). To access the AVR I/O system efficiently, the
_ _ext_io
memory attribute should be included in the code.
_ _far
Controls the storage of data objects in data memory space.
The
_ _far
memory attribute overrides the default data storage of variables given by the
selected memory model.
Note: When the
_ _far
memory attribute is used, the object cannot cross a 64-Kbyte
boundary. Arithmetics will only be performed on the two lower bytes, except
comparison which is always performed on the entire 24-bit address.
comparison which is always performed on the entire 24-bit address.
_ _farflash
Controls the storage of data objects in flash (code) memory space.
The
_ _farflash
memory attribute places objects in flash (code) memory.
Note that it is preferable to declare flash objects as
const
. The
_ _farflash
memory
attribute is only available for AVR chips with at least 64 Kbytes of flash memory.
The index type uses 16-bit arithmetic, which implies that a 64-Kbyte boundary cannot
be crossed.
be crossed.
Note: When the
_ _farflash
memory attribute is used, the object cannot cross a
64-Kbyte boundary. Arithmetics will only be performed on the two lower bytes, except
comparison which is always performed on the entire 24-bit address.
comparison which is always performed on the entire 24-bit address.
Address range
Max object size
Pointer size
Memory space
0x100-0xFFFF
4 bytes (32 bits)
Pointers not allowed Data
Table 56: Near address ranges
Address range
Max object size
Pointer size
Memory space
0-0xFFFFFF
(16 Mbytes)
65535 bytes
24 bits
Data
Table 57: Far address ranges
Address range
Max object size
Pointer size
Memory space
0-0x7FFFFF
(8 Mbytes)
65535 bytes
24 bits
Code
Table 58: Farflash address ranges