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.

TMS320F28P650DH: How to use struct in asm file for CLA?

Part Number: TMS320F28P650DH

Hi Experts,

I have a issue similar to the related questions.

when I use try to use struct in the .asm file for CLA, the below error happens:

[E0300] The following symbols are undefined

image.png

 

The .asm file be like

 image.png

and the header be like:

image.png

The project is attachedtestCode.zip 

Could you please help looking into it?

  • Hello,

    I have brought this thread to the attention of the compiler experts for further analysis.

    Thanks

    ki

  • Please read this FAQ (not from TI) and get a clear understanding of the terms definition and declaration.

    These lines from CLAShared.h ...

    volatile struct MyStruct myStruct;
    volatile float test9;

    ... are definitions of the variables.  In a header file, this is very unusual.  If you include this file in more than one place, that defines those variables multiple times, and causes an error at link time.  To change them from definitions to declarations, add the keyword extern ...

    extern volatile struct MyStruct myStruct;
    extern volatile float test9;

    This change also fixes the problem with the assembly file referring to these types through .cdecls.

    Thanks and regards,

    -George