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.

Errors when recompiling under legacy .COFF format

Other Parts Discussed in Thread: OMAPL138

There are some .obj files in .COFF abi format I needed to include in my already existing CCS project. So I changed the output format in the General tab of project properties and tried to recompile.

However, I get "unresolved symbol" error messages for every single symbol (function) in the object files compiled from my project .c files. A partial listing of the output is below.

Nothing else was changed in the project configuration except for the output format. Is there something I need to update?

undefined first referenced
symbol in file
--------- ----------------
_DelayTimerSetup ./usb_dev_mouse.obj
_EDMA3EnableTransfer ./demoToneLoop.obj
_EDMA3Init ./demoToneLoop.obj
_EDMA3RequestChannel ./demoToneLoop.obj
_EDMA3SetPaRAM ./demoToneLoop.obj
_EMACCoreIntAck ./lwiplib.obj
_EMACDuplexSet ./lwiplib.obj
_EMACInit ./lwiplib.obj

.......

error: unresolved symbols remain
error: errors encountered during linking; "demo.out" not built

  • Hi,

    I see this is a continuation to your previous discussion here.

    These functions are part of libraries and/or code from TI libraries. Your previous thread mentions OMAPL138 and seems to indicate you are using Starterware. In this case, please make sure you are including all the correlated libraries required to build the entire project.

    In this case, the EDMA3 functions are usually located inside <drivers.lib> and the DelayTimerSetup is usually located either inside <platform.lib> or <utils.lib> (unfortunately I am not an expert in the Starterware).

    Hope this helps,

    Rafael

  • This project was successfully built and run under the eabi output format. As I said nothing has changed except the output format to COFF. I can build successfully if I change the output format back to eabi.

    That was just a sample of the unresolved functions. EVERY function in an .obj fileis listed as unresolved despite the compiler/linker command being exactly the same with the exception of --abi=eabi now being --abi=coffabi. Below is the full output.

    undefined first referenced
    symbol in file
    --------- ----------------
    _DelayTimerSetup ./usb_dev_mouse.obj
    _EDMA3EnableTransfer ./demoToneLoop.obj
    _EDMA3Init ./demoToneLoop.obj
    _EDMA3RequestChannel ./demoToneLoop.obj
    _EDMA3SetPaRAM ./demoToneLoop.obj
    _EMACCoreIntAck ./lwiplib.obj
    _EMACDuplexSet ./lwiplib.obj
    _EMACInit ./lwiplib.obj
    _EMACMACAddrSet ./lwiplib.obj
    _EMACMACSrcAddrSet ./lwiplib.obj
    _EMACMIIEnable ./lwiplib.obj
    _EMACNumFreeBufSet ./lwiplib.obj
    _EMACPinMuxSetup ./demoMain.obj
    _EMACRxBroadCastEnable ./lwiplib.obj
    _EMACRxCPWrite ./lwiplib.obj
    _EMACRxEnable ./lwiplib.obj
    _EMACRxHdrDescPtrWrite ./lwiplib.obj
    _EMACRxIntPulseEnable ./lwiplib.obj
    _EMACRxUnicastSet ./lwiplib.obj
    _EMACTxCPWrite ./lwiplib.obj
    _EMACTxEnable ./lwiplib.obj
    _EMACTxHdrDescPtrWrite ./lwiplib.obj
    _EMACTxIntPulseEnable ./lwiplib.obj
    _GPIOBank6Pin12PinMuxSetup ./demoMain.obj
    _GPIOBankIntEnable ./demoGpio.obj
    _GPIODirModeSet ./demoMain.obj
    _GPIOIntTypeSet ./demoGpio.obj
    _GPIOPinIntClear ./demoGpio.obj
    _GPIOPinRead ./demoMain.obj
    _GPIOPinWrite ./demoLedIf.obj
    _GrContextInit ./demoSlides.obj
    _GrImageDraw ./demoSlides.obj
    _GrOffScreen16BPPInit ./demoSlides.obj
    _GrRectFill ./demoMain.obj
    _GrStringDraw ./demoSlides.obj
    _GrStringWidthGet ./demoMain.obj
    _I2CInterruptVectorGet ./demoI2C.obj
    _I2CMasterBusBusy ./demoI2C.obj
    _I2CMasterControl ./demoI2C.obj
    _I2CMasterDataGet ./demoI2C.obj
    _I2CMasterDataPut ./demoI2C.obj
    _I2CMasterDisable ./demoI2C.obj
    _I2CMasterEnable ./demoI2C.obj
    _I2CMasterInitExpClk ./demoI2C.obj
    _I2CMasterIntDisableEx ./demoI2C.obj
    _I2CMasterIntEnableEx ./demoI2C.obj
    _I2CMasterIntStatus ./demoI2C.obj
    _I2CMasterSlaveAddrSet ./demoI2C.obj
    _I2CMasterStart ./demoI2C.obj
    _I2CMasterStop ./demoI2C.obj
    _I2CPinMuxSetup ./demoMain.obj
    _I2CSetDataCount ./demoI2C.obj
    _I2CStatusClear ./demoI2C.obj
    _IntDSPINTCInit ./demoMain.obj
    _IntEnable ./usb_dev_mouse.obj
    _IntEventClear ./demoTimer.obj
    _IntEventMap ./usb_dev_mouse.obj
    _IntGlobalDisable ./lwiplib.obj
    _IntGlobalEnable ./demoMain.obj
    _IntGlobalRestore ./lwiplib.obj
    _IntRegister ./usb_dev_mouse.obj
    _LCDPinMuxSetup ./demoRaster.obj
    _Lan8710aAutoNegotiate ./lwiplib.obj
    _Lan8710aLinkStatusGet ./lwiplib.obj
    _Lan8710aPartnerAbilityGet ./lwiplib.obj
    _MDIOInit ./lwiplib.obj
    _MDIOPhyAliveStatusGet ./lwiplib.obj
    _McASPPinDirInputSet ./demoToneLoop.obj
    _McASPPinDirOutputSet ./demoToneLoop.obj
    _McASPPinMcASPSet ./demoToneLoop.obj
    _McASPPinMuxSetup ./demoMain.obj
    _McASPSerializerTxSet ./demoToneLoop.obj
    _McASPTxClkCfg ./demoToneLoop.obj
    _McASPTxClkCheckConfig ./demoToneLoop.obj
    _McASPTxClkPolaritySet ./demoToneLoop.obj
    _McASPTxClkStart ./demoToneLoop.obj
    _McASPTxEnable ./demoToneLoop.obj
    _McASPTxFmtI2SSet ./demoToneLoop.obj
    _McASPTxFrameSyncCfg ./demoToneLoop.obj
    _McASPTxReset ./demoToneLoop.obj
    _McASPTxSerActivate ./demoToneLoop.obj
    _McASPTxTimeSlotSet ./demoToneLoop.obj
    _McASPWriteFifoEnable ./demoToneLoop.obj
    _PSCModuleControl ./demoRaster.obj
    _RTCCalendarGet ./demoRtc.obj
    _RTCCalendarSet ./demoRtc.obj
    _RTCEnable ./demoRtc.obj
    _RTCIntTimerEnable ./demoRtc.obj
    _RTCPinMuxSetup ./demoMain.obj
    _RTCRun ./demoRtc.obj
    _RTCTimeGet ./demoRtc.obj
    _RTCTimeSet ./demoRtc.obj
    _RTCWriteProtectDisable ./demoRtc.obj
    _RasterClearGetIntStatus ./demoRaster.obj
    _RasterClkConfig ./demoRaster.obj
    _RasterDMAConfig ./demoRaster.obj
    _RasterDMAFBConfig ./demoRaster.obj
    _RasterDisable ./demoRaster.obj
    _RasterEnable ./demoRaster.obj
    _RasterEndOfFrameIntDisable ./demoRaster.obj
    _RasterEndOfFrameIntEnable ./demoRaster.obj
    _RasterFIFODMADelayConfig ./demoRaster.obj
    _RasterHparamConfig ./demoRaster.obj
    _RasterLSBDataOrderSelect ./demoRaster.obj
    _RasterModeConfig ./demoRaster.obj
    _RasterNibbleModeDisable ./demoRaster.obj
    _RasterTiming2Configure ./demoRaster.obj
    _RasterVparamConfig ./demoRaster.obj
    _TimerConfigure ./demoTimer.obj
    _TimerCounterSet ./demoTimer.obj
    _TimerDisable ./demoTimer.obj
    _TimerEnable ./demoTimer.obj
    _TimerIntDisable ./demoMain.obj
    _TimerIntEnable ./demoTimer.obj
    _TimerIntStatusClear ./demoTimer.obj
    _TimerPeriodSet ./demoTimer.obj
    _UARTGetNum ./demoRtc.obj
    _UARTPutNum ./demoEnet.obj
    _UARTPutc ./demoRtc.obj
    _UARTPuts ./demoRtc.obj

    >> Compilation failure
    _UARTStdioInit ./demoMain.obj
    _UARTprintf ./demoMain.obj
    _USB0DeviceIntHandler ./usb_dev_mouse.obj
    _USB0HostIntHandler ./demoMain.obj
    _USBDHIDMouseInit ./usb_dev_mouse.obj
    _USBDHIDMouseStateChange ./usb_dev_mouse.obj
    _g_sFontCmss18b ./demoSlides.obj
    _g_sFontCmss22b ./demoSlides.obj

    error: unresolved symbols remain
    error: errors encountered during linking; "demo.out" not built

  • I noticed the probable cause. It looks like the Starterware libraries are incompatible. How would I go about recompiling the libraries for .COFF output format?

    Here is one of the warning messages.

    warning: library
    "../../../../../../../binary/c674x/cgt_ccs/omapl138/usblib/Debug/usblib.lib"
    contains ELF object files which are incompatible with the TI-COFF output
    file. Ensure you are using the proper library.

  • Note that whichever format you choose to build for, all object files and libraries should be of that format. This is also noted in the wiki page I referenced earlier in your other thread.

    In this case, I imagine the .libs you are linking in (drivers.lib, platform.lib, etc from Starterware) are in EABI format. So there is a problem when the COFF object files are referencing symbols in the ELF libraries. The way symbols are handled is different between COFF and EABI. An explanation on that is here: http://processors.wiki.ti.com/index.php/C6000_EABI_Migration#COFF_Underscore_Name_Mangling

    So you would either need to rebuild the .obj files you added to the project to be EABI format (so everything is EABI) or rebuild the Starterware libraries in COFF format so all the input seen by the linker is in the same format. I believe Starterware provides projects for the libraries, which you can try rebuilding for COFF.

    The EABI migration page gives some background on the two file formats and considerations for choosing one or the other. http://processors.wiki.ti.com/index.php/C6000_EABI_Migration