TMS320F28379D: C2000ware example compiling error

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,
I got following error when compiling C2000ware examples:

fatal error #16000: object files have incompatible formats ("C:/ti/ccs2100/ccs/tools/compiler/ti-cgt-c2000_25.11.1.LTS/lib/rts2800_fpu3 2.lib<boot28.asm.obj>" = TI-COFF, "./F2837xD_CodeStartBranch.obj" = ELF)

Regards, Holger

  • Hello,

    1. Which C2000Ware example? Can you share path? Also please share the C2000Ware version you're using?

    The reason you are getting this error is a COFF/EABI mismatch.

    There are two main ways to fix this depending on whether you intended to use the EABI format or the legacy COFF format.

    Option 1: If you want to use the EABI (ELF) format 

    If your project is set to generate ELF output (which is standard for newer C2000 projects), you must ensure all libraries are also in EABI format.
    1. Update Linker Settings:
      • Open your project in Code Composer Studio (CCS).
      • Right-click the project and select Properties.
      • Navigate to C2000 Linker -> File Search Path.
      • Look for rts2800_fpu32.lib in the "Include library file..." box.
      • Remove rts2800_fpu32.lib
      • Add libc.a instead. When you use libc.a, the linker will automatically select the correct EABI-compatible version (e.g., rts2800_fpu32_eabi.lib) for you.
    2. Verify C2000Ware:
      • Ensure you are using a modern version of C2000Ware (v3.00.00 or later), as older versions primarily provided COFF-formatted libraries.
    3. Clean and Rebuild:
      • Perform a Project ->Clean to remove any old .obj files before rebuilding.

    Option 2: If you want to use the Legacy COFF format

    If you specifically need to maintain the older COFF format for compatibility with other legacy code:
    1. Change Output Format:
      • In Project Properties, navigate to General.
      • Ensure the Output format is set to legacy COFF [ti_coff].
    2. Check Object Files:
      • If you recently switched from EABI to COFF, you might have leftover .obj files in your Debug/Release folders that were compiled as ELF. Delete the entire Debug or Release folder to ensure a fresh COFF build.

    Thanks,

    Ira

  • Hi Ira,
    if I do option 1 I get following error:

    warning #10440-D: creating output section ".init_array" without a SECTIONS
    specification. For additional information on this section, please see the
    'C2000 Migration from COFF to EABI' guide at
    software-dl.ti.com/.../C2000_c28x_migration_from_coff_
    to_eabi.html
    [9]warning #10247-D: creating output section ".data" without a SECTIONS
    specification

    undefined first referenced
    symbol in file
    --------- ----------------
    RamfuncsLoadSize ./F2837xD_SysCtrl.obj
    RamfuncsLoadStart ./F2837xD_SysCtrl.obj
    RamfuncsRunStart ./F2837xD_SysCtrl.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "blinky_dc_cpu01.out" not
    built

    gmake: Target 'all' not remade because of errors.

    **** Build finished ****

    Regards, Holger

  • Hi Holger,

    If you are migrating from COFF to EABI then you also need to make some changes in your linker command file.

    Fix the "creating output section without a SECTIONS specification"

    Go to you .cmd file and and add the following in your SECTIONS block.

    SECTIONS
    {
    /* ... existing sections like .text, .econj, etc ... */

    /* Add these to satisfy the EABI linker requirements */
    .init_array : > FLASH, PAGE = 0 /* Or wherever your code resides */
    .data : > RAMLS0, PAGE = 1 /* Adjust RAM block to your device */
    .bss : > RAMLS0, PAGE = 1 /* Adjust RAM block to your device */

    /* If you have initialized data, you might also need .dseg */
    .dseg : > RAMLS0, PAGE = 1
    }

    Note: Ensure the memory ranges (FLASH,RAMLS0, etc.) match the names defined in your MEMORY block at the top of the .cmd file.

     Fix the "unresolved symbols" (Ramfuncs)

    The symbols RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart are used by the C2000 startup code to copy functions from Flash to RAM at runtime. In EABI, the linker needs to be explicitly told to group these and provide the addresses.

    The most robust way for C2000 EABI is to use this specific syntax in your SECTIONS block:
    SECTIONS
    {
        /* ... */
        .TI.ramfunc : Load = FLASH, Run = RAMLS0, Load addresses into FLASH 
                      and runs from RAM.
        /* ... */
    }

    Check your F2837xD_SysCtrl.c or your startup file to see if it is looking for .TI.ramfunc or a custom .ramfuncs section. If the error persists, ensure the section name in your .cmd file matches the section name attribute in your C code (e.g.,
    #pragma CODE_SECTION(..., ".TI.ramfunc")

    ).

    I highly recommend going through C2000 Migration from COFF to EABI, specifically the section on Linker Command File Changes.

    You could also simply go ahead with option 2 if you want to stay COFF.

    Thanks,
    Ira