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.

F2837xD CLA Configuration and Header files

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

I am trying to get the CLA of my C2000 F28377D to work, but it does not work like it should.

Like in one of the example projects from the controlSuite, is generated this shared header file and declared there the F28x_Project.h as an include, but then the compiler runs into this:

#if defined(__TMS320C28XX_CLA__)
#error "Header file <assert.h> not supported by CLA compiler"
#endif
 
I want to use the Project include file, because I want to access ADC registers from the cla, but how should I set up my project for this?
 
I hope someone can help me.... BR, Michael
  • Hi Mike,

    Does the sample project work for you? If yes, then what modifications are you performing here?

    Regards,

    Gautam

  • Michael,

    assert.h is not supported on the CLA. What you can do is to put guard macros around it in device.h

    #if !defined(__TMS320C28XX_CLA__)

    #include <assert.h>

    #endif //__TMS320C28XX_CLA__

    We plan to put this in the next 2837x controlSUITE release.

     The other alternative is to not include F28x_Project.h but rather only the specific headers you need for that project 

    #include "F28X7x_Cla_defines.h"
    #include "F28X7X_Cla_typedefs.h" //Be sure to put this at the top though as it defines the data types for the CLA

                                                           // if you dont put this at the top it will mess up the offsets in all the peripheral structures that follow

    #include "F28X7x_EPwm.h"
    #include "F28X7x_ECap.h"
    #include "F28X7x_EQep.h"
    #include "F28X7x_ADC.h"
    #include "F28X7x_Cmpss.h"
    #include "F28X7x_DAC.h"
    #include "F28X7x_Spi.h"
    #include "F28X7x_SDFM.h"
    #include "F28X7x_Mcbsp.h"
    #include "F28X7x_Upp.h"
    #include "F28X7x_Gpio.h"
    #include "F28X7x_I2C.h"
    #include "F28X7x_Sci.h"

  • I think you need to put the guard macro around assert and stdarg.

  • Thank you, this did the trick. Of course I do not need everything, the typedefs and the peripheral specific header files are sufficient.