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.

#10204-D could not resolve index library "libmath.a" (msp430, non-BIOS)

Other Parts Discussed in Thread: MSP430F5310, MSPMATHLIB


CCS 5.5.0.00077
MSP430F5310 non-BIOS (bare-metal)
Compiler version 4.2.2

I am getting the error:
#10204-D could not resolve index library "libmath.a" to a compatible library.

I have found 4 other posts about this on the forum but none of them seem to represent or fix my problem case.

I found the library at: "C:\ti\ccsv5\ccs_base\msp430\lib" (see attached dir output).

See the attached files below for search path iformation and linker console output.

Any ideas?

Regards,
Jim

0434.MathLibWarning_SearchPaths.txt
=======================================================================================
Compiler search path
-------------------------------------------------------
<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.2.compilerID.INCLUDE_PATH.713143897" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.2.compilerID.INCLUDE_PATH" valueType="includePath">
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\Src&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\..\Common&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\..\Common\Adc&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\..\Common\Comms&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\..\Common\Flash&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${PROJECT_LOC}\..\Common\Timer&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${MSP430WARE_DLIB}&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}\msp430\lib&quot;"/>
</option>

=======================================================================================
Linker search path
-------------------------------------------------------
<option id="com.ti.ccstudio.buildDefinitions.MSP430_4.2.linkerID.SEARCH_PATH.164453398" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.MSP430_4.2.linkerID.SEARCH_PATH" valueType="libPaths">
    <listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/include&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>
    <listOptionValue builtIn="false" value="&quot;${CCS_BASE_ROOT}/msp430/lib&quot;"/>
</option>

3225.TiLib.txt
 Volume in drive C is TI106427W0D
 Volume Serial Number is 781B-1A62

 Directory of C:\ti\ccsv5\ccs_base\msp430\lib

10/09/2013  05:56 PM    <DIR>          .
10/09/2013  05:56 PM    <DIR>          ..
06/21/2013  03:42 AM             1,642 libmath.a
06/10/2013  04:37 AM           228,302 MSPMATHLIB_CCS_msp430_large_code_large_data.lib
06/10/2013  04:37 AM           228,258 MSPMATHLIB_CCS_msp430_large_code_restricted_data.lib
06/10/2013  04:37 AM           228,218 MSPMATHLIB_CCS_msp430_large_code_small_data.lib
06/10/2013  04:37 AM           228,218 MSPMATHLIB_CCS_msp430_small_code_small_data.lib
               5 File(s)        914,638 bytes

     Total Files Listed:
               5 File(s)        914,638 bytes
               2 Dir(s)  128,989,896,704 bytes free

3666.MathLibWarning_ConsoleLink.txt
'Building target: SynCapBdApp.out'
'Invoking: MSP430 Linker'
"C:/ti/ccsv5/tools/compiler/msp430_4.2.2/bin/cl430" -vmspx --abi=coffabi --advice:power="all" -g --define=__MSP430F5310__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --printf_support=minimal -z -m"SynCapBdApp.map" --heap_size=160 --stack_size=160 --use_hw_mpy=F5 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.2/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.2.2/include" -i"C:/ti/ccsv5/ccs_base/msp430/lib" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="SynCapBdApp_linkInfo.xml" --rom_model -o "SynCapBdApp.out"  "./Common/Adc/Adc.obj" "./Common/Comms/Sci.obj" "./Common/Comms/Comms.obj" "./Common/Flash/Flash.obj" "./Common/Flash/CodeFlash.obj" "./Common/Timer/Timer.obj" "./Common/Timer/Time.obj" "./Common/Timer/AlarmCtl.obj" "./MSP430F5xx_6xx/deprecated/ucs.obj" "./MSP430F5xx_6xx/deprecated/sys.obj" "./MSP430F5xx_6xx/deprecated/sfr.obj" "./MSP430F5xx_6xx/deprecated/ram.obj" "./MSP430F5xx_6xx/deprecated/pmm.obj" "./MSP430F5xx_6xx/deprecated/mpy32.obj" "./MSP430F5xx_6xx/deprecated/flash.obj" "./MSP430F5xx_6xx/deprecated/dma.obj" "./MSP430F5xx_6xx/wdt_a.obj" "./MSP430F5xx_6xx/usci_uart.obj" "./MSP430F5xx_6xx/usci_spi.obj" "./MSP430F5xx_6xx/usci_i2c.obj" "./MSP430F5xx_6xx/usci_b_spi.obj" "./MSP430F5xx_6xx/usci_b_i2c.obj" "./MSP430F5xx_6xx/usci_a_uart.obj" "./MSP430F5xx_6xx/usci_a_spi.obj" "./MSP430F5xx_6xx/ucs.obj" "./MSP430F5xx_6xx/tlv.obj" "./MSP430F5xx_6xx/timer_d.obj" "./MSP430F5xx_6xx/timer_b.obj" "./MSP430F5xx_6xx/timer_a.obj" "./MSP430F5xx_6xx/tec.obj" "./MSP430F5xx_6xx/sys.obj" "./MSP430F5xx_6xx/sfr.obj" "./MSP430F5xx_6xx/sd24_b.obj" "./MSP430F5xx_6xx/rtc_c.obj" "./MSP430F5xx_6xx/rtc_b.obj" "./MSP430F5xx_6xx/rtc_a.obj" "./MSP430F5xx_6xx/ref.obj" "./MSP430F5xx_6xx/ram.obj" "./MSP430F5xx_6xx/pmm.obj" "./MSP430F5xx_6xx/pmap.obj" "./MSP430F5xx_6xx/mpy32.obj" "./MSP430F5xx_6xx/ldopwr.obj" "./MSP430F5xx_6xx/gpio.obj" "./MSP430F5xx_6xx/flash.obj" "./MSP430F5xx_6xx/eusci_uart.obj" "./MSP430F5xx_6xx/eusci_spi.obj" "./MSP430F5xx_6xx/eusci_i2c.obj" "./MSP430F5xx_6xx/eusci_b_spi.obj" "./MSP430F5xx_6xx/eusci_b_i2c.obj" "./MSP430F5xx_6xx/eusci_a_uart.obj" "./MSP430F5xx_6xx/eusci_a_spi.obj" "./MSP430F5xx_6xx/dma.obj" "./MSP430F5xx_6xx/dac12_a.obj" "./MSP430F5xx_6xx/crc.obj" "./MSP430F5xx_6xx/comp_b.obj" "./MSP430F5xx_6xx/bak_batt.obj" "./MSP430F5xx_6xx/aes.obj" "./MSP430F5xx_6xx/adc12_a.obj" "./MSP430F5xx_6xx/adc10_a.obj" "./Src/main.obj" "./Src/Vector.obj" "./Src/TargetTimer.obj" "./Src/TargetComms.obj" "./Src/Lamp.obj" "./Src/Alarm.obj" "../lnk_msp430f5310.cmd" -l"libmath.a" -l"libc.a" 
<Linking>
remark #10372-D: (ULP 4.1) Detected uninitialized Port A in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
warning #10204-D: could not resolve index library "libmath.a" to a compatible library
warning #10247-D: creating output section "APPSWVER_SEG" without a SECTIONS specification
warning #10247-D: creating output section "FLASHVECT_SEG" without a SECTIONS specification
warning #10247-D: creating output section "RAMVECT_SEG" without a SECTIONS specification
remark #10372-D: (ULP 4.1) Detected uninitialized Port B in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port C in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
'Finished building target: SynCapBdApp.out'

  • Looking at your build console output, you are building with the older COFF ABI (--abi=coffabi) , but all the MSPMATHLIB libraries are built for the newer EABI.  That is the reason for the warning that it could not resolve to a compatible librray.  Changing your build options from --abi=coffabi to --abi=eabi shoudl fix it. You can do this from Project Properties->General, and change Output format from Legacy COFF to EABI.

  • Never mind.

    I found the answer in another post on the forum (that I actually read before!). I guess I didn't catch it.

    I had to to change the output from COFF to EABI.(ELF). That fixed it.

    I found the answer here:

    ---------------------------------------------------------------

    http://e2e.ti.com/support/development_tools/compiler/f/343/t/370812.aspx

    Guru75355 points

    The problem is you are building with the older COFF ABI, but all those MSPMATHLIB libraries are built for the newer EABI.  So, the warning is correct, none of the libraries are compatible.  You need to change from --abi=coffabi to --abi=eabi.

    Thanks and regards,

    -George

    ---------------------------------------------------------------

    By the way, though, that leads to a secondary question. Why does the output file type affect the library link?

    I suspect that because libraries are are already compiled down to object code, that object format has to be linked directly into the output file. Just a guess. Let me know.

    Jim

  • Hi AartiG,

    Apparently you answered the question while I was typing up my response that I had already found the answer. BUT so did you so I was covered anyway. Thanks.

    I did add a secondary question in my other reply. Could you take a quick look at that?

    Regards,

    Jim

  • Jim Cook said:

    Why does the output file type affect the library link?

    I suspect that because libraries are are already compiled down to object code, that object format has to be linked directly into the output file. Just a guess. Let me know.

    The library is a collection of object files. During link time, the linker looks at the output format of all the object files being linked, those coming from source files as well as those in the libraries, and all of these have to be of the same output format. You cannot mix coff abi objects and eabi objects.