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.

C2000WARE-MOTORCONTROL-SDK: Arrangement Rules for Data in the .cinit Section

Part Number: C2000WARE-MOTORCONTROL-SDK
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hello everyone,

I am studying the startup process of TMS320 series DSPs and have some questions about the arrangement rules of initialized data in the .cinit section.

  1. How exactly is the variable initialization data organized in the .cinit section under the COFF file format?

  2. I have observed some of the arrangement rules and created a simple summary. Is there any technical documentation that provides details on this subject?

Thanks for your help!

  • Hi Yang,

    Please take a look at the following and let me know if they answer your question:

    C2000 Migration from COFF to EABI

    SPRU513 User guide | TI.com

    Best Regards,

    Delaney

  • Thank you for your response. However, my search didn't yield any useful information. Could you please point me to where I can look up the flags corresponding to different data types? For instance, is 'FF FE' the identifier for a float type?

    Could you explain the mechanism by which the loader parses the .cinit section and carries out the encoded initializations during load time?

  • Hi Yang,

    Please check this document as well:

    Common Object File Format (COFF

    Apologies, I meant to link this in my other reply too. It includes more detailed descriptions of the COFF format. I will loop in the compiler expert as well to see if they can give a more detailed explanation.

    Best Regards,

    Delaney

  • How exactly is the variable initialization data organized in the .cinit section under the COFF file format?

    I understand what you mean by "COFF file format".  Nonetheless, that is incorrect use of the term.  A file format specifies the organization of the information in the object file.  How variables are initialized is a separate question specified by the application binary interface (ABI).  In this case, it is called the COFF ABI, because the object file format used is COFF.

    I am a little surprised you are asking anything about COFF ABI.  While it is still supported, no new projects use it.  C2000Ware (and similar packages) stopped supporting it a few years ago.  COFF ABI is being replaced by EABI.

    Is there any technical documentation that provides details on this subject?

    Please search the C28x compiler manual for the sub-chapter titled Automatic Initialization of Variables for COFF.

    Thanks and regards,

    -George