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 attribute.
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 attribute 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 7.9.25.