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.

TMS320F280034: Use of an externally defined Struct within a CLA

Part Number: TMS320F280034

Tool/software:

Hello,

I have a CLA set up and I'd like to use a structure that I define in a different library within my program to do floating point math.

However, I don't know exactly how to declare the variables or get the headers/CLA to properly reference each other so they see the structure.

In the below picture, I have the #pragma DATA_SECTION() statement with a structure as defined below. I have a .h that has the typedef for this structure, and I have an extern statement that should bring in the structure here from the outside. The error that I get when I build is that the PID_struct, as shown in the bottom left, in the .h, is not defined. 

I must be missing something that allows me to use a structure defined in another .h file in the CLA.

Thanks,

Reid

  • Hi Reid,

    I will get back to you with a response to this question tomorrow. I apologize for the delay.

    Best Regards,

    Delaney

  • Hi Reid,

    In this case, you want to include pidcontrol.h inside lab_shared.h. Then, you can include lab_shared.h in both your main.c file and your controls.cla file. This way both the main.c file and the controls.cla file can access the struct definition. You can remove the include for pid_control.h in your controls.cla file.

    Best Regards,

    Delaney