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/TM4C123GH6PGE: Trying to use CMake with Code Composer 9.1

Part Number: TM4C123GH6PGE

Tool/software: Code Composer Studio

I have a number of projects with CMakeLists.txt CMake files.  I want to create CCS Projects from these, such that I can edit/build/debug from within CCS, as well as build from the command line. The ideal is to use CCS Eclipse to debug, while still supporting building from the command line.

I tried installing CMake4Eclipse into CCS Eclipse, and follow instruction for it, but several of the crucial settings are not available in CCS Eclipse; the settings dialogs are not quite the same as normal Eclipse CDT. Does anyone know how to get CMake4Eclipse to work with modern CCS?

I also tried to use CMake's CDT project generator, even though it appears to be unmaintained.  From this, I am able to generate an Eclipse-compatible projects, that I can easily import into CCS Eclipse as C++ Projects; however, these projects don't work the CCS tools, specifically, I cannot get it to run the debugger; this appears to be due to a "CCS Project" != "C++ Project".  I then tried to import the project as "CCS Project", but it refuses to be imported; I get an error dialog that says "Import failed for project 'mtrs_mainboard_firmware-Debug@bmb' because its meta-data cannot be interpreted. Please contact support."  So my guess is that the CDT project generator is creating obsolete .project/.cproject files. So I wonder, is there some means to convert a "C++ Project" to a "CCS Project", specifically so CCS Eclipse can be used to debug, and the other TI tools can also be used?

  • https://github.com/Chester-Gillon/AM3352-SOM-EVB_bare_metal is an example of a project which uses CMake for the build, and CCS can be used to browse/edit/build/debug.

    Initially CMake was used to create the Eclipse project files, but that had issues with Eclipse not showing the git status of the source files since the CMake project generator created the project using linked resources (which by design Eclipse doesn't consider as under configuration control).

    For the current version a "makefile project with existing code" Eclipse project was created to allow CCS to browse, edit and debug the project, with the .project and .cproject files placed under configuration control.

    To debug, debug configurations can be created from inside CCS (I don't have the hardware with me at moment and can't remember the exact steps to create the debug configurations).

  • When creating a standard Eclipse project, you have to enable Code Composer Studio Breakpoints Support to get CCS breakpoints by default - see https://e2e.ti.com/support/tools/ccs/f/81/p/699170/2589253#2589253 

  • Thanks for the insight, Chester. I think I stumbled upon almost the same thing, late yesterday. I tried using CMake to just create its usual build system (e.g. cd build, cmake ../path/to/source ...) that I can use to build from the console.  Then, I Import from "makefile project with existing code", enable breakpoints as per your later post, then create a debug configuration, and then I can edit/build/debug normally. This doesn't require keeping the .cproject/.project in revision control, though that may change.

    One odd thing that I notice, though, is that I cannot activate the project (i.e. cannot make it the Active Project); other true CCS Projects become active when I click on them, but my CMake projects cannot; any ideas on the ramifications of this behavior, or how to resolve that?

    I'm going to check out your sample too; thanks for all the help!

  • Bob Grimes69 said:
    One odd thing that I notice, though, is that I cannot activate the project (i.e. cannot make it the Active Project); other true CCS Projects become active when I click on them

    Yes there is a difference between how CCS projects and makefile projects appear "activated" in the Project Explorer view. For CCS projects, since the managed make system manages all the details about build configurations, the active configuration is highlighted and visually displayed as such in the Project Explorer view. That is not the case for a user defined makefile. However there shouldn't be any impact to the project and usage itself.