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/CC3220SF: Random value for global variables on enabling optimization

Part Number: CC3220SF

Tool/software: Code Composer Studio

Hi,

On enabling optimization level, receiving random values for global variables. But on setting optimization level as None, it is working properly.  I was using the software for the last one year with optimization level (-Og), but suddenly facing the issue. Let me know what the issue is.
For ref,
Development Environment : CCS V9.2.0, simplelink_cc32xx_sdk_3_40_00_05
Regards
Parthasarathi
  • Do you build with the TI ARM compiler, or an ARM GCC compiler.  If you use a GCC ARM compiler, then which one?

    While anything is possible, please consider the possibility that a problem has been present in your code for quite some time.  This problem is not exposed when building with no optimization.  Building with optimization causes the problem to be revealed.  One typical problem of this sort is failing to use the volatile keyword on a variable that is modified by an interrupt.  Another typical problem is failing to initialize a variable.

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your response.

    I'm using gcc arm v7.2.1 linaro. All the variables are intialized and there is no interrupts in my software. Let me know is it known issue in arm gcc.

    Regards,

    Parthasarathi