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.

CCS/TM4C129ENCZAD: How to resolve linker errors - unresolved symbols

Part Number: TM4C129ENCZAD
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

I am trying to build the uartecho example that was included with CCS V7 install  (C:\TI_CCS\tirtos_tivac_2_16_01_14\packages\examples\source\uartecho), which includes a uartecho.c and corresponding .cfg files. I created a new empty CCS project, and added the two files into the project. I had to add an include path for the compiler in the Properties-ARM Compiler, and add the board.h file to the project,  to get past compile step (a how-to-build readme would have been helpful). However after compile, there are ~100 unresolved symbol errors listed in the Problems console. I think I need to add the path to each one of the folders reported for each of the missing symbols to the Properties - ARM linker flags window???  If so, can someone tell me how to properly edit the flags window and the correct syntax for the paths? If that is not the case, then would appreciate a detailed description (go to this menu, select this option, etc) of what has to be done to fix this.

An example of one of the link errors:
unresolved symbol GPIOIntStatus, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f<GPIOTiva.oem4f>    uart_echo             C/C++ Problem


Thank you.

  • Update:
    The above unresolved symbol GPIOIntStatus, first referenced in
    C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/
    lib/drivers_tivaware.aem4f
    This referenced file path was in the Properties ARM Linker File Search Path. I found in the TivaWare Peripheral Drivers Library Guide that the GPIOIntStatus is part of the peripheral library, specified as /driverlib. So I added the path to /driverlib as C:\TI_CCS\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\driverlib, in the Properties ARM Linker Add Path window didn’t help, still get same 100 unresolved symbols.

    Any suggestions appreciated.
  • Update 2:
    Here are the active lines from the linker.cmd file for the uartecho:
    -l"E:\Projects\SW_WkSpace\uart_echo\Debug\configPkg\package\cfg\uartecho_pem4f.oem4f"
    -l"C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/mw/wifi/cc3x00/lib/cc3x00_host_driver.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\uia_2_00_05_50\packages\ti\uia\sysbios\lib\release\ti.uia.sysbios.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\uia_2_00_05_50\packages\ti\uia\loggers\lib\release\ti.uia.loggers.aem4f"
    -l"C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f"
    -l"C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_wifi_tivaware.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\tidrivers_tivac_2_16_01_13\packages\ti\mw\fatfs\lib\release\ti.mw.fatfs.aem4f"
    -l"C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/ports/lib/tirtosport.aem4f"
    -l"E:\Projects\SW_WkSpace\uart_echo\src\sysbios\sysbios.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\catalog\arm\cortexm4\tiva\ce\lib\Boot.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\uia_2_00_05_50\packages\ti\uia\services\lib\release\ti.uia.services.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\uia_2_00_05_50\packages\ti\uia\runtime\lib\release\ti.uia.runtime.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\uia_2_00_05_50\packages\ti\uia\events\lib\release\ti.uia.events.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\ti.targets.arm.rtsarm.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\boot.aem4f"
    -l"C:\TI_CCS\tirtos_tivac_2_16_01_14\products\bios_6_45_02_31\packages\ti\targets\arm\rtsarm\lib\auto_init.aem4f"

    --retain="*(xdc.meta)"

    /* C6x Elf symbols */
    --symbol_map __TI_STACK_SIZE=__STACK_SIZE
    --symbol_map __TI_STACK_BASE=__stack
    --symbol_map _stack=__stack


    --args 0x0
    -heap 0x0
    -stack 0x300

    --retain "*(.vecs)"

    xdc_runtime_Startup__EXECFXN__C = 1;
    xdc_runtime_Startup__RESETFXN__C = 1;


    SECTIONS
    {
    .bootVecs: type = DSECT
    .vecs: load > 0x20000000
    .resetVecs: load > 0x0

    xdc.meta: type = COPY
    }

  • Hi Erik

    erik skullerude said:
    I found in the TivaWare Peripheral Drivers Library Guide that the GPIOIntStatus is part of the peripheral library, specified as /driverlib. So I added the path to /driverlib as C:\TI_CCS\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\driverlib, in the Properties ARM Linker Add Path window didn’t help, still get same 100 unresolved symbols.

    You need to reference the actual library, not just add the path to it. The library is in .\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\driverlib\ccs\Debug\driverlib.lib

    In the ARM Linker File Search Path, you can add "driverlib.lib" for the first field ("--library) and the path to it ("C:\TI_CCS\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\driverlib\ccs\Debug") in the second field (--search_path)

    Thanks

    ki

  • NOTE: I fixed some errors in my previous post.
  • Thank you for the quick response. Adding that path got rid of ~80 unresolved symbol errors. But there are still ~16 more. For this case the TivaWare Peripheral Drivers guide had a description of the symbol, that made a reference to the /Driverlib library. So I guess that was a clue on where to look for the correct lib? For the remaining 16 errors, I don't have a clue how to figure out the path to the library for these cases as the symbol names don't appear in the TivaWare guide. Where can I find out what the path to the library is for a given symbol in general??? I searched several of the remaining symbols in the TivaWare Peripheral Drivers Lib Guide but no hits. Searched the forum, no info there either. Here are two examples with different paths to first reference:

    g_sUSBHostMSCClassDriver, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/
    drivers_tivaware.aem4f

    unresolved symbol USBHCDInit, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/
    drivers_tivaware.aem4f<USBMSCHFatFsTiva.oem4f>


    All of this leads to another question regarding this uartecho example. It is apparent from what is trying to get linked, this is more than a simple serial interface, as there are references to USB and WIFI, etc. This ex uses UART port 0. I gather that port can operate as a USB to UART correct? My testing will be on a custom designed board that uses port 0 only as simple serial interface - 2 wires, RX/TX. So, to operate that port in this manner, with this example design, can all this USB/WIFI stuff be removed somehow - I don't see any reference to this in the uartecho.c example file, so I'm wondering if it can be built without all this extra stuff? If so, would I do this by removing the list of files in the linker.cmd file (the first group of lines shown in the above post listing that file)?

    Finally, I just noticed the following error when the linker starts:
    <Linking>
    "configPkg/linker.cmd", line 166: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c , overlaps with ".intvecs", size 0x208 (page 0)

    I'm guessing this should be on a separate thread but ultimate goal is to get this example design built and running. Please advise, as I will need some direction on how to resolve this as well.


    Thank you.
  • Update:
    After a lot of head scratching and poking around, I came up with a parallel folder to the above (solution) driverlib, the following,
    C:\TI_CCS\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\usblib\ccs\Debug,

    with file usblib.lib. Added this to the Linker File Search Path. Now have ~5 errors. The following two are representative:

    unresolved symbol SemPost, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f<EMACSnow.oem4f>

    unresolved symbol ti_sysbios_knl_Mailbox_create, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_wifi_tivaware.aem4f<osi_tirtos.oem4f>

    At this point, I cannot locate the libs for these two - again, as I asked earlier, how are we supposed to figure this out - where is this documented?

    Thank you again.
  • erik skullerude said:

    All of this leads to another question regarding this uartecho example. It is apparent from what is trying to get linked, this is more than a simple serial interface, as there are references to USB and WIFI, etc. This ex uses UART port 0. I gather that port can operate as a USB to UART correct? My testing will be on a custom designed board that uses port 0 only as simple serial interface - 2 wires, RX/TX. So, to operate that port in this manner, with this example design, can all this USB/WIFI stuff be removed somehow - I don't see any reference to this in the uartecho.c example file, so I'm wondering if it can be built without all this extra stuff? If so, would I do this by removing the list of files in the linker.cmd file (the first group of lines shown in the above post listing that file)?

    This is a bit beyond my expertise. I don't know enough about TivaWare and the device itself to provide any good suggestions. I suggest posting in the TM4C forums. The experts there can help you best fo this.

  • erik skullerude said:
    Finally, I just noticed the following error when the linker starts:
    <Linking>
    "configPkg/linker.cmd", line 166: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".resetVecs" size 0x3c , overlaps with ".intvecs", size 0x208 (page 0)

    This error is explained in the below link:

    http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#Error:_placement_fails_for_section_.22xxx.22

  • erik skullerude said:
    unresolved symbol SemPost, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_tivaware.aem4f<EMACSnow.oem4f>

    unresolved symbol ti_sysbios_knl_Mailbox_create, first referenced in C:/TI_CCS/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages/ti/drivers/lib/drivers_wifi_tivaware.aem4f<osi_tirtos.oem4f>

    These are related TI-RTOS. As mentioned previously, I would suggest posting in the TM4C forums. The experts there are very knowledgeable about your device and the TivaWare examples. They should be able to help get going 

    Thanks

    ki