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.

TivaWare Example Project Build Errors CCSv6 TM4C129X (Ubuntu 14.04)



I'm having trouble importing and running example projects from TivaWare. With many of the projects for the TM4C123G I was able to figure out the necessary missing files to get some of the projects to build but I'm having more trouble with the TM4C129X examples.

With the simple blinky project I am able to import, build and run the code.

Trying to get the sd_card example working is another story.

File -> Import... -> CCS Project -> ../MyTivaWareInstallationDir/examples/boards/dk-tm4c129x/sd_card

Build. Produces errors

[Console Output]

**** Build of configuration Debug for project sd_card ****

/home/jamie/ti/ccsv6/utils/bin/gmake -k all 
Building file: ../sd_card.c
Invoking: ARM Compiler
"/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 -g --include_path="/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/include" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/third_party" --gcc --define=ccs="ccs" --define=PART_TM4C129XNCZAD --define=TARGET_IS_TM4C129_RA0 --define=ENABLE_LFN --define=UART_BUFFERED --diag_warning=225 --display_error_number --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="sd_card.pp"  "../sd_card.c"
Finished building: ../sd_card.c
 
Building file: ../startup_ccs.c
Invoking: ARM Compiler
"/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 -g --include_path="/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/include" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/third_party" --gcc --define=ccs="ccs" --define=PART_TM4C129XNCZAD --define=TARGET_IS_TM4C129_RA0 --define=ENABLE_LFN --define=UART_BUFFERED --diag_warning=225 --display_error_number --diag_wrap=off --gen_func_subsections=on --ual --preproc_with_compile --preproc_dependency="startup_ccs.pp"  "../startup_ccs.c"
Finished building: ../startup_ccs.c
 
Building target: sd_card.out
Invoking: ARM Linker
"/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 -g --gcc --define=ccs="ccs" --define=PART_TM4C129XNCZAD --define=TARGET_IS_TM4C129_RA0 --define=ENABLE_LFN --define=UART_BUFFERED --diag_warning=225 --display_error_number --diag_wrap=off --gen_func_subsections=on --ual -z --stack_size=1024 -m"sd_card_ccs.map" --heap_size=0 -i"/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/lib" -i"/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --xml_link_info="sd_card_linkInfo.xml" --rom_model -o "sd_card.out"  "./startup_ccs.obj" "./sd_card.obj" "../sd_card_ccs.cmd" -l"libc.a" -l"/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/../../../../../driverlib/ccs/Debug/driverlib.lib" -l"/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/../../../../../grlib/ccs/Debug/grlib.lib" 
<Linking>
warning #10229-D: output section ".data" refers to load symbol "g_sKentec320x240x16_SSD2119" and hence cannot be compressed; compression "rle" is ignored

 undefined                    first referenced 
  symbol                          in file      
 ---------                    ---------------- 
 CmdLineProcess               ./sd_card.obj    
 FrameDraw                    ./sd_card.obj    
 Kentec320x240x16_SSD2119Init ./sd_card.obj    
 PinoutSet                    ./sd_card.obj    
 TouchScreenCallbackSet       ./sd_card.obj    
 TouchScreenInit              ./sd_card.obj    
 TouchScreenIntHandler        ./startup_ccs.obj
 UARTPeek                     ./sd_card.obj    
 UARTStdioConfig              ./sd_card.obj    
 UARTStdioIntHandler          ./startup_ccs.obj
 UARTgets                     ./sd_card.obj    
 UARTprintf                   ./sd_card.obj    
 disk_timerproc               ./sd_card.obj    
 f_mount                      ./sd_card.obj    
 f_opendir                    ./sd_card.obj    
 f_readdir                    ./sd_card.obj    
 g_sKentec320x240x16_SSD2119  ./sd_card.obj    
 usnprintf                    ./sd_card.obj    
 uvsnprintf                   ./sd_card.obj    

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

>> Compilation failure
gmake: *** [sd_card.out] Error 1
gmake: Target `all' not remade because of errors.

**** Build Finished ****

Project Properties

Include paths. Properties -> CCS Build -> ARM Compiler -> Inlcude Options [Add dir to #include...]

"${CG_TOOL_ROOT}/include"
"${SW_ROOT}/examples/boards/dk-tm4c129x"
"${SW_ROOT}"
"${SW_ROOT}/third_party"

Build variables. Properties -> C/C++ Build -> Build Variables

ORIGINAL_PROJECT_ROOT  Directory  /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs
SW_ROOT  Directory  ${ORIGINAL_PROJECT_ROOT}/../../../../..

Compiler Flags. Properties -> CCS Build -> ARM Compiler

-mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me -O2 -g --include_path="/home/jamie/ti/ccsv6/tools/compiler/arm_5.1.6/include" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573" --include_path="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/third_party" --gcc --define=ccs="ccs" --define=PART_TM4C129XNCZAD --define=TARGET_IS_TM4C129_RA0 --define=ENABLE_LFN --define=UART_BUFFERED --diag_warning=225 --display_error_number --diag_wrap=off --gen_func_subsections=on --ual

Library files. Properties -> CCS Build -> ARM Linker -> File Search Path

[include library file or command file..]
"libc.a"
"${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib"
"${SW_ROOT}/grlib/ccs/Debug/grlib.lib"
[Add <dir> to library search path..]
"${CG_TOOL_ROOT}/lib"
"${CG_TOOL_ROOT}/include"

Directory Listings.

[project folder]
~/ccs/sd_card/
  .ccsproject
  .cproject
  Debug/
  macros.ini_initial
  .project
  sd_card.c
  sd_card_ccs.cmd
  .settings/
  startup_ccs.c
  target_config.ccxml

[sd_card example project folder]
~/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/
  ccs/
    .ccsimportspec
    .ccsproject
    .cproject
    Debug/
    macros.ini_initial
    .project
    .settings/
    target_config.ccxml
  ewarm/
  gcc/
  Makefile
  readme.txt
  rvmdk/
  sd_card.c
  sd_card_ccs.cmd
  sd_card.ewd
  sd_card.ewp
  sd_card.icf
  sd_card.ld
  sd_card.sct
  sd_card.uvopt
  sd_card.uvproj
  startup_ccs.c
  startup_ewarm.c
  startup_gcc.c
  startup_rvmdk.S

I also tried importing qs_weather but even after following this thread http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/337769/1178701.aspx#1178701 I wasn't able to get it to build. 

I'm assuming there is an issue with linked/missing files. I have experimented with adding several more include paths as well as directly adding files like "utils/uartstdio.c" to my project folder. All sorts of include paths added for directories under third_party. I was able to get passed some of the unresolved symbols this way but continued to hit walls. 

Can anyone spot the issue? I expected problems after going through similar issues with the TM4C123G example projects but these missing dependencies are maddening. 

  • I think I've found a possible cause for the import errors. It seems the linkedresources section of the .project file may not have been imported at all.

    Here are the results of diffing the project folder in my workspace with the example project ccs folder

    cd ~/ccs/sd_card
    diff ./ ~/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/
    Only in /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/: .ccsimportspec
    diff ./.cproject /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/.cproject
    9,10c9
    < 					<stringMacro name="ORIGINAL_PROJECT_ROOT" type="VALUE_PATH_DIR" value="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs"/>
    < 					<stringMacro name="SW_ROOT" type="VALUE_PATH_DIR" value="${ORIGINAL_PROJECT_ROOT}/../../../../.."/>
    ---
    > 					<stringMacro name="SW_ROOT" type="VALUE_PATH_DIR" value="${PROJECT_ROOT}/../../../../.."/>
    99,100c98
    < 					<stringMacro name="ORIGINAL_PROJECT_ROOT" type="VALUE_PATH_DIR" value="/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs"/>
    < 					<stringMacro name="SW_ROOT" type="VALUE_PATH_DIR" value="${ORIGINAL_PROJECT_ROOT}/../../../../.."/>
    ---
    > 					<stringMacro name="SW_ROOT" type="VALUE_PATH_DIR" value="${PROJECT_ROOT}/../../../../.."/>
    190,199d187
    < 	<storageModule moduleId="refreshScope"/>
    < 	<storageModule moduleId="org.eclipse.cdt.core.language.mapping">
    < 		<project-mappings>
    < 			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>
    < 			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>
    < 			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>
    < 			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>
    < 			<content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>
    < 		</project-mappings>
    < 	</storageModule>
    Common subdirectories: ./Debug and /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/Debug
    diff ./.project /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/.project
    26a27,93
    > 	<linkedResources>
    > 		<link>
    > 			<name>sd_card.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/sd_card/sd_card.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>sd_card_ccs.cmd</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/sd_card/sd_card_ccs.cmd</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>startup_ccs.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/sd_card/startup_ccs.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>drivers/frame.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/drivers/frame.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>drivers/kentec320x240x16_ssd2119.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/drivers/kentec320x240x16_ssd2119.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>drivers/pinout.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/drivers/pinout.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>drivers/touch.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/examples/boards/dk-tm4c129x/drivers/touch.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>utils/cmdline.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/utils/cmdline.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>utils/uartstdio.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/utils/uartstdio.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>utils/ustdlib.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/utils/ustdlib.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>third_party/fatfs/port/mmc-dk-tm4c129x.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/third_party/fatfs/port/mmc-dk-tm4c129x.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>third_party/fatfs/src/ff.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/third_party/fatfs/src/ff.c</locationURI>
    > 		</link>
    > 		<link>
    > 			<name>third_party/fatfs/src/option/cc932.c</name>
    > 			<type>1</type>
    > 			<locationURI>SW_ROOT/third_party/fatfs/src/option/cc932.c</locationURI>
    > 		</link>
    > 	</linkedResources>
    29,32d95
    < 			<name>ORIGINAL_PROJECT_ROOT</name>
    < 			<value>file:/home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/</value>
    < 		</variable>
    < 		<variable>
    34c97
    < 			<value>$%7BPARENT-5-ORIGINAL_PROJECT_ROOT%7D</value>
    ---
    > 			<value>$%7BPARENT-5-PROJECT_LOC%7D</value>
    Only in ./: sd_card.c
    Only in ./: sd_card_ccs.cmd
    Common subdirectories: ./.settings and /home/jamie/ti/TivaWare_C_Series-2.1.0.12573/examples/boards/dk-tm4c129x/sd_card/ccs/.settings
    Only in ./: startup_ccs.c
    Only in ./: utils
    

    I will attempt to simply copy that linked resources section into the corresponding area of my .project file and see if that doesn't solve many of the issues.

  • Hi,

    Maybe the best thing is to check out the project tab for the folders/files drivers/ and utils/ and if not found, add them as linked resources to the project, with all *.c files added to that folders. Adding as linked resources will add a small arrow to the graphical symbol in project tab.

    Then see what will remain unsolved and do the same. 

    Petrei

  • After copying the <linkedresources> section into my .project file (and Rebuilding the project) everything seems to be hunky dory. It would be nice if the importer knew this was a vital section to import.

  • Jamie Nix said:
    After copying the <linkedresources> section into my .project file (and Rebuilding the project) everything seems to be hunky dory. It would be nice if the importer new this was a vital section to import.

    The same problem was reported in the enet_io example not compiling on DK-TM4C129X kit thread for other TivaWare examples.

    For reasons I didn't get to the bottom of sometimes the Linux version of CCS fails to copy the <linkedresources> section upon project import, whereas the Windows version of CCS doesn't seem to the problem.