Tool/software: TI C/C++ Compiler
Hello,
I have an initialized static const global variable which is NOT used anywhere in the code but i would like to keep (dont want it to be optimized out but linker/compiler).
I have added the used attribute and the retain pragma but it still does not work. i also tried adding --retain in the linker command file (to see if there is a problem with the pragma) but it did not help either.
I am using TDA2xx , the M4 core , compiler version: Ti.16.9.2.LTS
[update]: the --keep_unneeded_statics compiler option seem to help but the problem is that this option is a global one and not for a specific variable and i want only a specific variable to be kept
Can you please help - why does this work?
Thanks
Guy