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.

TMS320F28374S: Does CCS10 version assign initial values ​​to structure variables?

Part Number: TMS320F28374S
Other Parts Discussed in Thread: C2000WARE

Hi Team,

There's an issue from the customer need your help:

I created a project on CCS and used it on the TMS320F28374s chip, but a structure variable in the project has not been assigned an initial value. Will this structure be assigned a value of 0 by default when the chip is powered on and running? ?

I am using CCS version 10.3.1.00003 

compiler version 21.6.

Thanks & Regards,

Ben

  • I presume the structure variable is defined at global scope.

    Will this structure be assigned a value of 0 by default

    If you build with the older COFF ABI, no.  If you build with the newer EABI, yes.  For details in the COFF case, please search the C28x compiler manual for the sub-chapter titled Automatic Initialization of Variables for COFF.  For details in the EABI case, please search that same manual for the sub-chapter titled Zero Initializing Variables.

    Before you consider a change from COFF to EABI, be sure all the components you use, such as C2000Ware, also support EABI.

    Thanks and regards,

    -George

  • Hi George,

    Does the ram_model mentioned in the compiler guide is the default setting here (above), and whether EABI only compiler version 21.6 meets the requirements.

    Can the pre-initialization effect be achieved in the end?

    Thanks & Regards,

    Ben

  • The --ramfunc option has nothing to do with how global variables are initialized.

    Please rebuild the entire project.  One way to do that is to right-click on the name of the project and select Rebuild Project.  Then save the contents of the Console (not Problems) view to a text file.  Use the icon named Copy Build Log.  When you name the log file, be sure to use the file extension .txt.  Please attach that text file to your next post.

    Thanks and regards,

    -George