|
|||||||||||
|
Technical Support Support Resources
Product Information |
BL51: Warning 6 (XDATA Memory Space Overlap) Using _AT_Information in this article applies to:
QUESTIONHelp! I get a linker warning:
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? ANSWERWhen 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:
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:
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. MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
|||||||||||
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.