| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.36.4 MeP Variable Attributes
The MeP target has a number of addressing modes and busses. The
near space spans the standard memory space’s first 16 megabytes
(24 bits). The far space spans the entire 32-bit memory space.
The based space is a 128-byte region in the memory space that
is addressed relative to the $tp register. The tiny
space is a 65536-byte region relative to the $gp register. In
addition to these memory regions, the MeP target has a separate 16-bit
control bus which is specified with cb attributes.
basedAny variable with the
basedattribute is assigned to the.basedsection, and is accessed with relative to the$tpregister.tinyLikewise, the
tinyattribute assigned variables to the.tinysection, relative to the$gpregister.nearVariables with the
nearattribute are assumed to have addresses that fit in a 24-bit addressing mode. This is the default for large variables (-mtiny=4is the default) but this attribute can override-mtiny=for small variables, or override-ml.farVariables with the
farattribute are addressed using a full 32-bit address. Since this covers the entire memory space, this allows modules to make no assumptions about where variables might be stored.ioio (addr)Variables with the
ioattribute are used to address memory-mapped peripherals. If an address is specified, the variable is assigned that address, else it is not assigned an address (it is assumed some other module assigns an address). Example:int timer_count __attribute__((io(0x123)));
cbcb (addr)Variables with the
cbattribute are used to access the control bus, using special instructions.addrindicates the control bus address. Example:int cpu_clock __attribute__((cb(0x123)));
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on October 19, 2013 using texi2html 5.0.
