Part Number: TMS320F28386S
Greetings,
For debugging purposes, is there a way to have the linker output information of my choosing such as #define values?
Thank you,
Ed
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.
Part Number: TMS320F28386S
Greetings,
For debugging purposes, is there a way to have the linker output information of my choosing such as #define values?
Thank you,
Ed
Ed,
Request you to elaborate more on your query. Do you need linke to output all the #define values?
Best Regards
Siddharth
Hi Siddharth,
In our cmd files, we have #define values which are conditionally created. I would like to be able to have the linker output the values. Is there a way to do that? In general, is there a way to have the linker print information to the console?
Thank you,
Ed
Ed,
I am not sure if this is supported. Will forward your query to the CCS team to comment.
Best Regards
Siddharth
In our cmd files, we have #define values which are conditionally created. I would like to be able to have the linker output the values.
Please consider using the #warn directive in a manner similar to ...
#ifdef SYMBOL #warn SYMBOL is defined #else #warn SYMBOL is not defined #endif
Thanks and regards,
-George
Hi George,
I tried that, and it outputs the text which follows "#warn", similarly to an echo in a batch file. Is there a way to output the value of SYMBOL?
Thank you,
Ed
Is there a way to output the value of SYMBOL?
Unfortunately, there is no feature designed for that exact purpose.
As a workaround, here is suggestion that might be useful.
Assign the preprocessor name SYMBOL to an ordinary symbol in the build. For example ...
#define SYMBOL 0xabcd symbol_never_used = SYMBOL;
Once the program is built, you can see the value of symbol_never_used in the map file ...
$ findstr symbol_never_used file.map abs 0000abcd symbol_never_used abs 0000abcd symbol_never_used
Or, by inspecting the symbols in the executable file ...
$ nm2000 stub.out | findstr symbol_never_used 0000abcd A symbol_never_used
Thanks and regards,
-George
That works really well George. I haven’t seen that syntax before, so I think it’s going to open a door to some new knowledge. Is there anything which describes it and/or a normal use case for it?
Thank you,
Ed
To learn more about creating symbols in the linker command file, please search the C28x assembly tools manual for the sub-chapter titled Assigning Symbols at Link Time.
Thanks and regards,
-George