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.
Context:
Within my project, I want to implement unit tests which run on my TMS320C6678. To do so, I have implemented a simple unit test framework that comes along as a library. My implemented testing procedure uses my framework, CMake's test driver program "ctest" and dss (Debug Server Scripting) to run multiple unit tests in a row. At the end of each unit test, a static variable "error" defined in my testing framework (Note: That my static variable exists in another translation unit) is read via the GEL-expression "ds.expression.evaluate("'sym::utest.oe66::utest.c'::error"). This static variable reflects whether a unit test has passed or failed.
Problem:
My framework does work as long as my variable "error" is defined in the same translation unit as my "main" function. However, I want my static variable to be defined in an external library. In this context, I am not able to read the static variable "error" as it does exist in another translation unit. Regarding namespaces within the GEL documentation (7.9.1.21. GEL Namespace — Code Composer Studio 12.2.0 Documentation) I assume that I am not specifying the correct symbol file.
Question:
Do I have to use the object file ("utest.oe66") as symbol file, as this file contains symbol information?
Do I have to use an absolute path to my library archive, which amongst other contains the object file of interest?
Niklas Winter,
As you already pointed, the following are the cases, which can be tried out by you...
'sym::a.out'::v | look for a variable v defined in a symbol file matching name a.out |
'sym::a.out::a.c'::v | look for a file static variable v defined in source file a.c from a symbol file matching name a.out |
'sym::arch/a.out::arch/a.c'::v | look for a file static variable v defined in source file arch/a.c from a symbol file matching name arch/a.out |
Do I have to use the object file ("utest.oe66") as symbol file, as this file contains symbol information?
Yes, give it a try in place of ".out"
Do I have to use an absolute path to my library archive, which amongst other contains the object file of interest?
As far as I know, you are the first one trying these things.... No previous references of this sort, using gel file namespaces...
Regards
Shankari G
I have already solved the issue. Actually, it was not related to the wrong namespace, but instead to an error in my cmake file. This mistake unfortunately led me to dismiss my in the first place correct symbol-namespace-combination and led me to try all ridiculous approaches. These ridiculous approaches were of course not the solutions and lead to even more ridiculous questions. I guess this is the reason, why nobody else posed any related questions (As these were simply questions to ridiculous solutions)
But for those who are interested:
The correct symbol-namespace-combination is "'utest.cpp'::error". According to the GEL documentation, you have to specify the correct namespace (file which defines the variable of interest).