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.

CCS: TI 16.9.0 Compiler Global variable Initialization Issue

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Tool/software: Code Composer Studio

Hi all,

Presently I downloaded the new compiler version TI 16.9.0 LTS for my OMAPL138 project build.

I had felt an issue with global variable initialization. To be specific,

  • My global variable initialized to a defined value are not properly assigned to any variables. But, all variables are assigned with some junk values. Below is my initialization sequence in top of my C file and it also declared as extern for global visibility in a include file.

//Global Variable Defines
int32 gint32_PostReportEMIFFPGA = 0, gint32_PostReportDB = 0;
uint32 guint32_POSTReportStartCount = 0;
VIData VIData_Healthdata;
int poolCounter = 0;

  • This issue is clearly seen only on TI 16.9.0 LTS, which i was initially tested with. To sort out the problem i went back to TI v5.2.8 and it works as expected with initialization. I tried with --zero_init=off and --zero_init=on linker commands for both compilers. But TI 16.9.0 LTS is in same state as i mentioned above.

Is there anything to be specifically changed for new compiler version in the above case ?

Hope someone can help.

Regards,

  • OMAP-L138 has TMS320C674x and ARM926EJ-S. Compiler version 16.x.y does not exist for C6x, so you must be compiling for ARM. The behavior between TI ARM compilers version 5.2.8 and 16.9.0.LTS should be the same.. both default to EABI, and EABI should handle all of those initializations correctly. Do you use the boot routine (_c_int00) that comes with the RTS library, or do you use a custom boot routine?

    How do you know the variables have junk values? Are you looking at them before main is reached? Are you looking at them with the CCS watch window? Are you printing out the values with printf or something like that?

    Please do not use the --zero_init option. Please see processors.wiki.ti.com/.../Uninitialized_Static_Objects_Not_Set_to_Zero_in_COFF