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: Defect in Code Composer - Workspace and Custom project files not maintained properly for MotorWare projects

Other Parts Discussed in Thread: MOTORWARE, CODECOMPOSER

Tool/software: Code Composer Studio

Please take the following under serious advisement to fix Code Composer so it is more compatible with backing up and project versioning with Git:

1. I suggest creating a folder in C:\ti for your custom projects code based on your preference. Lets say MyName for this discussion

2. Create a Code Composer Workspace folder in that MyName folder to work in

3. Also create folders "C:ti\MyName\inc" and "C:\ti\MyName\src".  Custom C files go into the src folder and h files in the inc folder.

4. Your modified User.h from Motorware can go into "C:\ti\MyName\inc" so you can keep the motorware one as original and not use it.  Then you have the option of using user.h in your real project(s) later and keeping it under version control without trying to put Motorware or C2000 code into Git.  For the TI source code not included in Git, all you have to do is keep a pristine copy of the install files for the version your code will work with.  Any modifications to it should not be counted on.

5. You can then have C:\ti\MyName under git version control without adding all the Motorware source files

6. For builds to work, you need to right click each lab project and find the Include Options (like under C2000 Compiler) and select it.  Then add C:\ti\MyName\inc to the top of the list so it loads your user.h instead of motorware's when compiling a lab.

7. Note that modifications to Lab C code wont be saved in the Git repository but you should make any serious changes in a C file in C:\ti\MyName\src

PROBLEM that needs fixing in CodeComposer:  The Include Options is stored in the wrong place for the labs so it wont be backed up by Git.  If I restore the MyName directory on another computer that I have installed CodeComposer on, the C:\ti\MyName\inc is missing from the project properties and have to be re-added.  Obviously this setting was not saved in the c:\ti\MyName\Workspace8 like it should have been.  This is strange because if you create a new project from scratch, that is exactly where the new project ends up.

Note that it makes no sense to have your workspace under your My Documents folder if you want to share your Workspace with other login accounts.

  • Hello David,

    put your MyName under git control.

  • I already said that putting MyName under git control is what I am suggesting and doing.  That isn't the problem.  The problem is where CodeComposer puts some of the MotorWare build configuration files when you import a MotorWare project. Even though the projects travel when you restore them to a new computer, you have to setup your Include path in the properties again and remove and re-add any custom C files in the project.

  • My understanding was that you kept workspace under MyName.

    You need to keep workspace under git control. 

  • David Larson said:
    PROBLEM that needs fixing in CodeComposer:  The Include Options is stored in the wrong place for the labs so it wont be backed up by Git.  If I restore the MyName directory on another computer that I have installed CodeComposer on, the C:\ti\MyName\inc is missing from the project properties and have to be re-added.  Obviously this setting was not saved in the c:\ti\MyName\Workspace8 like it should have been.  This is strange because if you create a new project from scratch, that is exactly where the new project ends up.

    The project build properties (such as the include search paths) are stored in the project metadata file (specifically .cproject) which resides in the project folder. It is not stored in the workspace folder. 

    David Larson said:
    Note that it makes no sense to have your workspace under your My Documents folder if you want to share your Workspace with other login accounts.

    Eclipse defaults to that location and we do not deviate from it. But you can always choose another location. Workspaces are actually not designed to be shared. It is intended that each user has their own personal workspace folder. That is why the default workspace location is inside the User folder. Projects are meant to be shared (and checked into version control) but not workspaces

    Thanks

    ki

  • Ki-Soo Lee said:
    The project build properties (such as the include search paths) are stored in the project metadata file (specifically .cproject) which resides in the project folder. It is not stored in the workspace folder. 

    I should clarify that it is not stored in the workspace folder unless the project is copied into the workspace folder on import. Then the metadata files should be inside the project folder within the workspace folder.