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.

Getting linker error with CCS v6.1.3 and CC2564 Audio SNK source

Other Parts Discussed in Thread: CC2564, MSP430F5438A, CCSTUDIO

Hi,

I am trying to compile CC2564 Audio_SNK source code using CCS 6.1.3, get  the below error

"../lnk_msp430f5438a.cmd", line 127: warning #10424-D: Linker command file has
no sections of type=VECT_INIT, but does contain .intXX sections. This file
may be out of date. Generating interrupt pointers for all .intXX sections.
The default handler provided in the RTS will be used if no other handler is
found. It is recommend that you update your linker command file to the
latest version.
fatal error #16000: object files have incompatible formats
("C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.5
R2/MSP430_Experimentor/Bluetopia/lib/CCS/LargeMTU/coffabi/libBluetopia.a<BSC
.obj>" = TI-COFF, "./A3DPDemo_SNK.obj" = ELF)

>> Compilation failure
makefile:146: recipe for target 'A3DPDemo_SNK.out' failed
gmake: *** [A3DPDemo_SNK.out] Error 1
gmake: Target 'all' not remade because of errors.

Below are tweaks i tried by reading various forums


1. Tried the below soltuions from TI forum
*Dest++ = _data20_read_char((*Source)++);
to
*Dest++ = __data20_read_char((*Source)++); and try

2. Copied old linker file from below link
e2e.ti.com/.../475582

3. Upgraded to 90-day evlation license

Nothing seems to solve the issue. Please help me to proceed further

-Prashanth

  • Prashanth Kumar N said:
    fatal error #16000: object files have incompatible formats
    ("C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.5
    R2/MSP430_Experimentor/Bluetopia/lib/CCS/LargeMTU/coffabi/libBluetopia.a<BSC
    .obj>" = TI-COFF, "./A3DPDemo_SNK.obj" = ELF)

    The problem is that the libBluetopia.a pre-compiled library file is using the COFF ABI, but the A3DPDemo_SNK.obj file is using the ELF ABI.

    Under the CCS project properties -> CCS General -> Advanced Settings change the Output from from "legacy COFF" to "eabi (ELF)" and then re-build the project.

  • Hi,
    Thanks for the reply. When i try changing the file format, i get following error in project.log file. Before this a pop up error message "Problems encountered while initializing

    !ERROR: The MSP430v4.0.0 compiler, or any version compatible with it, is not currently installed! Please migrate the project to one of the supported compilers first.

    !ERROR: The MSP430v4.0.0 compiler, or any version compatible with it, is not currently installed! Please migrate the project to one of the supported compilers first.

    !ERROR: The MSP430v4.0.0 compiler, or any version compatible with it, is not currently installed! Please migrate the project to one of the supported compilers first.


    After the error message when i go back and check the CSS setting, it still says COFF format. It has failed to accept the changes.
    -Prashanth
  • Prashanth Kumar N said:
    !ERROR: The MSP430v4.0.0 compiler, or any version compatible with it, is not currently installed! Please migrate the project to one of the supported compilers first.


    After the error message when i go back and check the CSS setting, it still says COFF format. It has failed to accept the changes.

    I suspect you have a MSP430 compiler v15.x or later installed, which no longer supports the COFF format and that the project was created for a v4.x MSP430 compiler.

    Try using the CCS Help -> Install new Software to install a MSP430 v4.x compiler:

    If you look in the CCS project properties under CCS General -> Advanced Settings -> Compiler Version CCS should display the exact compiler version which was used to create the project.

  • Thanks a lot Chester, it worked !!!.

    To understand a bit more, would there be any impact on code if it's COFF or ELF (i assume nothing). Any size impact?

    -Prashanth
  • Prashanth Kumar N said:

    To understand a bit more, would there be any impact on code if it's COFF or ELF (i assume nothing)

    One difference is that in COFF doesn't zero-initialize uninitialized static storage class variables, whereas with ELF the uninitialized variables are zero initialized automatically. See the Initializing Static and Global Variables in COFF ABI Mode section of the MSP430 Optimizing C/C++ Compiler User's Guide.

    Prashanth Kumar N said:
    Any size impact?

    In COFF double variables are 32-bits, whereas in ELF double variables are 64-bits. This can cause a size increase when changing from COFF to ELF - see Differences between legacy coff and EABI ELF regarding code size

    Having installed CC256x MSP430 Bluetopia SDK/v1.5 R2 I see that there are COFF and ELF versions of the libBluetopia library, but I have investigated any size differences between the COFF and ELF versions of the library.

  • Thanks for the links...
    Is there a place where i can download COFF version of libBluetopia?

    -Prashanth
  • Hi,
    I am seeing one more issue. This time i am copying the files to a different folder, made minor changes like print and compiled.
    Here even tough i have set to ELF, below message shows still COBF.

    Can you please help me on the below error?

    'Building target: A3DPDemo_SNK.out'
    'Invoking: MSP430 Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.7/bin/cl430" -vmspx --abi=eabi --code_model=large --data_model=small --opt_for_speed=0 --use_hw_mpy=F5 -g --define=__MSP430F5438A__ --define=__DISABLE_SMCLK__ --define=BTPS_MEMORY_BUFFER_SIZE=8000 --define=__SUPPORT_CC256XB_PATCH__ --display_error_number --diag_suppress=172 --diag_warning=225 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal -z -m"A3DPDemo_SNK.map" --stack_size=1200 --heap_size=0 --cinit_hold_wdt=on -i"C:/ti/ccsv6/ccs_base/msp430/include" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.7/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.7/include" -i"C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.4 R2/MSP430_Experimentor/Bluetopia/lib/CCS/LargeMTU/coffabi" -i"C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.4 R2/MSP430_Experimentor/Bluetopia/profiles/A3DP/lib/CCS/coffabi" -i"C:/ti/ccsv6/ccs_base/msp430/lib/5xx_6xx_FRxx" --reread_libs --warn_sections --xml_link_info="A3DPDemo_SNK_linkInfo.xml" --use_hw_mpy=F5 --rom_model -o "A3DPDemo_SNK.out" "./A3DPDemo_SNK.obj" "./BTPSKRNL.obj" "./BTPSVEND.obj" "./BTVS.obj" "./HCITRANS.obj" "./Main.obj" "./pre_init.obj" "./sprintf.obj" "./MSP430_EXP5438/HAL.obj" "../lnk_msp430f5438a.cmd" -llibBluetopia.a -llibSS1BTA3D_C.a -llibc.a -llibmath.a
    <Linking>
    error #10008-D: cannot find file "libBluetopia.a"
    error #10008-D: cannot find file "libSS1BTA3D_C.a"

    "../lnk_msp430f5438a.cmd", line 127: warning #10424-D: Linker command file has
    no sections of type=VECT_INIT, but does contain .intXX sections. This file
    may be out of date. Generating interrupt pointers for all .intXX sections.
    The default handler provided in the RTS will be used if no other handler is
    found. It is recommend that you update your linker command file to the
    latest version.
    warning #10247-D: creating output section ".data" without a SECTIONS
    specification

    -Prashanth
  • Prashanth Kumar N said:
    Is there a place where i can download COFF version of libBluetopia?

    The CC256x MSP430 Bluetopia SDK v1.5 R2 installation has ELF and COFF versions of the libraries in different directories, e.g.:

    C:\ti\Connectivity\CC256X BT\CC256x MSP430 Bluetopia SDK\v1.5 R2\MSP430_Experimentor\Bluetopia\lib\CCS\LargeMTU\coffabi\libBluetopia.a

    C:\ti\Connectivity\CC256X BT\CC256x MSP430 Bluetopia SDK\v1.5 R2\MSP430_Experimentor\Bluetopia\lib\CCS\LargeMTU\eabi\libBluetopia.a

    Prashanth Kumar N said:
    Here even tough i have set to ELF, below message shows still COBF.

    There are two places you have to change from COFF to ELF:

    1) In the CCS General -> Advanced Settings properties change the Output format from "legacy COFF" to "eabi (ELF)":

    The output format tells the compiler and linker to use EABI when build the program.

    2) In the CCS Build -> MSP430 Linker -> File Search Path -> library search path properties edit the two ${ProjDirPath} paths to use "eabi" rather than "coffabi":

    That makes the linker find the EABI versions of the pre-compiled Bluetopia libraries.

    However, when the above two changes were made to the A3DPDemo_SNK project then got different linker errors:

    'Invoking: MSP430 Linker'
    "C:/ti_ccs6_1_3/ccsv6/tools/compiler/msp430_4.0.1/bin/cl430" -vmspx --abi=eabi --code_model=large --data_model=small -g --define=__MSP430F5438A__ --define=__DISABLE_SMCLK__ --define=BTPS_MEMORY_BUFFER_SIZE=5000 --define=__SUPPORT_CC256XB_PATCH__ --define=__SUPPORT_MULTIROOM_PATCH__ --diag_warning=225 --display_error_number --diag_suppress=172 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal -z -m"A3DPDemo_SNK.map" --stack_size=1200 --heap_size=0 --use_hw_mpy=F5 -i"C:/ti_ccs6_1_3/ccsv6/ccs_base/msp430/include" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/msp430_4.0.1/lib" -i"C:/ti_ccs6_1_3/ccsv6/tools/compiler/msp430_4.0.1/include" -i"C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.5 R2/MSP430_Experimentor/Bluetopia/lib/CCS/LargeMTU/eabi" -i"C:/ti/Connectivity/CC256X BT/CC256x MSP430 Bluetopia SDK/v1.5 R2/MSP430_Experimentor/Bluetopia/profiles/A3DP/lib/CCS/eabi" -i"C:/ti_ccs6_1_3/ccsv6/ccs_base/msp430/lib/5xx_6xx_FRxx" --reread_libs --warn_sections --xml_link_info="A3DPDemo_SNK_linkInfo.xml" --rom_model -o "A3DPDemo_SNK.out" "./A3DPDemo_SNK.obj" "./BTPSKRNL.obj" "./BTPSVEND.obj" "./BTVS.obj" "./HCITRANS.obj" "./Main.obj" "./pre_init.obj" "./sprintf.obj" "./MSP430_EXP5438/HAL.obj" "../lnk_msp430f5438a.cmd"  -llibBluetopia.a -llibSS1BTA3D_C.a -llibc.a -llibmath.a 
    <Linking>
    warning #10247-D: creating output section ".data" without a SECTIONS
       specification
    
    "../lnk_msp430f5438a.cmd", line 111: error #10099-D: program will not fit into
    >> Compilation failure
    makefile:153: recipe for target 'A3DPDemo_SNK.out' failed
       available memory.  placement with alignment fails for section ".cinit" size
       0xe5 .  Available memory ranges:
       FLASH        size: 0xa380       unused: 0x0          max hole: 0x0       
    
     undefined first referenced
      symbol       in file     
     --------- ----------------
     __bss__   ./pre_init.obj  
     end       ./pre_init.obj  
    
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "A3DPDemo_SNK.out" not built

    I think these errors are due to the A3DPDemo_SNK lnk_msp430f5438a.cmd linker command file and the pre_init.c source file being written for the sections used by the COFF run-time library, and require changes for EABI.

    Given that the A3DPDemo_SNK example was created using the MSP430 v4.0.0 compiler for COFF format, suggest that you install a v4.0.x compiler in CCS 6.1.3 and leave the A3DPDemo_SNK example as using COFF initially and check that works before trying to change to a later compiler and/or EABI.

    I was able to install the v4.0.1 compiler into CCS 6.1.3 and build the unmodified A3DPDemo_SNK example without any linker warnings or errors.

  • Really appreciate your replies.

    In 1.5 i was able to compile but i am facing issue in v1.4R2. Currently i have my code changes in v1.4 which was working with old CCS compiler. In 1.4, i don't see EABI format :( libraries. Is anyway to get this working with 1.4? Or else , i need to port all my changes from 1.4 to 1.5.

    I have installed TI 4.4.7 compiler version which works fine for v1.5 but not for v1.4 . When i try v4.0.1 compiler, i get the below error


    !CONFIGURATION: 'com.ti.ccstudio.buildDefinitions.MSP430.Debug.1866955188.1313919168' [Sun Jul 03 21:25:45 IST 2016]

    !TOOL: 'com.ti.ccstudio.buildDefinitions.MSP430_4.0.exe.linkerDebug.2038584333'

    !WARNING: Unresolved option: com.ti.ccstudio.buildDefinitions.MSP430_4.0.linkerID.CINIT_HOLD_WDT


    Please let me know how can i make it work on v1.4R2.

    -Prashanth
  • Sorry there was an issue with one of the path i was setting. After fixing the same, i was able to compile with 1.4R2, with 4.4.7. Thanks a lot for all the guidance you provided.
  • Prashanth Kumar N said:
    I have installed TI 4.4.7 compiler version which works fine for v1.5 but not for v1.4 . When i try v4.0.1 compiler, i get the below error

    That happens when the project is changed from the original v4.0.0 compiler to a later v4.4.7 and then back to the v4.0.1 compiler because the the v4.0.1 compiler doesn't support the option to hold the watchdog during C initialization. I found after that error is written to the project.log file, the project still builds uding the v4.0.1 compiler.

    The _system_pre_init function in the APDPDemo source file pre_init.c is disabling the watchdog early during initialization, so the lack of the CINIT_HOLD_WDT option isn't a problem.