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/TMS320C5534: Pragma for forcing optimisation in debug mode ?

Part Number: TMS320C5534

Tool/software: TI C/C++ Compiler

Hello,

I am looking for a #pargma which would allow me, while in Debug mode (using CCS7) to compile some functions in

"optimised" mode.

I tried #pragma FUNCTION_OPTIONS with -O3 --opt_for_speed=5 ... but this is surprisingly un-effective.

Is there some points i am missing ?

Motivation is to be able to optimise some critical parts of code, to solve rel-time issues, while still be able to

debug the less critical ones.

regards,

Jacques

  • Hello!

    I guess what you're doing is just right. I've read somewhere, that optimisation in presence of debug might not be same good as without. Perhaps that's what you are observing. As matter of experiment I could suggest to move speed critical code to separate file and try to apply optimization without debug to that file.

  • To others reading this thread ... The information in this post is very specific to the C5500 compiler.  For all other TI compilers, it works as described in the article Debug versus Optimization Tradeoff

    There is no pragma which affects Debug mode.  Your best method is to put the functions you need to debug in a separate file, and build only that file with debug enabled.  See this article to learn how to use File Specific build options in CCS.

    Thanks and regards,

    -George

  • When using #pragma FUNCTION_OPTIONS, you must turn on the optimizer on the command line, at least level zero (--opt_level=0). Otherwise the pragma is ignored.
  • Thanks,
    I put the r/t critical files in optimi mode / no-debug ... now my Debug config is running correctly :)