Tool/software: TI C/C++ Compiler
I'm full of questions today...
Here's another: I want to access a global variable declared in a C file from an assembly language file.
The variable, compmode, is declared as "uint32_t compmode" in a C file. I have the following assembler code:
.ref compmode ; reference to a variable defined in C file
.asmfunc
testmode
ldr r1,compmode ; error occurs here!
ldr r1,[r1]
.
.
.
When this file gets assembled, I get an error "ERROR! at line xx: [E0001] Address must be defined in the current section".
How do I fix this so it assembles correctly?
Thanks!