|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
I'm trying to reference a global variable using in-line assembler, but when the project builds I get the following error:
<module_name>.SRC (line) Error A45: UNDEFINED SYMBOL (PASS-2)
The global variable is defined as extern in my header file. What's wrong?
Your C code does not reference that global variable, so the compiler does not add it to the .SRC file when it is built. In these rare cases, you will have to add the external declaration as in-line assembly code for that module as follows:
#pragma asm EXTRN DATA (variable_name) #pragma endasm
Article last edited on: 2007-02-20 17:39:11
Did you find this article helpful? Yes No
How can we improve this article?