3.3.3.1 How Do I Position Variables at an Address I Nominate?
The easiest way to do this is to make the variable absolute by using the
address
attribute (see 9.11 Variable Attributes) or the
__at()
CCI construct (see 25.4.2 Absolute Addressing). This means that the
address you specify is used in preference to the variable’s symbol in generated code. Since
you nominate the address, you have full control over where objects are positioned, but you
must also ensure that absolute variables do not overlap.
See also 10.3 Auto Variable Allocation and Access for information on moving auto variables, 10.2.1 Non-Auto Variable Allocation for moving non-auto variables and 10.4 Variables in Program Memory for moving program-space variables.