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.

Why is it so painful to start a new CCS6 TM4C project?

Other Parts Discussed in Thread: EK-TM4C123GXL

Hello,

I just got the TM4C123G Launchpad and I am trying to get it working. I installed Tiva ware on my system. (Just a side note on that why did you decide to use dots in the default file path? As a programmer that makes me cringe a little, dots are commonly used to define extensions in Windows and can cause all kinds of issues when used like that)

Anyway I ran into trouble starting a new project. First I attempted to just point CCS6 to the blinking example workspace. That failed. CCS6 did not recognize any of the projects in that workspace. So I created a new workspace and imported blinky. The import worked by it won't compile. It is missing the 'inc' path as well as the 'driverlib' path. 

I tried the following to resolve this:

1. Copying both the inc and driver lib folders into my project; when I did that files in both folders failed to compile.

2. Adding the Tiva ware folder to "Include Options" this failed and gave me the following error:

error #10008-D: cannot find file "C:/driverlib/ccs/Debug/driverlib.lib"

3. Removed ${CG_TOOL_ROOT}/include

"../startup_ccs.c", line 25: fatal error #1965: cannot open source file "stdint.h"

4. Removed ${SW_ROOT}

error #10008-D: cannot find file "C:/driverlib/ccs/Debug/driverlib.lib"

So no luck. I have my Tiva C TM4C123G launchpad in it's box still because I can't even compile the example project. Whats going on here? If the driverLib and inc are critical for the example project to run wouldn't it make sense to, include them properly in the CCS preferences by default?

Any recommendations on what I can do to get blinky running?

Thanks,

Jonathan L Clark

  • Hi Jonathan,

    Something seems wrong here, as I've used Tivaware and the its pretty smooth in importing and building example codes. Let me call in my friend to help you out.

    Regards,
    Gautam
  • Hi Jonathan,

         See, getting started guide for Tiva Launchpad and Tiva Connected Launchpad, to familiarize yourself with creating a new CCS project from scratch and also importing Tivaware example programs. Download the workbook.pdf

         

         

         To try out the blinky example program just import it to CCS Workspace by going to CCS Project->Import CCS Project.  You do not need the driverlib for the blinky example program to work. I just imported blinky example program to my CCS Workspace and it build without errors.

    - kel      

  • Thanks,

    Unfortunately tried that procedure multiple times. Each time I got similar errors. I even tried reinstalling.

    I also tried deleting Tiva ware and reinstalling, no effect.

    Jonathan L  Clark

  • Okay I think I figured it out. I will go through my steps. I start with an empty workspace.

    1. I import the blinky project for the TM4C123G development kit
    2. I build the project and it fails (unable to find any files in the 'inc' or 'driverLib' folders
    3. In properties ->Build -> ARM Compiler -> Include Options include under 'Add dir' the root folder for the Tivaware.
    4. Build again, this time it fails because it can't link some of the basic GPIO library functions.
    5. In properties -> Build -> ARM Linker -> File Search Path under 'Add dir' add the root folder for the Tivaware.
    6. Build again, build still fails but it is attempting to find the driverlib in C:/driverlib/ccs/Debug/driverlib.lib
    7. In properties -> Build -> ARM Linker -> File Search Path Include library file, remove "${SW_ROOT}/driverlib/ccs/Debug/driverlib.lib from the list
    8. Build fails again but it is not searching for the driver lib in the invalid location.
    9. In properties -> Build -> ARM Linker -> File Search Path under file add driverLib/ccs/debug/driverLib.lib
    10 Build one last time and it compiles. (I have not tested if it actually runs)

    So I consider this "jumping through hoops" to get my project working and I am very disappointed. I am not sure why it isn't just working like it should. Someone new to the TI IDE may have given up before I did and went to Freescale or another manufacturer.

    The MSP430 series seems to have this worked out as well. I just wish TM4C was a little easier to setup.

    Thanks,

    Jonathan L Clark
  • Hi Jonathan,

        My first TI Launchpad is Tiva Connected Launchpad and I did not encounter your problem after going through guide first.

        When you install CCS did you select "Tiva C Series ARM MCU's" as Processor Support Option? From what I know the only reason that you need to add drivelib.lib to blinky is that if you modify blinky example program to call driverlib C API's.

        TI Engineer  can also help you.

    - kel

  • Hi Kel,

    Yeah, I installed with the Tiva C Series ARM MCU's. I also installed Tivaware on my system. I got the blinky program from the Tivaware folder and the blinky program I pulled used driverLib calls. I was under the impression that anything more powerful than an MSP430 pretty much required the driverLib to work properly, (maybe I am wrong). 

    So I pulled in blinky and made no modifications to it and it failed to compile. I did not use the default workspace for CCS6 (maybe that is a factor?) 

    I also noticed that the blinky application located in TivaWare_C_Series-2.1.2.111\examples\boards\ek-tm4c123gxl\blinky

    uses driverLib

    The blinky application located in TivaWare_C_Series-2.1.0.12573\examples\boards\ek-tm4c123gxl\blinky

    does not.

    So I guess I am wrong, driverLib is not critical. But for some reason they decided to use driverLib in the latest version of blinky instead of sticking with raw register operations.

    Thanks,

    Jonathan L Clark

  • Jonathan,

    I understand your frustration and I am sorry you had to jump through hoops to get an example project working. 

    In an attempt to reproduce this I found out that the first example project imported into a new workspace does not set the variable SW_ROOT correctly. This variable is used in the paths set under Compiler Include Options (--include_path) as well as Linker File Search Path (--library option). Since this variable is not set correctly those paths point to incorrect locations (C:\ instead of the root TivaWare folder) and the build fails.

    The variable is getting incorrectly set to PROJECT_ROOT like this:

    While it should be set to ORIGINAL_PROJECT_ROOT:

    This is a bug and I will file a bug report to have this addressed in CCS.

    This issue only happens with the first project imported into the workspace. After the first import, all future project imports set the variable correctly and there should be no issues. I see you have already gone through the steps to get the project to build, but for future reference, a quicker workaround is to delete that first project (and contents on disk when prompted) and re-import it again. 

    Hope this helps!

  • FYI, the tracking # for this bug CCSIDE-2894.
  • Aarti

    Thanks for the help! It make me feel better that this is not intended behavior.

    Thanks,

    Jonathan L Clark