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: Question for CCS optimization level and inline function

Tool/software: Code Composer Studio

Question 1:

For CCS of which the compiler version is TI v6.2.7, if I choose off or 2 Global Optimizations, refer to spru187u, they are the same, is it correct?

Question 2:

If inline functions are defined in header file of my project, how to select optimization level and anything should be noted?

  • Ronnie said:
    For CCS of which the compiler version is TI v6.2.7

    C2000 compiler version 6.2.7 is about 4.5 years old.  Please upgrade as soon as it is practical.

    Ronnie said:
    if I choose off or 2 Global Optimizations, refer to spru187u, they are the same, is it correct?

    The compiler manual makes no presumption about how you invoke the compiler.  The two main methods are by building in CCS, and building from the command line using some variant of make.  When you build with CCS, it writes the option string for you.  The drop down box for Optimization level, in effect, forces you to explicitly choose the optimization level.  It is not possible to specify the option --opt_level without either off or a number.  When you build from command line, it is possible to write --opt_level (or -O) and nothing more.  When that occurs, the optimization level used is 2.

    Ronnie said:
    If inline functions are defined in header file of my project, how to select optimization level and anything should be noted?

    For any function inlining to occur, you must build with at least --opt_level=0.

    Thanks and regards,

    -George