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.

TMDSCNCD28388D: Global Variables removed from code

Part Number: TMDSCNCD28388D

Using CCS11.0.0

I have some global variables that are used by external tools to control the software and they are being optimized out of the map file.  

I am using a simple OS that calls the tasks from a function pointer. Somehow the code thinks that the task with the call to a function that manipulates the variable is not called so optimizes out the variable name.  If however I add a call to a function that uses the variable it gets included in the map file.

 

My question is there a compiler/linker option to keep the global symbols? As of yet, I have been able to locate the option yet.

 

Here is the warning:

2838x_flash_lnk_c28x.cmd", line 168: warning #10068-D: no matching section

 Here is the section declaration

   IRAM :   {   *(.code_checkMemClassRam)   *(.IRAM_Var)   *(.IRAM_DATA)   *(.IRAM_measure_variables)   }> RAMGS1 ,  ALIGN(4)

I am using the same pragma's to declalre the sections in the code and only the code_checkMemClassRam is optimized out.