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/TM4C123GH6PM: Unresolved symbol UARTprintf and UARTStdioInit (error #10234-D)

Part Number: TM4C123GH6PM


Tool/software: Code Composer Studio

Hello,

I was trying to use the UART printf function, but I receive unresolved symbol errors.

For back ground reference, I am working on Tiva-C workshop lab 12 starting on step 20 (https://engineering.purdue.edu/ece477/Archive/2014/Spring/S14-Grp1/docs/software/LM4F-LaunchPad-12%20-%20UART.pdf).

This my current software versions:

  • CCS v6.2.0.00050 
  • Compiler Version: TI v15.12.6.LTS
  • TivaC Version: 2.16.1.14
  • XDCtools version: 3.32.1.22_core

This is my main.c file: /cfs-file/__key/communityserver-discussions-components-files/81/2043.main.c

************************ Build of configuration Debug for project lab12_part2 ************************

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
'Building file: ../main.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="main.d" "../main.c"
"../main.c", line 82: warning #225-D: function "UARTStdioInit" declared implicitly
'Finished building: ../main.c'
' '
'Building file: ../tm4c123gh6pm_startup_ccs.c'
'Invoking: ARM Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="tm4c123gh6pm_startup_ccs.d" "../tm4c123gh6pm_startup_ccs.c"
'Finished building: ../tm4c123gh6pm_startup_ccs.c'
' '
'Building target: lab12_part2.out'
'Invoking: ARM Linker'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi -z -m"lab12_part2.map" --heap_size=0 --stack_size=100 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="lab12_part2_linkInfo.xml" --rom_model -o "lab12_part2.out" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/driverlib/ccs/Debug/driverlib.lib" "../tm4c123gh6pm.cmd" -llibc.a
<Linking>

undefined first referenced
symbol in file
--------- ----------------
UARTStdioInit ./main.obj
UARTprintf ./main.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking; "lab12_part2.out" not built

>> Compilation failure
makefile:142: recipe for target 'lab12_part2.out' failed
gmake: *** [lab12_part2.out] Error 1
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

  • See this post from Aarti:
    e2e.ti.com/.../197468

    Note that in your environment, the location of uartstdio.c is:
    C:\ti\tirtos_tivac_2_16_01_14\products\TivaWare_C_Series-2.1.1.71b\utils

    Thanks
    ki
  • Hi Ki,

    Thank you for responding so quickly.

    I copied the uartsdio.c file to my project, but I received similar errors (build log below). I even tried to add the address of the "utils" folder to my Include Options (ARM Compiler) and File Search Path (ARM Linker), but those did not work.

    I do want to note that I was unable to find UARTStdioInit() in the uartsdio.c file which means it may not be calling anything. I have never edited the file before and I have seen the function used in examples online. Has TI changed how UART functions are enabled?


    **** Build of configuration Debug for project lab12_part2 ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="main.d" "../main.c"
    "../main.c", line 82: warning #225-D: function "UARTStdioInit" declared implicitly
    'Finished building: ../main.c'
    ' '
    'Building file: ../tm4c123gh6pm_startup_ccs.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="tm4c123gh6pm_startup_ccs.d" "../tm4c123gh6pm_startup_ccs.c"
    'Finished building: ../tm4c123gh6pm_startup_ccs.c'
    ' '
    'Building file: ../uartstdio.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="uartstdio.d" "../uartstdio.c"
    'Finished building: ../uartstdio.c'
    ' '
    'Building target: lab12_part2.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi -z -m"lab12_part2.map" --heap_size=0 --stack_size=100 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/lib" -i"C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="lab12_part2_linkInfo.xml" --rom_model -o "lab12_part2.out" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "./uartstdio.obj" "C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/driverlib/ccs/Debug/driverlib.lib" "../tm4c123gh6pm.cmd" -llibc.a
    <Linking>

    undefined first referenced
    symbol in file
    --------- ----------------
    UARTStdioInit ./main.obj
    __error__ ./uartstdio.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "lab12_part2.out" not built

    >> Compilation failure
    makefile:143: recipe for target 'lab12_part2.out' failed
    gmake: *** [lab12_part2.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****
  • hmmm, yes I don't see it defined in uartstdio.c either. I searched the tivaware directory and was unable to find it. The experts in the TM4C forums would know. I suggest starting a new thread there.
  • After reading the documentation in uartstdio.c, I've discovered that calling UARTStdioConfig() is how I can enable UART and be able to use UARTprintf(). My code already has this config called so now I'm left with one unsolved symbol: "__error__".

    my updated main.c file: /cfs-file/__key/communityserver-discussions-components-files/81/8420.main.c

    **** Build of configuration Debug for project lab12_part2 ****

    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all

    'Building file: ../main.c'

    'Invoking: ARM Compiler'

    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b" --include_path="C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi --preproc_with_compile --preproc_dependency="main.d"  "../main.c"

    'Finished building: ../main.c'

    ' '

    'Building target: lab12_part2.out'

    'Invoking: ARM Linker'

    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -g --gcc --define=DEBUG --define=PART_TM4C123GH6PM --define=TARGET_IS_BLIZZARD_RB1 --define=ccs="ccs" --display_error_number --diag_wrap=off --diag_warning=225 --abi=eabi -z -m"lab12_part2.map" --heap_size=0 --stack_size=100 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/lib" -i"C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/utils" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.6.LTS/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="lab12_part2_linkInfo.xml" --rom_model -o "lab12_part2.out" "./main.obj" "./tm4c123gh6pm_startup_ccs.obj" "./uartstdio.obj" "C:/ti/tirtos_tivac_2_16_01_14/products/TivaWare_C_Series-2.1.1.71b/driverlib/ccs/Debug/driverlib.lib" "../tm4c123gh6pm.cmd"  -llibc.a

    <Linking>

    undefined first referenced

     symbol       in file    

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

    __error__ ./uartstdio.obj

    error #10234-D: unresolved symbols remain

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

    >> Compilation failure

    makefile:143: recipe for target 'lab12_part2.out' failed

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

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

    **** Build Finished ****

  • I was able to reach an alternative solution by using an example from Resource Explorer and copy&pasting code that would allow me to print strings and other data. This was pulled from another thread I started in the TM4C forum: e2e.ti.com/.../2332153