The compiler supports the ability to specify the run-time address of a variable at the source level. This can be accomplished with the LOCATION pragma or the GCC-style location attribute.
NOTE
This pragma is supported only when used with EABI. It is not supported with the COFF ABI.
The LOCATION pragma has the same effect as using the GCC-style location function attribute. See Section 6.16.2.
The syntax of the pragma in C is:
#pragma LOCATION(x,address) |
intx |
The syntax of the pragmas in C++ is:
#pragma LOCATION(address) |
intx |
The syntax of the GCC-style attribute (see Section 6.16.3) is:
intx__attribute__((location(address))) |
The NOINIT pragma may be used in conjunction with the LOCATION pragma to map variables to special memory locations; see Section 6.10.19.