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.
1. Memory, by typing its variable name in verbatim
2. Watch, by typing its variable name in verbatim
Zheng,
When you declare something static, it's location is not made public so you can't watch it in CCS. Often, the optimizer will store a static variable in a register instead of in memory. If you need to watch something, you will have to make it public and turn off optimizing.
I know this is annoying. I would like to use static variables to maintain encapsulation. When debugging your code and using watch, you will have to keep them public. Then when the bugs are gone, make them static.
Luke
Hello Zheng,
As already mentioned the static variable are not visible in CCS and MAP file because they can be in registers.
That is the answer that I have received from TI compiler team too.
However in huge projects the 99% of static varibales are located in memory.
Funny enoght the static varible information is available in your output file /DWARF sections/
If you use the TI tools "ofd6x.exe "" you can generate XML file with all your STATIC data.and coressponding memory adresses.
Even more one of my colegues wrote small Python/QT GUI program that makes browsing of all your data Static and non static
Up until now I havent seen an situation when I cannot. Watch at Static
I can imagine that in small software projects the compiler optimize the code and static data in not visible anymore.
Greetings,
Mirtcho Maglijanov
Alternatively, there is a syntax you can use in the CCS expression view to display static variables. See CCS6.1 cannot display global static variables in debug modesir zhang58 said:Could you please details me how to use ofd2000.exe to show the static variables/functions memory address?