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.

Debug vs. Release



Hello Everyone,

I have a basic question about CCS.

If I want to separate debug & release code using "#ifdef _DEBUG_", I should put the symbol in Project properties -> C/C++ Build -> Tool Settings -> Predefined Symbols, right?

(When I create a new project, I don't see any difference between the default Debug & Release profiles.)

 

Thanks a lot,

Binh

  • Hello

    Binh Thai said:
    If I want to separate debug & release code using "#ifdef _DEBUG_", I should put the symbol in Project properties -> C/C++ Build -> Tool Settings -> Predefined Symbols, right?

    Yes

    Binh Thai said:
    (When I create a new project, I don't see any difference between the default Debug & Release profiles.)

    The Release configuration usually enables optimization (--opt_level / -O)

    Thanks,

    ki

  • Hello Ki-Soo Lee,

    In the otg_detect sample project for the DK-LM3S9B96 board, in the otg_detect.c file, I see 3 lines:

     

     

     

     

     

     

     

     

    #ifdef

     

     

    #include

     

     

    #endif

    "utils/uartstdio.h"
    DEBUG

    but I don't see the symbol DEBUG defined in the Predefined Symbols section. Where else may it be defined?

     

    Thanks

    Binh