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.

MSP430 large data and code model linker error

Other Parts Discussed in Thread: MSP430F5438A

When specifying the large data and code model in the project compiler settings (I'm targeting a  MSP4305438A), the linker produces an error:

 

>> Compilation failure

undefined             first referenced

  symbol                   in file    

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

__TI_decompress_none                 

__TI_decompress_rle24                

error #10234-D: unresolved symbols remain

warning #10202-D: no suitable entry-point found; setting to 0

error #10010: errors encountered during linking; "msp430x54xA_UCS_2.out" not

   built

gmake: *** [msp430x54xA_UCS_2.out] Error 1

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

 

What do i need to do to make this go away.  Am I missing a library somewhere?

Thanks,

Stuart

  • Additional info:

     

    Compiler Version TI v4.1.4

    eabi (ELF)

    Runtime support library <automatic>

     

    Compile Flags:

    -vmspx --abi=eabi --code_model=large --data_model=large --near_data=none -g --include_path="C:/ti/ccsv5/ccs_base/msp430/include" --include_path="C:/Program Files/easyGUI/Demo" --include_path="C:/ti/ccsv5/tools/compiler/msp430_4.1.4/include" --advice:power="all" --define=__MSP430F5438A__ --define=REGION_NORTH_AMERICA --define=ANAREN --define=ZM_PHY_SPI --diag_warning=225 --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal

     

    Linker Flags:

    -vmspx --abi=eabi --code_model=large --data_model=large --near_data=none -g --advice:power="all" --define=__MSP430F5438A__ --define=REGION_NORTH_AMERICA --define=ANAREN --define=ZM_PHY_SPI --diag_warning=225 --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal -z --stack_size=160 -m"msp430x54xA_UCS_2.map" --heap_size=160 --use_hw_mpy=F5 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.4/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.4/include" --reread_libs --warn_sections --display_error_number --xml_link_info="msp430x54xA_UCS_2_linkInfo.xml" --rom_model

  • Is there a -l "libc.a" on the link step after all those options? This option is what tells the linker to choose an automatic library, and if a library that matches your set of build options does not exist (ie one for large code and large data model) it will build it on the fly and then use it for the link. Do you see that step happening? It would help to see the full output in the CCS build console.

  • Yes there is a -l "libc.a" in the link step and it does try to build the appropriate library:

     

    'Invoking: MSP430 Linker'

    "C:/ti/ccsv5/tools/compiler/msp430_4.1.4/bin/cl430" -vmspx --abi=eabi --code_model=large --data_model=large --near_data=none -g --advice:power="all" --define=__MSP430F5438A__ --define=REGION_NORTH_AMERICA --define=ANAREN --define=ZM_PHY_SPI --diag_warning=225 --display_error_number --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal -z --stack_size=160 -m"msp430x54xA_UCS_2.map" --heap_size=160 --use_hw_mpy=F5 -i"C:/ti/ccsv5/ccs_base/msp430/include" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.4/lib" -i"C:/ti/ccsv5/tools/compiler/msp430_4.1.4/include" --reread_libs --warn_sections --display_error_number --xml_link_info="msp430x54xA_UCS_2_linkInfo.xml" --rom_model -o "msp430x54xA_UCS_2.out"  "./Common/utilities.obj" "./Common/printf.obj" "./HAL/hal_anaren.obj" "./Messages/oids.obj" "./Messages/infoMessage.obj" "./Messages/header.obj" "./ZM/zm_phy_spi.obj" "./ZM/zdo.obj" "./ZM/simple_api.obj" "./ZM/module_utilities.obj" "./ZM/module_errors.obj" "./ZM/module.obj" "./ZM/af.obj" "./easyGUI/GuiVar.obj" "./easyGUI/GuiStruct.obj" "./easyGUI/GuiLib.obj" "./easyGUI/GuiFont.obj" "./easyGUI/GuiDisplay.obj" "./msp430x54xA_UCS_2.obj" -l"libc.a" "../lnk_msp430f5438a.cmd"

    <Linking>

    warning #10366-D: automatic library build: using library

       "C:\ti\ccsv5\tools\compiler\msp430_4.1.4\lib\rts430x_lc_ld_eabi.lib" for the

       first time, so it must be built.  This may take a few minutes.

    cygwin warning:

      MS-DOS style path detected: c:/ti/ccsv5/tools/compiler/msp430~1.4/lib/rtssrc.zip

      Preferred POSIX equivalent is: /cygdrive/c/ti/ccsv5/tools/compiler/msp430~1.4/lib/rtssrc.zip

      CYGWIN environment variable option "nodosfilewarning" turns off this warning.

      Consult the user's guide for more details about POSIX paths:

        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

    cygwin warning:

      MS-DOS style path detected: C:\Users\a0221026\Documents\Miller Electric\MSP430GUI\msp430x54xA_UCS_2\Debug

      Preferred POSIX equivalent is: /cygdrive/c/Users/a0221026/Documents/Miller Electric/MSP430GUI/msp430x54xA_UCS_2/Debug

      CYGWIN environment variable option "nodosfilewarning" turns off this warning.

      Consult the user's guide for more details about POSIX paths:

        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

    cygwin warning:

      MS-DOS style path detected: C:\Users\a0221026\Documents\Miller Electric\MSP430GUI\msp430x54xA_UCS_2\Debug

      Preferred POSIX equivalent is: /cygdrive/c/Users/a0221026/Documents/Miller Electric/MSP430GUI/msp430x54xA_UCS_2/Debug

      CYGWIN environment variable option "nodosfilewarning" turns off this warning.

      Consult the user's guide for more details about POSIX paths:

        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

    cygwin warning:

      MS-DOS style path detected: C:\Users\a0221026\Documents\Miller Electric\MSP430GUI\msp430x54xA_UCS_2\Debug

      Preferred POSIX equivalent is: /cygdrive/c/Users/a0221026/Documents/Miller Electric/MSP430GUI/msp430x54xA_UCS_2/Debug

      CYGWIN environment variable option "nodosfilewarning" turns off this warning.

      Consult the user's guide for more details about POSIX paths:

        http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

      -->  error: '*.obj

    ' not found

    gmake.exe[1]: *** [library] Error 1

    >> ERROR: mklib: gmake error during rts430x_lc_ld_eabi.lib build

    warning #10207-D: automatic RTS selection:  resolving index library "libc.a" to

       "C:\ti\ccsv5\tools\compiler\msp430_4.1.4\lib\rts430x_lc_ld_eabi.lib", but

       "C:\ti\ccsv5\tools\compiler\msp430_4.1.4\lib\rts430x_lc_ld_eabi.lib" was not

       found

    warning #10062-D: entry-point symbol "_c_int00" undefined

    >> Compilation failure

    undefined             first referenced

      symbol                   in file    

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

    __TI_decompress_none                 

    __TI_decompress_rle24                

    error #10234-D: unresolved symbols remain

    warning #10202-D: no suitable entry-point found; setting to 0

    error #10010: errors encountered during linking; "msp430x54xA_UCS_2.out" not

       built

    gmake: *** [msp430x54xA_UCS_2.out] Error 1

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

    **** Build Finished ****

  • Stuart Baker said:

    gmake.exe[1]: *** [library] Error 1

    >> ERROR: mklib: gmake error during rts430x_lc_ld_eabi.lib build

    warning #10207-D: automatic RTS selection:  resolving index library "libc.a" to

       "C:\ti\ccsv5\tools\compiler\msp430_4.1.4\lib\rts430x_lc_ld_eabi.lib", but

       "C:\ti\ccsv5\tools\compiler\msp430_4.1.4\lib\rts430x_lc_ld_eabi.lib" was not

       found

    The library build step failed, as a result of which the library was not built, hence was not found by the linker and as a consequence the link step failed.

    Cygwin is known to have some issues with the library build utility. Please take a look at this wiki section:
    http://processors.wiki.ti.com/index.php/Mklib#MKS_or_Cygwin_tools_in_your_path

  • This wiki page does not really answer my question.  It does not apear that I am running into any of the issues listed.  I am running vanila CCS and not doing anything custom.  I don't understand (unless there is some kind of user error) why this does not work right out of the box.

    Any more specific suggestions?

    Thanks,

    Stuart

  • Follow the directions in http://processors.wiki.ti.com/index.php/Mklib#Shared_or_read-only_library_directory to pre-build all of the libraries.  Make sure you remove all Cygwin paths from your path before beginning, and add the paths described in http://processors.wiki.ti.com/index.php/Mklib#General