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.

MSP430F5310, CCS 5.5, COFF vs. ELF conflict, rts430.lib vs. libmath.a

Other Parts Discussed in Thread: MSP430F5310, MSP430WARE, MATHLIB, MSPMATHLIB

MSP430F5310, non-BIOS (bare-metal) project

Compiler 4.2.2

I have an issue where I get an error when COFF is selected and a different error when ELF is selected.

===========================
When set to COFF
---------------------------
warning #10204-D: could not resolve index library "libmath.a" to a compatible library

===========================
When set to EABI (I added a CR for readability)
---------------------------
"../lnk_msp430f5310.cmd", line 161: fatal error #16000: object files have incompatible formats

("C:/ti/ccsv5/tools/compiler/msp430_4.2.2/lib/rts430.lib<boot.obj>" = TI-COFF, "./Common/Adc/Adc.obj" = ELF)

===========================

This is my other recent post where COFF fixed the libmath.a issue. But, as you can see, it breaks something else.

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

===========================

See other build settings below.

Jim

Compiler includes:

"${CCS_BASE_ROOT}/msp430/include"
"${PROJECT_LOC}"
"${PROJECT_LOC}\Src"
... Other user source paths here...
"${MSP430WARE_DLIB}"
"${CG_TOOL_ROOT}/include"
"${CCS_BASE_ROOT}\msp430\lib"

Linker includes:

"libmath.a"
"libc.a"

"${CCS_BASE_ROOT}/msp430/include"
"${CG_TOOL_ROOT}/lib"
"${CG_TOOL_ROOT}/include"
"${CCS_BASE_ROOT}/msp430/lib"

Cmd file excerpt:

SECTIONS
{
    .bss        : {} > RAM                /* GLOBAL & STATIC VARS              */
    .data       : {} > RAM                /* GLOBAL & STATIC VARS              */
    .sysmem     : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
    .stack      : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

    .boot > 0x8000
    {
        -l rts430.lib<boot.obj > (.text)
    }

    GROUP
    {
        .text       : {}               /* CODE                              */
        .cinit      : {}               /* INITIALIZATION TABLES             */
        .const      : {}               /* CONSTANT DATA                     */
        
        .pinit      : {}               /* C++ CONSTRUCTOR TABLES            */
        .init_array : {}               /* C++ CONSTRUCTOR TABLES            */
        .mspabi.exidx : {}             /* C++ CONSTRUCTOR TABLES            */
        .mspabi.extab : {}             /* C++ CONSTRUCTOR TABLES            */
    } load = FLASH

    /*---[RUN FROM RAM]----------------------------------------*/
    RAMVECT_SEG : load = FLASH, run = RAM_VECTORS, table(_ramvector)
    .ovly : {} > FLASH
    /*---------------------------------------------------------*/

  • Jim Cook said:
    -l rts430.lib<boot.obj > (.text)

    Change this line to:

    -l rts*.lib<boot.obj > (.text)

  • Thanks,


    That got rid of the rts430.lib error.

    But know, the mathlib.a warning is back which is what I had fixed by going to ELF in the first place.

    <Linking>
    warning #10204-D: could not resolve index library "libmath.a" to a compatible library

    Jim

  • I presume you are still building for EABI (aka ELF) with --abi=eabi .  Is that correct?

    -George

  • Hi George,

    Yes, still building with EABI (ELF).

    I went back and tried COFF again as a test. It gets the libmath.a error too. But that is expected. I changed to ELF originally to fix that.

    But, after fixing the .lib error, it gets the libmath.a error regardless of COFF or ELF. However, I am sticking with ELF. I get the sense that I should be using that.

    Jim

  • I presume you have your code organized in a CCS project.  Please perform a full build from scratch.  Then use the Copy Build Log icon in the Console window to save off all the build commands and their results.  Post that file here.

    Thanks and regards,

    -George

  • Hi George,

    Build log attached as requested.

    Thanks,

    Jim

    5008.BuildLog.txt

  • I am less certain than usual that my reply is correct.

    I think your installation of MSPmathlib is out of date.  I think by updating MSP430ware within CCS that MSPmathlib will update as well.  If this doesn't work, then I think we should move this thread to the MSP430 forum.

    Thanks and regards,

    -George

  • Jim,

    I noticed in your build log that the project is being built with "-vmsp" option. This is the option for the silicon version and for the MSP430F310 this should be -vmspx. I am not sure how that option got set/changed to msp, but that could be the reason it is not able to resolve to a math library as all those libraries are built for mspx.

    Try changing the silicon version to mspx (from Project Properties) and let us know if that helps.

  • Hi AartiG,

    Thanks for the response. My local FAE had found the same thing last Friday night and sent me an email. When I got back to work on Monday, I tried that suggestion and, YES, it fixed the problem.

    My local FAE explained to me that even though the memory map for the 5310 ends a 0xFFFF, it still uses an mspx core and to look for that designation in the block diagram. Now I know better.

    So, thanks to both-of-you for the solution.

    Regards,

    Jim