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/TMS320F28388D: How to fix the TI_zero_init not found linker error

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

I am trying to build a 28388 application without use of any TI libraries or external linkages/references (there's a story on this below). I have all c, h, and asm files located in a single directory, and I have copied over the current cmd-files files and asm files from the CCS1010 and C2000Ware directories. There are no libraries in this directory, nor is there anything in the project linker file search path. Everything compiles without error, but the linker reports a single error, and undefined symbol __TI_zero_init. 

This TI_zero_init is not called or referenced by any of my source. It is almost as if the compiler/linker is requiring the presence of this symbol. Is there a way to disable this check?

Note I can not use any of your 28388 sample code in the current C2000Ware directories, so that is not an option. We have many motor-controller products based on various C2000 platforms, but all of our existing code is based on your previous register-structure-based header files (the F2837xD*.h like files). Your new register-offset based example code (with the HWREGH(BASE + OFFSET) syntax) is SO different that we do not consider it a viable approach to merge across our working 28377 code. Also the excessive single-line function calls per register configuration almost demand a level of optimization, which is a poor approach. We have had very good results with your prior code bases, and your new approach makes us abandon all of your new code. 

  • Jim,

    for the note - the old style header files (i.e. bit-field structures) you are used to, for C28x, can be found in the following directory for the C28x side of the F28388 device.  

    • C:\ti\c2000\C2000Ware<version>\device_support\f2838x\headers\include

    We don't have these for the ARM, however, and opted to reuse what other teams were doing for ARM (driverlib).

    Driverlib and the old style bit-field structs can both be included in one project, giving the best of both worlds should you choose. 

    This application note speaks a bit about both approaches, advantages, disadvantages and performance.  https://www.ti.com/lit/spraa85

    For your first question, I will ask one of the compiler team members to comment.  I've not seen this before.  

    Regards

    Lori

  • Lori,

    Thank you very much; that was very helpful.

    Jim

  • jimj2713 said:
    This TI_zero_init is not called or referenced by any of my source. It is almost as if the compiler/linker is requiring the presence of this symbol. Is there a way to disable this check?

    You must use the compiler option --abi=eabi to build for the newer EABI, instead of the older COFF ABI.  Is that the case?

    Please search the C28x assembly tools manual for the sub-chapter titled Zero Initialization.  If you build with --zero_init=off, then the zero initialization routine from the RTS library does not get called.  However, that means you are responsible for insuring the uninitialized global variables are cleared to 0.

    Thanks and regards,

    -George