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.

Code Composer v5 suddenly "broke"



Running under Win7, last installed Stellaris software and Code Composer in October, 2012, learning and building projects on a TI LaunchPad for LM4F120H5QR.

I've had a few learning curve issues, particularly related to properly creating and configuring a new Project, but have managed, initially by copying existing Example projects and working from there. Yesterday, when making a minor source code modification to a project I'm building (this is after many successful iterations), I was unable to complete a Build. The error(s) thrown were unresolved library calls to GPIOPinTypeGPIOInput(), GPIOPinWrite(), SysCtlDelay(), etc., all of which I had been using with no problems. More specifically, the driver library file could not be found:

error #10008-D: cannot find file    "C:/StellarisWare/boards/ek-lm4f120xl/project0/ccs/../../../../driverlib/ccs-cm4f/Debug/driverlib-cm4f.lib"

Sure enough, there is no such file under /driverlib - but it obviously had been there only minutes before.

I started a Build All, and got similar errors from all other examples and my own projects that were in the Project Explorer.

I created a new project, a minimum empty one with only a skeleton main.c   That compiled and linked fine, but of course had no external references.

Pasted in my entire source, main() and various functions, and did another Build. This time, if immediately failed, unable to open my first #include,

#include "inc/hw_types.h"

Rebooted, thinking perhaps some or all environment variables had gotten trashed, but to no avail. The original project still compiles (does in fact locate the includes), but still fails in linker. The new "test" project still fails to even open the include(s).

Should I re-install CCS from my original download? Or can anyone think of something I might have "un-set"?

Thanks!

Dave

  • Dave,

    A quick note about how driverlib works:  The file your build complained about not being able to find, driverlib-cm4f.lib, is a precompiled binary.  We have a project inside stellarisware/driverlib/ that will go through and compile the module for every peripheral, and place the resulting binary into the .lib file. When you make a call to a GPIO function, then, instead of your compiler having to go through and recompile the source code for the GPIO module on every build, it just makes a link from your application code into the precompiled .lib file.  Note that this is a very high level overview; if you want to delve into how this works, I recommend googling around for a description of how a linker works, and how it handles precompiled binaries (as I am nowhere near eloquent enough to explain that well in a single forum post :)

    Now that that's out of the way, lets get down to actually solving your problem.  What probably happened is that somewhere along the way, either through running a Clean Project command, a Rebuild Project command, errant clicking, or file corruption, the precompiled binary that was unpacked in driverlib/ccs-cm4f/Debug went away.  Fortunately, you can find a project file for rebuilding driverlib inside the driverlib directory.  You should just be able to import the driverlib-cm4f project into ccs (found at driverlib/ccs-cm4f) and build that project, which will recreate your driverlib-cm4f.lib.

    For your second problem, when you create a project in CCS, you have to explicitly tell it where to look to find files that you are including.  This is done through the project properties, under Build->ARM Compiler->Include Options.  In the projects we ship, we normally have something like "${SW_ROOT}" in the #include search path field, which is a variable that eventually resolves to wherever you installed stellarisware (the exact meaning of this and all other build variables can be found in project properties under Resource->Linked Resources).  My guess is that the include path for your project doesn't have your stellarisware root directory, which means that when you tell CCS to #include "inc/hw_types.h", it doesn't know to start looking for the inc directory at wherever you installed stellarisware in your file system.  To fix this, you can just click the "Add..." button in the "Add dir to #include search path" field, click on "File System..." browse to your stellarisware install path, and hit OK.

    Let me know if any of this was unclear, or if you still have trouble building after re-creating your .lib file and making sure your include paths are set up correctly.

    -Jordan

  • Stellaris Jordan said:
    I am nowhere near eloquent enough to explain that well in a single forum post :)

    Says whom?  I (and assuredly others) think you did just great! 

    Detailed, well planned and very complete.  Bravo Jordan - job very well done.  (plz don't change to "rebrand" Jordan...)

  • Jordan, what a great and complete response!! Thank you!

    Problem 1, missing driverlib is now fixed.

    Problem 2, include search path is also fixed, but a little strangely: I realized why the includes were not found, and manually added "C:\Stellarisware" to the project's search path. When I was doing that, I did note the presence of "${SW_ROOT}/boards/ek-lm4f120xl" and "${SW_ROOT}" already there. When I re-compiled, the includes were found, but I still had problem 1 at that time. Now, after rebuiding driverlib, I got a warning about a duplicate path in the include search paths! Looks like there was some interaction between the two issues. I'll simply delete the path I added, and expect it will be fine...

    As to how it all happened, errant clicking and possibly a Clean Project were involved. I had been debugging the project, and made some minor source edits while sitting in debugger mode, instead of closing it and returning to the top project level. I then found I was unable to "get out of" the debugger, and that's probably where I started thrashing about, and killed things. Is there a clean way to exit and return to build?

    Again, thank you for the *eloquent* and detailed response.

    Dave

  • Dave: Glad to hear I could help!  When you say you were unable to "get out of" the debugger and "return to build", do you mean switch from the debugger perspective (Debug window in the top left, Variables, expressions, registers in the top right, console in the bottom, and code only in a really tiny window in the center of the screen) to the code editing perspective (project explorer on the left, console and problems in the bottom right, big code editing frame in the center)?  If so, there's a set of buttons in the top right of the CCS window you can use to switch contexts.  By default, when you hit the "stop" button in the debugger, it will take you back to the code editing perspective, but it's possible to switch between them manually.

    cb1: They can rebrand my launchpad when they pry it from my cold, dead hands :)  Despite all the hullabaloo, the Stellaris engineers are still the same folks with the same professionally (and at times, emotionally) vested interest in delivering a top notch software library to accompany a stellar MCU.  So long as it is in my power to do so, my forum handle will reflect as much.

  • I see those buttons now.  The "CCS Edit" button was collapsed off screen, and I had to drag the bar over a little, so I never noticed it!

    I've been encountering an entirely separate issue with the processor clock apparently changing (~2:1 ratio) with what should be unrelated code modifications. I'll post that as a new question, though...

    Thanks again for all your help!

  • @ Stellaris Jordan:

    What to say - back to back inspired Jordan responses!  (applause...)  

    The clarity - enthusiasm - and naturalness of your writing so contrasts w/ "rebrand gang." 

    "Stellar" stood for - and had/has "real" meaning.  My group find "rebrand replacement" empty & egomaniacal - neither good...

    Best of luck to you and your skilled tech fellows.  (women clearly included)