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/TMS320F28374S: Optimization Level create Control loop unstable issue

Part Number: TMS320F28374S
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: TI C/C++ Compiler

Hi Team,

  My customer reported an issue on control loop stability while using the different optimization level to build the same project on TMS320F28374SPTPT:

   While using the O2 optimization level, the control loop became unstable, but changed optimization level to O0,  the control loop became stable.

  Also customer used the CCS Version: 6.1.0.00104, and with other CCS version, the same things happened(the Compiler version is different but the similar issue existed).

 

 Could you kindly give comments on the CCS optimization level for this case, also the similar issues has reported in other CCS version?  Expect for your reply, thanks.

 

  • Benjamin,

    There's not much to go on.  The compiler optimizer should not change the functionality of the code, so I can only imagine it's related to timing or code placement in memory.  Is there any additional information you can provide?  A small test case would be ideal.

    BTW, I noticed in the attachment you sent separately the optimization level was not being changed.  You seemed to be changing the speed/size trade-off, but not the actual --opt_level setting, which looked like it was always off.  Can you confirm the optimizer level is actually being changed please?

    Regards,

    Richard

  • Hi Richard,
    What I can see from the .map file is that the prototype location are changed from different optimization level. and it's hard to send you a small test code as this issue hasn't reproduced in the controlsuite demo code.
    Reply your questions, It's clearly confirmed that this issue happened during O0 and O2.
    As customer's information confidential policy, it's hard to send the .map file in this thread, I can mail to you for further discussion.

    Best Regards
    Benjamin