TMS320F28379D: How to have a shared pre-processor in CPU and CLA

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello , What is the correct way to have a common pre-processor variable compile for both the CPU and CLA.

I have a preprocessor

#define ADC_TYPE 0

It is used in both the main CPU and a CLA task to set some initial configuration , I define it in a header file and the CLA does not seem to be able to recognise it, when the source complies.

  • Hello,

    As long as you have included this header file inside of your CLA file, you should be able to reference any defines from the header file inside a CLA task. If you take a look at some of the examples in C2000ware they do something similar, for example in the cla_ex1_asin example ([C2000ware install]/driverlib/f2837xd/examples/cpu1/cla), TABLE_SIZE_M_1 is defined in cla_ex1_asin_shared.h and used in a CLA task in the asin.cla file.

    Best Regards,

    Delaney