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/TMS320F28335: CCS3.3 optimization level quesion

Part Number: TMS320F28335

Tool/software: Code Composer Studio

my customer use the CCS3.3 to develop their Tms320F28335 SW, they used the Opt level to optimize their code,but found a strange problem.

they use the Register o0 to optimize the code, when they dowmload the .out  file to the dsp, they found that the code running abnormal.

while they use the o1,o2,o3 to optimoze the code,the code running normal.

so my question is :

1: what is the function of the different optimize level? when we want do the code optimize, how we choose the level?

2: In my opinion, the high level optimize contains the low level optimize,so why is there such a problem.

  • Hello,

    Shuai Peng said:
    1: what is the function of the different optimize level?

    Please see section 3 of the 28x compiler user's guide. Page 56 has a good summary of what all the levels do.

    http://www.ti.com/lit/ug/spru514k/spru514k.pdf

    Shuai Peng said:
    when we want do the code optimize, how we choose the level?

    This is dependent on your goals at time. Do you want maximum debug visibility? Or do you want best performance possible? Or do you want best code size possible? Or do you want a some tradeoff?

    One of the biggest factors on why you would not want to turn on optimization to the max is if you are still in development of your code and want some debug visibility. There is a clear tradeoff in turning up optimization vs debug visibility:

    http://processors.wiki.ti.com/index.php/Debug_versus_Optimization_Tradeoff

    A common thing to do is start with no optimization and as you progress in development and the code is working as it should, to start turning on optimization to improve performance.

    Shuai Peng said:
    2: In my opinion, the high level optimize contains the low level optimize,so why is there such a problem.

    This is difficult to say without any insight into your application (what is "abnormal"?). It can vary depending on the environment


    Thanks

    ki