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.

TMS320F280039C: Clarify on Predefined __TMS320C28XX_CLA__

Part Number: TMS320F280039C


Hi Champ,

I am asking a related question with below post, 

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1055510/tms320f280049c-question-about-__tms320c28xx_cla__

1. From the original source code, was the C28x Macro Names for __TMS320C28XX_CLA__ already predefined in the original source code ? 

Since the part for #include <CLAmath.h> is grey out, it should execute #include <math.h> for C28x, correct ? Besides, there is no such define symbol in the predefined symbols in the project properties. 

  (ttplpfc.h)

2. It is showing errors from adding a line for predefined Macro Names __TMS320C28XX_CLA__ before line 31 after rebuilding the project.

How could I correctly predefine the __TMS320C28XX_CLA__ symbol ? 

  • Hi Johnny,

    The following are the answers to your questions:

    1. The macro name __TMS320C28XX_CLA__ is not predefined in the original source code. Setting --cla_support in Properties>> Build >> C2000 Compiler >> Processor Options is what defines this macro when compiling any .cla files. In the screenshot you show yes, the #include <math.h> line would be executed if the file including it is a C file. If the file including it is a .cla file and --cla_support is enabled, #include <CLAmath.h> would be executed. 

     

    2. You can define this symbol by selecting one of the CLA options under cla_support. This will automatically predefine the __TMS320C28XX_CLA__ symbol for all .cla files. There should be no need to include it in "Predefined Symbols" manually.

    Note: for the F28003x, you should select cla2 since the CLA IP on F28003x is Type 2.

    Let me know if this fixes the errors.

    Best Regards,

    Delaney