6.4.1. Creating and Building Projects from Command Line¶
CCS Theia has terminal commands for creating, building, and importing projects. This is very convenient for nightly automated builds, or simply to perform these actions without bringing up the GUI interface.
The script to run the command line builds is loaction in the below directories of your CCS Theia install:
- Windows and Linux:
<INSTALL DIR>/ccs/eclipse
- MacOS:
<INSTALL DIR>/ccs/ccs-server.app/Contents/MacOS
6.4.1.1. Create a CCS Project¶
Usage:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.createProject (-ccs.projectSpec <file> | -ccs.name <name> -ccs.device <id>) [<options>]
See createProject Options for a full list of options.
6.4.1.1.1. Example¶
Create a MSPM0L1306 project 'newProject' at location "C:/Users/user/workspace_ccstheia", leaving all other arguments at their defaults:
ccs-server-cli -noSplash -workspace "C:/Users/user/workspace_ccstheia" -application com.ti.ccs.apps.createProject -ccs.name newProject -ccs.device MSPM0L1306
Note
Always give preference to pass forward slashes (/) as the parameters, as they can be used across host OSes (Windows/Linux).
6.4.1.2. Build a CCS Project¶
Usage:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.buildProject (-ccs.projects <name1>[ <name2>]* | -ccs.workspace) [<options>]
See buildProject Options for a full list of options.
6.4.1.2.1. Examples¶
Clean the active build-configuration of project 'newProject' without building it:
ccs-server-cli -noSplash -workspace "C:/Users/user/workspace_ccstheia" -application com.ti.ccs.apps.buildProject -ccs.projects newProject -ccs.clean
Rebuild the 'Debug' build-configuration of project 'newProject':
ccs-server-cli -noSplash -workspace "C:/Users/user/workspace_ccstheia" -application com.ti.ccs.apps.buildProject -ccs.projects newProject -ccs.configuration Debug
Rebuild the active build-configuration of all projects in the workspace:
ccs-server-cli -noSplash -workspace "C:/Users/user/workspace_ccstheia" -application com.ti.ccs.apps.buildProject -ccs.workspace
6.4.1.3. Import an Existing CCS Project¶
Usage:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.importProject -ccs.location <path> [<options>]
See importProject Options for a full list of options.
6.4.1.4. FAQs¶
6.4.1.4.1. Is there a command for deleting projects?¶
Currently there is no specific command for this. However, if you import a project without copying its contents physically into the workspace (i.e. if you don't set -ccs.copyIntoWorkspace to true, then default behaviour is not to copy project into workspace), then you should be able to just delete the workspace directory using standard console commands (such as 'del' in the command prompt) before running next sequence. You can double check whether your project physically resides in the workspace by going to your workspace directory and see if the project directory is listed there or if it just contains a .metadata folder.
6.4.1.4.2. What is the command for importing multiple projects at once?¶
You can specify more than one project on the command line such as:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.importProject -ccs.location "C:/proj1" -ccs.location "C:/proj2"
6.4.1.4.3. Is there a command line option to specify a path for newly installed version of compiler tools so CCS Theia can detect it?¶
If the newly installed version of compiler tools is installed inside the CCS Theia directory (<ccs_install_dir>/ccstheia[x]/tools/compiler) it will automatically get discovered and can be used. A new directory (or directories) can be added to the compiler tool discovery path using the following command:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.initialize -ccs.toolDiscoveryPath "<path1>;<path2>"
6.4.1.4.4. Is there a command line option to specify a path for a new discoverable software product (C2000Ware, SimpleLink SDK, etc) so CCS Theia can detect it?¶
If the new discoverable software product is installed inside the CCS Theia directory it will automatically get discovered. You can add a new product discovery path with the following command:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.initialize -ccs.productDiscoveryPath "<path1>;<path2>"
6.4.1.4.5. Is there a command line option to specify a path for a new RTSC software product so CCS Theia can detect it?¶
You can add a new product discovery path with the following command:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.initialize -rtsc.productDiscoveryPath "<path1>;<path2>"
6.4.1.4.6. Are relative paths supported when using the Import Project command?¶
Yes, commands with relative paths for the working directory are supported. For example:
ccs-server-cli -noSplash -workspace "C:/Users/user/workspace_ccstheia" -application com.ti.ccs.apps.importProject -ccs.location ..\dsp\proj\acm
6.4.1.4.7. Can the -ccs.linkFile and -ccs.copyFile options use paths relative to a linked resource path variable such as PROJECT_LOC?¶
Yes. You can use a linked resource path variable like PROJECT_LOC with the -ccs.linkFile and -ccs.copyFile options. The path can be absolute or relative:
-ccs.linkFile "PROJECT_LOC\path\to\my\source.c"
-ccs.linkFile "PROJECT_LOC\..\..\path\to\my\source.c"
6.4.1.4.8. Is there an option to build all available build configurations for a project without specifying the configuration name? Currently it builds the default(active) configuration by default, or a specific build configuration can be specified.¶
No. As of CCS Theia 1.01, There is currently no option available to tell it to build all build configurations for a project.
6.4.1.4.9. Is there a way to modify the project options?¶
Yes, the project options can be modified using the following command:
ccs-server-cli -noSplash -workspace "<workspace_dir>" -application com.ti.ccs.apps.modifyProject -ccs.project <name> [<options>]
For a full list of options, see the Full API Guide.
6.4.1.4.10. When creating a project using projectspec file, is it possible to override the version of RTSC products specified in the projectspec using a command line option?¶
This can be done using option -ccs.products "[<id>[:<version>];]". For example:
-ccs.products "com.ti.SIMPLELINK_MSP432_SDK:1.60.00.12"
6.4.1.5. Full API Guide¶
For more information, see the Full API Guide.