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.

CLA C compiler and compiler optimization

Hi everyone,

to me, a big advantage of coding a control law on a CLA in assembler is that the code stays the same. And doesn’t care about any compiler settings like optimizations etc. So the code stays the same.

The big advantage of C is the readability.
But if I write the CLA code in C, the code will be optimized depending on C2000 compiler optimization settings.

For my understanding the CLA compiler and the C28x compiler are different.
Is there a way set the CLA compiler optimization separately?
Or set the C28x compiler settings with no effect to the CLA C code?

Thank you

  • Hi,

    I think you can set optimization at a file level, i.e. right clicking on each file, hitting properties and then turning on the file-level optimization. Once you do this you will notice the file icon has changed to indicate specific settings for the file. 

    So what you could do is set global optimization level for the project and then a specific optimization level for just the .cla file.

    I am going to push this over to the compiler forum so that they can either confirm or correct my assertion.

  • For builds within Code Composer Studio, using file specific build options is the best way to solve this problem.  Further details regarding file specific options are available in this wiki article.

    Thanks and regards,

    -George