2. Initial Development

This chapter outlines various factors to consider when starting development on C2000 MCUs.

2.1. Application Binary Interface (ABI)

Prior to release 18.12.0.LTS of TI’s C28x Compiler Tools, the one and only ABI for C28x was the original COFF-based ABI.

C2000Ware Release 2.0 and 18.12.0.LTS of the TI Compiler Tools introduced a new ABI called the C28x EABI. It is based on the ELF object file format. It is derived from industry standard models, including the IA-64 C++ ABI and the System V ABI for ELF and Dynamic Linking. The processor-specific aspects of the ABI, such as data layout and calling conventions, are largely unchanged from the COFF ABI, although there are some differences. The COFF ABI and the EABI are incompatible - all of the code linked into an application binary must follow the same ABI.

TI’s supports both the new EABI and the older COFF ABI on F2837x and F28004x. Migration to EABI for new software development on F2837x and F28004x is encouraged. Device support software and libraries available in C2000Ware for F2838x and F28002x are EABI only.

Key distinctions between EABI and COFFABI:

  • The double type is 64 bits. The size of double changes from 32 bits to 64 bits when you migrate from COFF ABI to EABI.

  • There is no leading underscore on symbols. COFF ABI adds a leading underscore to symbol names, but EABI does not. Assembly file references to symbols need special handling.

Additional Resources

2.2. Bitfield vs. driverlib

Bitfield and driverlib are two approaches to implementing a hardware abstraction layer for C2000 MCUs. Refer to the application report, Programming TMS320x28xx and TMS320x28xxx Peripherals in C/C++ for a comparison of the approaches.

Note

All of the code examples in this chapter were built with C28x compiler version 18.12.2 LTS using the EABI application binary interface.