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.

MSPM0L2228: Code Composer Studio workspace problems IDE to CLI

Part Number: MSPM0L2228

Tool/software:

I have been using the IDE to build our project for a couple of months now, and wanting to get a command line build running for our build server.

It was immediately apparent that the workspace file I thought was being used in its entirety to describe the projects was only part of how Code Composer Studio knows about workspaces and projects.

There is insufficient information saved to a workspace file from the IDE, meaning that information is stored elsewhere on disk, outside of source control.

We do not currently understand this, and expect a workspace to describe everything that is required, so it can be built in any location where all the files are checked out to.

It appears as though a lot of information is stored under C:\Users\<UserName>\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces, almost like some sort of cache, but seems to be much more than that.

Please can we ask for help with this to understand what is required to have a completely standalone workspace and projects that are not dependant on something else?

  • Hi Chris,

    What version of CCS are you using? The workspace environment in CCS Theia/20 is quite different from earlier versions.

    Thanks

    ki

  • Hi Ki, we are using CCS Theia version 1.5.1.3.

  • How workspaces work in CCS Theia/20 are a bit different that in the past. 

    This section has a summary: https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs/ccs_project-management.html#workspaces

    It appears as though a lot of information is stored under C:\Users\<UserName>\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces, almost like some sort of cache, but seems to be much more than that.

    This folder does indeed store cached information on the workspace environment and also some additional workspace settings.

    Please can we ask for help with this to understand what is required to have a completely standalone workspace and projects that are not dependant on something else?

    Based on your first comment:

    I have been using the IDE to build our project for a couple of months now, and wanting to get a command line build running for our build server.

    The key thing needed is the project regarding command line builds. Workspaces are not really designed to be fully portable. If the CLI build environment will be different from the original environment then typically the the project would be imported to a new workspace folder location and then built from there. Much of the settings/cache stored for the workspace are IDE specific and not related to project build. The project itself has all the necessary project settings for the build.

    Hi Ki, we are using CCS Theia version 1.5.1.3.

    Please note that CCS 20 is out. It was quite a few fixes and enhancements over CCS Theia 1.5.1 so I would suggest updating to it at your earliest convenience. 

    Thanks

    ki

  • Hi Ki,

    After some experimentation, it looks like we can get it building correctly by re-initialising the workspace and importing the project every time, however it is not clear which workspace is being used, as the one specified on the command line remains empty. Clearly it is using something to store the values from the command line as after the first run, I see an error stating the project is already imported.

    The initialisation step resolves a problem we were having for building the correct sub-project, so that is good.

    That is using the command and option: -application com.ti.ccs.initialize -ccs.productDiscoveryPath.

    It will be great to understand where the initialisation is actually being stored, so we can determine that the build will be starting from a clean known starting point on our build server.

    Regarding the version of CCS, for Theia it looks like 1.5.1.3 is the latest, and thought version 20 is the Eclipse version.

    However it looks like 20.0.1 is also based on Theia . . . so which one does TI recommend we use? 

    Many thanks,

    Chris

  • however it is not clear which workspace is being used, as the one specified on the command line remains empty

    Are you using the below option to copy the project into the specified workspace?

    -ccs.copyIntoWorkspace

    If not, then the project folder would remain in the original location.

    That is using the command and option: -application com.ti.ccs.initialize -ccs.productDiscoveryPath.

    I believe this information is cached in a different location than the workspace. Either: C:\Users\<user>\AppData\Local\Texas Instruments\CCS\< CCS version> or somewhere inside the CCS installation folder.

    Regarding the version of CCS, for Theia it looks like 1.5.1.3 is the latest, and thought version 20 is the Eclipse version.

    However it looks like 20.0.1 is also based on Theia . . . so which one does TI recommend we use? 

    Please see the last FAQ on this page:

    https://software-dl.ti.com/ccs/esd/CCSv20/

    Thanks

    ki

  • Thank-you for the link Ki, that does clear up quite a lot, especially which version we should be using.

    Regarding the workspaces though, it still seems to be broken.

    I cannot get any command line tool to use the workspace directory I have defined, the tools IDE and command line always use C:\Users\<UserName>\AppData\Local\Texas Instruments\CCS\.ccs-server\workspaces.

    Also any import of information into a workspace, such as product location is added to the single file C:\ti\ccs2001\ccs\eclipse\configuration\ccs.properties. If we have multiple products requiring a different setup, this just does not work, as the tool will pick up the first in the list.

    The option 

    -ccs.copyIntoWorkspace

    does not copy the project into the specified workspace, in fact, worryingly I do not know where it copies the files.

    I currently fail to understand how we can reliably get a clean command line build working, without using different tools.

    Do you have a more detailed example of a working command line build please?

    Is it a case that we have to delete everything under .ccs-server prior to attempting a clean build on our build server and accept that whatever we specify as the workspace directory is ignored?

  • Hi Ki,

    If I delete the contents of [USER HOME]\AppData\Local\Texas Instruments\CCS\.ccs-server, and the contents of C:\ti\ccs2001\ccs\eclipse\configuration\ccs.properties and then use the following in a pre build step:

    ccs-server-cli -noSplash -workspace %RepositoryRoot% -application com.ti.ccs.initialize -ccs.toolDiscoveryPath %GCC_ARM_12_2_1_DIR% -ccs.productDiscoveryPath %SDKPath%

    I can call that from a configuration for every build which results in a clean environment.

    It feels like a bit of a work around, but it works and happy that the locations are correct from the build output.

    Regarding what I mentioned earlier about the workspace directory being ignored, it is not, it is populated as a reference in the cached data under .ccs-server within the corresponding workspace metadata.

    I think this is going to work, and would just appreciate your feedback.

    Kind regards,

    Chris

  • I can call that from a configuration for every build which results in a clean environment.

    For a clean IDE environment, yes clearing that would clean out the workspace. For a completely clean CCS environment, see:

    https://software-dl.ti.com/ccs/esd/documents/users_guide_ccs/ccs_faqs.html#i-want-to-restart-code-composer-studio-with-a-fresh-environment-how-do-i-do-this

    Regarding what I mentioned earlier about the workspace directory being ignored, it is not, it is populated as a reference in the cached data under .ccs-server within the corresponding workspace metadata.

    Without the "-ccs.copyIntoWorkspace" argument, then the workspace would just have a reference to the project location and that reference would be in the cached data as you mentioned.