|ARM Technical Support Knowledge Articles|
Applies to: LX51 Linker/Locator
Information in this article applies to:
I am using a SmartMX controller that includes an SFR register with the name EXCINFO. Now I have also defined a public variable with the name Excinfo. It appears that this causes the following linker errors:
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: EXCINFO *** WARNING L46: SFR SYMBOL HAS DIFFERENT VALUES SYMBOL: EXCINFO
What is the reason for this errors?
The C51 and CX51 compiler is only case sensitive at C source level. At linker level the public symbols are not case sensitive. This is required to provide compatibility to assembler code, where all symbols are not case sensitive.
Therefore, you need to avoid defining identical symbol names that are public. You may for example define symbols using the static keyword to avoid such problems.
static unsigned char Excinfo; // now the symbol is not PUBLIC
Article last edited on: 2007-01-08 14:33:29
Did you find this article helpful? Yes No
How can we improve this article?