|ARM Technical Support Knowledge Articles|
Applies to: BL51 Code-banking Linker/Locator
Information in this article applies to:
Help! I get a linker warning:
Warning L6: XDATA Space Memory Overlap
I have multiple C files in my project and am using the _at_ keyword to declare a lot of XDATA variables at fixed addresses. What could be the problem?
When you use the _at_ keyword in your global xdata variables, make sure that you do not use the extern and _at_ in the same line. Your global variable declaration should look something like:
xdata unsigned char variable _at_ 0x8000;
This line should be in a .C file.
If you put the above declaration in a header (.H) file, you need to protect it from being declared in more than one file. This is required so there are not multiple declarations of the same variable at the same address.
If you refer to this variable in another C file, you must use the extern keyword. However, you cannot use the _at_ keyword or the associated address. Your extern reference will look like:
extern xdata unsigned char variable;
Notice that there can be no _at_ 0x8000 reference in this line of code.
An alternative solution is to use C MACRO definitions as defined in the header file ABSACC.h.
Article last edited on: 2006-02-20 11:05:58
Did you find this article helpful? Yes No
How can we improve this article?