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.

Can't delete pre-defined symbol? CCSv5.1.0.07001

Guru 15580 points

I had defined a pre-defined symbol called 'DEBUG" in the compiler properties window. However, after deleting it I still get the effects of having it defined (ie printf statements to the console). Is this a bug in CCSv5.1?

Thx,

MikeH

 

  • Mike,

    I haven't been able to duplicate this behavior with either 5.1M7 or M8 so far. When you remove the pre-defined symbol from the compiler options, do you see the code that is based on that symbol definition get grayed out? For eg, in the code below, when DEBUG is not defined in the compiler options, the code within #ifdef and #endif is grayed out, if it is defined, it is not grayed. Do you see this update properly?

    If I am missing something or misunderstanding the issue, could you please provide more details? Also a simple test case to reproduce the issue would be very helpful.

  • Aarti,

    The file in question is a linked file. It may related to the other bug I found that Ki-Soo is chasing (http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/134993.aspx). Here is a screenshot of the #ifdef DEBUG section. Note is it *not* greyed out.

    And below is a screenshot of the properties window showing that DEBU is *not* predefined.

    Thx,

    MikeH

     

  • Hi Mike,

    I can't seem to reproduce this with linked files either. Are you sure that DEBUG is not defined anywhere else in any of the source files?

    One way to double-check to be sure that DEBUG is not defined is to generate the list of defined symbols using the -ppm compiler option. To enable this in CCS, go to Properties->Compiler->Parser Preprocessing Options, change the Mode from "automatic" to "manual", and add a file name to the -ppm option. This will generate a file with the pre-defined and user-defined macros, and should help confirm that DEBUG is not defined anywhere.

    It looks like we may need your project to see if we can reproduce the issue. Are you able to send us something?

  • Aarti,

    AartiG said:
    One way to double-check to be sure that DEBUG is not defined is to generate the list of defined symbols using the -ppm compiler option. To enable this in CCS, go to Properties->Compiler->Parser Preprocessing Options, change the Mode from "automatic" to "manual", and add a file name to the -ppm option. This will generate a file with the pre-defined and user-defined macros, and should help confirm that DEBUG is not defined anywhere.

    This -ppm file did not turn up any instances of "DEBUG".

    Can't really send the project at this point. Will let you know if I figure something out.

    Thanks for helping.

    Mike

     

  • I found it. I was actually including a library built with the DEBUG symbol defined. During my debug session, CCS opened the source file from the linked library. Since DEBUG was defined during the build of the library, the #ifdef DEBUG was valid for the source file.

    Confusing....:)

    Thanks again.

    MikeH

     

  • Thanks for the update Mike. Glad it turned out to not be a bug.