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.

Compiler/CCSTUDIO-SITARA: Heisenbug vanishes on changing TI compiler version - where to find compiler changelog?

Part Number: CCSTUDIO-SITARA

Tool/software: TI C/C++ Compiler

Hello there,

  I encountered a nasty bug that popped up with a quite harmless commit adding a log message in the initialization code of a project we're running on one of the DSP cores of a Sitara am5726. It shows up as a MMU exception at runtime in a module that has nothing to do with the altered initialization code, way later than the added log message call is executed.

It is not obvious how the bug and the commit are related but they are (reverting the commit 'fixes' the bug). The broken code seemed to work flawlessly till now and there is no obvious reason how the added log message could make the unrelated module fail in such a basic fashion as accessing memory it isn't supposed to.

We looked at things like heap/stack overflow to no avail. We tried to debug it with via JTAG BH560V2-USB but it silently dies or the bug doesn't even kick in anymore. 

Then we switched compiler optimization from O2 to O1 and the bug is gone.

Then we switched from compiler Version C6000 TI 8.1.6 to TI 8.2.2 and the bug is gone - even with O2.

I know this report is way to vague to blame the compiler but I'd like to have a look at the changelog from 8.1.6 to 8.2.2. It seems my IQ is too low to find it in the depths of Texas Wiki / Product pages. Can anyone give me a hint where I find the TI compiler changelogs?

Thanks in advance,

                 Tim

  • TI compilers, including those for C6000, may be downloaded from this page.  If you click the download link for 8.2.x, you will see another link titled C6000 CGT - Closed Defects.  See that page for information about all the bugs fixed in that 8.2.x version.

    Thanks and regards,

    -George

  • Thanks,

       I had to browse through several of these documents since I did a bigger update than one to the next minor version, but at least I was able to confirm that the provided info wouldn't help me to lay the finger on the source of our problem.

    I'm stuck. Do you have any suggestions how to approach such a bug?

    Thanks,

                  Tim

  • It is likely that the root cause of the problem is present all the time.  Differences in where things end up in memory cause the problem to be hidden, or show up.  I suggest you start a new thread in the Sitara device forum.  Ask them about debug techniques for your situation.  Hopefully, you can catch this thing close to where the problem gets started.

    I have one compiler related suggestion for you to consider.  Problems like this are sometimes caused by failure to use the volatile keyword on variables that need it.  

    Thanks and regards,

    -George