This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler: Accessing DSP linker symbols in C code

Tool/software: TI C/C++ Compiler

Hello,

I am trying to access an assigned linker symbol from the C source code using the DSP in TDA2xx.

I am currently using tool version TI v8.1.0

i.e

i have a linker symbol __testSym =0xF7000000

i would expect, in the C code, the something like:

extern char __testSym;

unsigned int testSym;

testSym=(unsigned int)&__testSyml;

will make testSym variable get the value of the __testSym == 0xF7000000

This does not seem to be working.

i tried to remove the & symbol from the assignment and also do extern unsigned int to the symbol, but nothing seem to be working:

extern unsigned int __testSym;

unsigned int testSym;

testSym=(unsigned int)__testSyml;

When looking on the symbol in code composer (using JTAG) in the expression view, is shows the correct value (&__testSym does NOT work only directly referring to __testSym), however when i try to assign it to another variable, the variable does NOT get to appropriate value (0xF7000000) but instead is assigned some other value which i am not sure where is came from.

Can you please help (could this be some compiler bug?) how to i get the value of the linker symbol in C

Thanks

Guy