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.

TMS320F2806: #16000: object files have incompatible formats

Part Number: TMS320F2806
Other Parts Discussed in Thread: C2000WARE

Hi,

My project is running on ccs 10.3.1,

Suddenly I am getting this error,

fatal error #16000: object files have incompatible formats
   ("C:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.4.LTS/lib/rts2800_fpu32
   .lib<boot28.asm.obj>" = TI-COFF, "./DEMO.obj" = ELF)

I got 2 information while I searched it online 

1. project>properties>General>in Project tab in project tab and tool chain selecting eabi (ELF) as output format

2. Delete all .obj file from Debug folder and build the project again.

Now looking at the error console, rts2800_fpu32.lib is in TI-COFF mode but project.obj file is in ELF mode.

Let me know how to solve it.

  • I think you mentioned 28069_RAM_lnk.cmd before? Is that the linker command file you're using to allocate space for .text, .stack, .bss, etc...? That's the one I've referring to.

    Ok Sir,

    I have chosen 28069_RAM_lnk.cmd in Properties> General  > Linker command file,

    Take a look errors now

    error #10008-D: cannot find file "rts2800_fpu32_eabi.lib"
    "../28069_RAM_lnk.cmd", line 121: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".text" size 0x378bpage 0.  Available memory ranges:
       RAML0_L3     size: 0x2000       unused: 0x2000       max hole: 0x2000    
    error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "Cla1Prog" size 0x28eepage 0.  Available memory ranges:
       BEGIN        size: 0x2          unused: 0x2          max hole: 0x2       
       RAMM0        size: 0x3b0        unused: 0x3b0        max hole: 0x3b0     
       RAML0_L3     size: 0x2000       unused: 0x2000       max hole: 0x2000    
       FPUTABLES    size: 0x6a0        unused: 0x6a0        max hole: 0x6a0     
       IQTABLES     size: 0xb50        unused: 0xb50        max hole: 0xb50     
       IQTABLES2    size: 0x8c         unused: 0x8c         max hole: 0x8c      
       IQTABLES3    size: 0xaa         unused: 0xaa         max hole: 0xaa      
       BOOTROM      size: 0xc10        unused: 0xc10        max hole: 0xc10     
       RESET        size: 0x2          unused: 0x2          max hole: 0x2       
     
     undefined          first referenced
      symbol                in file     
     ---------          ----------------
     Cla1funcsLoadSize  ./CLA.obj       
     Cla1funcsLoadStart ./CLA.obj       
     Cla1funcsRunStart  ./CLA.obj       
     
    error #10234-D: unresolved symbols remain
    fatal error #6001: cannot open file "{DSPF28069}.map" --stack_size=0x800 --warn_sections -iC:/F2806x_common/lib -iC:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.5.LTS/lib -iC:/ti/ccs1031/ccs/tools/compiler/ti-cgt-c2000_20.2.5.LTS/include --reread_libs --diag_wrap=off --display_error_number --xml_link_info=DSPF28069_linkInfo.xml --rom_model -o {DSP28069}.out"":  No such file or directory
     

  • Those errors should be pretty easily resolvable by editing your cmd file. Please refer to this document that I shared before on how to fix the "program will not fit into available memory" error. See the FAQ toward the bottom about "How can I make more memory available for .text?" If you aren't able to find enough room in RAM, you may want to switch to a Flash version of the cmd file.

    Also note that in CCS there is a Memory Allocation view that you can open to get a visual of where you have memory available to place code.

    To fix the CLA errors, reference one of the cmd files from the C2000Ware CLA examples to see how to add those sections. For example, see device_support\f2806x\common\cmd\28069_RAM_CLA_C_lnk.cmd

    Whitney

  • Dear Sir,

    I am busy with PCB designing, I will come back once I get free.

  • Thanks for the update. That's no problem--I won't close the thread.

    Whitney

  • See the FAQ toward the bottom about "How can I make more memory available for .text?"

    Dear Sir,

    At my 28069_RAM_lnk.cmd, I have changed the memory range as below 

      RAML0_L3    : origin = 0x008000, length = 0x378B

    This time 1 error removed.

    Not sure what else for the rest of the errors,

    I looked up 28069_RAM_CLA_C_lnk.cmd file, since the errors says,

    error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section "Cla1Prog" size 0x28eepage 0.  Available memory ranges:
       BEGIN        size: 0x2          unused: 0x2          max hole: 0x2       
       RAMM0        size: 0x3b0        unused: 0x3b0        max hole: 0x3b0     
       RAML0_L3     size: 0x378b       unused: 0x0          max hole: 0x0       
       FPUTABLES    size: 0x6a0        unused: 0x6a0        max hole: 0x6a0     
       IQTABLES     size: 0xb50        unused: 0xb50        max hole: 0xb50     
       IQTABLES2    size: 0x8c         unused: 0x8c         max hole: 0x8c      
       IQTABLES3    size: 0xaa         unused: 0xaa         max hole: 0xaa      
       BOOTROM      size: 0xc10        unused: 0xc10        max hole: 0xc10     
       RESET        size: 0x2          unused: 0x2          max hole: 0x2   
       
        undefined          first referenced
      symbol                in file     
     ---------          ----------------
     Cla1funcsLoadSize  ./CLA.obj       
     Cla1funcsLoadStart ./CLA.obj       
     Cla1funcsRunStart  ./CLA.obj       
     

    Where to change the memory range?

    "Cla1Prog" size 0x28eepage 0 

    this means here,

    RAML0_L2         : origin = 0x008000, length = 0x001000 ??

  • I think you're going to need to switch to a Flash based linker command file. Cla1Prog needs to be placed in the LS RAM but it doesn't look like there's going to be enough room in RAML0_L3 for both Cla1Prog and .text, correct? You should probably put .text in Flash.

    Whitney

  • I think you're going to need to switch to a Flash based linker command file. Cla1Prog needs to be placed in the LS RAM but it doesn't look like there's going to be enough room in RAML0_L3 for both Cla1Prog and .text, correct? You should probably put .text in Flash.

    Dear Sir,

    Really I don't have experience about changing Flash or RAM memory. Kindly describe more which file I should look up and modify. Kindly explain why there is no enough  room in RAML0_L3. Which flash need to be consider?

  • It looks like your error messages said that .text size is 0x378b and Cla1Prog size is 0x28ee. Even combining L0, L1, L2, and L3 that's still only 0x2000.

    If you take a look at a flash based cmd file like \device_support\f2806x\common\cmd\F28069.cmd, you'll see .text can fit in a single flash sector (they're usually size 0x4000).

    I'm a little concerned about Cla1Prog. Is there extra code being included? Or is it really 0x28ee words of code that you're using? On F28069 program RAM for the CLA is restricted to RAML3 so the code size is limited to 0x1000.

    Whitney

  • It looks like your error messages said that .text size is 0x378b and Cla1Prog size is 0x28ee. Even combining L0, L1, L2, and L3 that's still only 0x2000.

    If you take a look at a flash based cmd file like \device_support\f2806x\common\cmd\F28069.cmd, you'll see .text can fit in a single flash sector (they're usually size 0x4000).

    I'm a little concerned about Cla1Prog. Is there extra code being included? Or is it really 0x28ee words of code that you're using? On F28069 program RAM for the CLA is restricted to RAML3 so the code size is limited to 0x1000.

    Dear Sir,

    I think there might be a problem concerning my customised project file setting.

    We are trying to solve this problem more than 2 months, we solved many but still errors are changing path.

    Last week I had a chat with previous engineer who was in charge. He just import whole project from network file and build it, no error as come!

  • Interesting that it works with no issues for your colleague. Maybe see if you can get a copy of his build console output and compare it to yours to see if there are any concerning differences between relative paths and build options?

    Whitney