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/TMS320F280049C: TMS320F28004x

Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

I am migrating some code from a CPU application to use the CLA.  All of the code compiles and runs in the CPU.  When I try to compile and build the application with some of the code moved to CLA, I get the following error.  I have modeled the code after the C2000Ware example (device_support/f28004x/cla/cla_ex1_background_task).

"C:\ti\c2000\C2000Ware_2_00_00_02\device_support\f28004x\common\include\f28004x_cla_typedefs.h", line 84: fatal error #35: #error directive:

f28004x_Cla_Typedefs.h must be included before f28004x_Device.h or any other header file that redefines data types using the guard macros F28_DATA_TYPES or DSP28_DATA_TYPES

This error message is in the header file "f28004x_cla_typedefs.h".  I read that the compiler turns on the define "__TMS320X28XX_CLA__" when compiling a *.cla file.

I'm missing something about developing code for the CLA.  

Please advise.

Steve Haddad

Ametek Aerospace

  • FWIW, here is a link to the updated multi-day workshop for F28004x. It has a chapter on CLA and a lab that sets up usage.

  • Steve,

    First a note that we are moving away from these definitions in favor of using standard C99 datatypes which are defined in a header file provided with the compiler.

    #include <stdint.h>

    If your project needs these old definitions then you can include them but if you can move to C99 it may be a cleaner, more standard solution.

    On to the error message...

    Steve Haddad said:
    This error message is in the header file "f28004x_cla_typedefs.h".  I read that the compiler turns on the define "__TMS320X28XX_CLA__" when compiling a *.cla file.

    That is correct, but the error is coming from a check against the C28x data types which  may be defined in another .header file.

    #if (!defined(F28_DATA_TYPES) && !defined(DSP28_DATA_TYPES))

    Steve Haddad said:
    f28004x_Cla_Typedefs.h must be included before f28004x_Device.h or any other header file that redefines data types using the guard macros F28_DATA_TYPES or DSP28_DATA_TYPES

    Search the project for files that have F28_DATA_TYPES or DSP28_DATA_TYPES.  These should be included only after the cla typedef file so to get rid of the error the order of includes will need to be swapped around somewhere in your project.  

    Hope this helps.  Please let me know if you are able to resolve your issue by clicking the "verified answer" button.  If you need more information regarding this issue, reject the answer and post a follow-up.

    Regards

    Lori

  • Hi Lori,

    #include <stdint.h> is already included in my *.cla file but I'm still getting the same error.

    Steve Haddad

  • Steve Haddad said:
    #include <stdint.h> is already included in my *.cla file but I'm still getting the same error.

    Steve,

    If you are going to use only the C99 data types found in stdint  (they look like int16_t, int32_t, etc..) then you won't need the old datatypes.h file and it can be removed.  

    If you are going to use the old TI data types, or both the stdint types and TI types, then you will need to resolve the order of inclusion issue as described in my previous post.

    Regards

    Lori

  • Steve,

    I'm glad you were able to resolve the issue.  Thank you for the feedback.  I wanted to check if there was anything in TI supplied collateral that needs to be corrected?  

    Thank you and happy coding

    Lori