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.

CODECOMPOSER: Automate build for Code Composer Studio projects

Part Number: CODECOMPOSER

I am working with Code Composer Studio Theia version 20.4 and C2000 projects. I have created several projects and stored them in a git repository. Now I want to automate the build process for CI/CD, but I am running into problems.
Here is my tools output:

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project1 -ccs.recurse -ccs.autoBuild
  !ERROR: A project with the name 'Project1' already exists in workspace

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project2 -ccs.recurse -ccs.autoBuild
  !ERROR: A project with the name 'Project2' already exists in workspace

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project3 -ccs.recurse -ccs.autoBuild
  !ERROR: A project with the name 'Project3' already exists in workspace

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project4 -ccs.recurse -ccs.autoBuild
  !ERROR: A project with the name 'Project4' already exists in workspace

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project5 -ccs.recurse -ccs.autoBuild
  !ERROR: A project with the name 'Project5' already exists in workspace

ccs-server-cli.bat -noSplash -workspace <git_repository_root> -application com.ti.ccs.apps.buildProject -ccs.workspace

# ================================================================================
# [Fri Feb 20 10:53:04 CET 2026]: CCS headless build starting... 


# ----------------------------------------

# --------------------------------------------------------------------------------
# [Fri Feb 20 10:53:04 CET 2026]: CCS headless build complete - 0 out of 0 projects have errors


Why does
ccs-server-cli.bat -noSplash -workspace <git_repository_root> -application com.ti.ccs.apps.buildProject -ccs.workspace
say:
headless build complete – 0 out of 0 projects have errors
What other options do I have for automation?

Note1:  I do not get the errors of type  !ERROR: A project with the name 'Project1' already exists in workspace on first calling the build-script (when it is completely new clonded)

Note2: I get the message (0 out of 0 projects) in a freshly cloned repository. In another repository where I have already worked with CCS Theia, the command works without any issues (and I also don’t need to perform an import beforehand). Apparently, the workspaces are created differently.
  • Hello,

    software-dl.ti.com/.../quote]

    I would refer to the content in the user's guide for your CCS version.

    https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs_20.4.0/index_project-management.html

    ccs-server-cli.bat -noSplash -workspace <git_repository_root> -data <git_repository_root> -application com.ti.ccs.apps.importProject -ccs.location <git_repository_root>\Project1 -ccs.recurse -ccs.autoBuild

    You can remove the "-data <git_repository_root>" parameter. 

      !ERROR: A project with the name 'Project1' already exists in workspace

    Looks like the project has already been imported to CCS in the past from that same location. If you want to reimport it anyway, then used the -ccs.overwrite option so that it will overwrite the project metadata information in the CCS project server cache.

    headless build complete – 0 out of 0 projects have errors

    I'm not sure if you omitted some of the build output (perhaps for privacy issues) or if that all the actual build output. Is that the full build output? If that is the full output, then are you able to build each individual project if you explicitly specify it with the -ccs.projects command?

    [/quote]
  • Hi,

    1) I need the -data <git_repostiroy_root>, otherwise I the the following error output. I can see in https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs_20.4.0/index_project-management.html that there is no such option, but I need it, otherwise it get the error below.

    Usage:
    ccs-server-cli.bat -workspace '<workspace-dir>' -application <application-id> [<application-arguments>]
    ccs-server-cli.bat -help

    where:
    <workspace-dir> - the absolute path to the workspace directory

    <application-id> - the headless application ID, e.g. 'com.ti.ccs.apps.projectBuild' or simply 'projectBuild'
    currently supported applications:
    1. com.ti.ccs.initialize (or simply 'initialize')
    2. com.ti.ccs.apps.projectCreate (or simply 'projectCreate' or 'createProject')
    3. com.ti.ccs.apps.projectImport (or simply 'projectImport' or 'importProject')
    4. com.ti.ccs.apps.projectModify (or simply 'projectModify' or 'modifyProject')
    5. com.ti.ccs.apps.projectBuild (or simply 'projectBuild' or 'buildProject')
    6. com.ti.ccs.apps.inspect (or simply 'inspect')

    2) I tried to work with -ccs.projects. But that did not work either. However, doing it in a completely new cloned repository again, I realized, that the -ccs.autoBuild option in the com.ti.ccs.apps.importProject command already startet a build (but only if the project is not yet in the workspace)

    3) Then I realized that I can easily repeate the behaviour by doing a complete cleanup of all generated files inside the repository, if I only have excuted builds from the command line. However, if once I openend the workspace within the GUI, afterwards I will always get the error message !ERROR: A project with the name 'Project1' already exists in workspace, even though I cleaned up all files inside the repository. It seams that the GUI version is using another workspace but I can't find out the location in order to also remove it.

    4) What is the official recommended way of automating builds from exisiting CCS Theia projects.

  • 1) I need the -data <git_repostiroy_root>, otherwise I the the following error output.

    -data should not be needed. How are you passing in the command. And which terminal (cmd or powershell)? Can I see a screenshot?


    2) I tried to work with -ccs.projects. But that did not work either.

    What didn't work? What error occurred? Again, what was the exact command passed to the terminal?

    However, if once I openend the workspace within the GUI, afterwards I will always get the error message !ERROR: A project with the name 'Project1' already exists in workspace, even though I cleaned up all files inside the repository. It seams that the GUI version is using another workspace but I can't find out the location in order to also remove it.

    Note that the workspace metadata is in a different location than the actual workspace folder. When a project is imported to a workspace folder, the metadata for the workspace will be updated. If the project is deleted from the workspace using CCS GUI, then it will update the metadata accordingly. If you simply delete it from the file system outside CCS, then that metadata is not updated. So if you then clone the repo in the same folder then the existing metadata for that location will still exist including the old project association. If you want to truly remove the project association from the workspace, then you can delete the workspace metadata in: <USER HOME>\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces. 

  • 1)  Without -data I get the following error, regardless of the used terminal (cmd, powershell)

    C:\ti\ccs2041/ccs/eclipse/ccs-server-cli.bat -noSplash -workspace <repo_dir> -ccs.location <repo_dir>/project1 -ccs.recurse -ccs.autoBuild
    Common launcher for headless CCS Server applications

    Usage:
    ccs-server-cli.bat -workspace '<workspace-dir>' -application <application-id> [<application-arguments>]
    ccs-server-cli.bat -help

    where:
    <workspace-dir> - the absolute path to the workspace directory

    <application-id> - the headless application ID, e.g. 'com.ti.ccs.apps.projectBuild' or simply 'projectBuild'
    currently supported applications:
    1. com.ti.ccs.initialize (or simply 'initialize')
    2. com.ti.ccs.apps.projectCreate (or simply 'projectCreate' or 'createProject')
    3. com.ti.ccs.apps.projectImport (or simply 'projectImport' or 'importProject')
    4. com.ti.ccs.apps.projectModify (or simply 'projectModify' or 'modifyProject')
    5. com.ti.ccs.apps.projectBuild (or simply 'projectBuild' or 'buildProject')
    6. com.ti.ccs.apps.inspect (or simply 'inspect')

    <application-arguments> - application-specific arguments (application usage will be printed with '-ccs.help' flag)

    2) I just realized when calling with -ccs.projects I do not need to add the project I want to build.

    3) Thanks for the information about <USER HOME>\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces. With this I can clean-up the workspace on the build machine.


    Summary: Only open point is why I have to call with -data although you save differently. Above all I am able to setup an automated build now.

  • C:\ti\ccs2041/ccs/eclipse/ccs-server-cli.bat -noSplash -workspace <repo_dir> -ccs.location <repo_dir>/project1 -ccs.recurse -ccs.autoBuild

    This one is missing the -application parameter to specify the action to do. 

    See my output below. I am not using the -data parameter at all:

    2) I just realized when calling with -ccs.projects I do not need to add the project I want to build.

    For -ccs.projects, you do need to specify the project to build. If you want to build all the projects, then you can simply use -ccs.workspace