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/TMS320F28075: How to share data between CPU and CLA

Part Number: TMS320F28075

Tool/software: TI C/C++ Compiler

As we know the data type 'int' is different between CPU and CLA, this cause some problems in my program:

Like I defined a 'int' variable in a cla source file and declared it in the corresponding header file and expected it to be shared with CPU, while, the CPU will see this 'int' variable differently.

Also, If peripheral like epwm is going to be accessed in the cla program, usually the 'F2807x_device.h' should be included, but the variables in these header files are declared by the CPU types rather than CLA type, which may cause error as well, even whe i did this the compiler told me this:

Description Resource Path Location Type
#452 the type "long long" is nonstandard F2807x_device.h /GenericDrive_CLA/HAL/Driver/F2807x_headers/include line 132 C/C++ Problem
#452 the type "long long" is nonstandard F2807x_device.h /GenericDrive_CLA/HAL/Driver/F2807x_headers/include line 135 C/C++ Problem
#838 unrecognized cregister name 'IER' F2807x_device.h /GenericDrive_CLA/HAL/Driver/F2807x_headers/include line 32 C/C++ Problem
#838 unrecognized cregister name 'IFR' F2807x_device.h /GenericDrive_CLA/HAL/Driver/F2807x_headers/include line 31 C/C++ Problem

Any way to work this around? Any comments are appreciated!

  • Problem seems to be fixed by including 'F2807x_Cla_typedefs.h' before "F2807x_device.h" just like this:

    #include "F2807x_Cla_typedefs.h"
    #include "F2807x_device.h"

    but still confusing how the compiler identify the same variable or routine for both CPU program and CLA program as they are actually declared as different type.
  • Hi,

    the Cla_typedefs.h header file defines types diffently depending on whether the C28x or CLA compiler is compiling the current module. For each compiler there is a specific macro that comes into scope (c28x is __TMS320C28XX__ and CLA is __TMS320C28XX_CLA__; i might have got the syntax incorrect, you will see what im talking about in the header file).

    We use these macro to conditionally typedef different types for each core.
  • I think I've understood that, many thanks! :)