Specifications
CAVR-4
Part 2. Compiler reference
Segment reference
151
Descriptions of segments
The following section gives reference information about each segment. For detailed
information about the extended keywords mentioned here, see the chapter Extended
keywords.
CODE
Holds __nearfunc program code.
XLINK segment memory type
CODE
Memory space
Flash. The address range is 0x0–0x01FFFE.
Description
By default, functions are placed in the CODE segment when using any of the processor
options -v0, -v1, -v2, -v3, or -v4. A function is also placed in the CODE segment if
you are using any of the processor options
-v5 or -v6 and explicitly declare the function
__nearfunc.
CSTACK
Holds the internal data stack.
XLINK segment memory type
DATA
Memory space
Data. The address range depends on the memory model:
Memory model Address range Comment
Tiny 0x0–0xFF
Small 0x0–0xFFFF
Large 0x0–0xFFFFFF Maximum 64 Kbytes stack.
CSTACK must not cross a 64-Kbyte
boundary.
Table 39: Memory models