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.

Exactly controlling source (etc) files in CCS4 project

I have an issue with CCS4.

When I import an existing CCS4 project into a workspace, it automatically includes all(?) source and control files (such as .cmd) into the build.  It seems to do this recursively, so that such files in sub-folders are also included.  This is a pain for me as I have files for other builds (such as different .cmd files for legacy CCS3 builds), and redundant source files in my directory structure, and I have to go through an explicitly exclude them from the build.

Typically our projects are shared and configuration managed via GIT.  So we are regularly checking out new revisions and importing them, so this issue comes up regularly.

Is there an option or preference to stop this auto including?  I'd rather that only the files that I have explicitly included are included in the build?

BR

Paul Bray

 

 

 

  • Hi Paul,

    This is expected behavior as all content in the project folder is considered part of the project. You will have to explicitly exclude files like you mentioned. Otherwise you will need to create a new project in a separate folder and link the files you want to the project.

    Thanks

    ki

  • Thanks for the prompt answer, shame it is not the answer I wanted.

     

    I'll have a think about creating a project in a separate folder.  That might introduce complications with our CM tool, unless the "project" folder can be a sub-folder of the "old" project folder. In essence we need to have all of the files and folders that we want CM'ed in or below one folder.

     

    BR

    Paul

     

     

  • Paul Bray said:
    unless the "project" folder can be a sub-folder of the "old" project folder.

    That is indeed supported.

    ki

  • Ki-Soo Lee said:
    Otherwise you will need to create a new project in a separate folder and link the files you want to the project

    Created such a project with links to the source and cmd files etc that are required.  Looks nice and tidy on my machine, but when I share it will a colleague the build fails as the source files cannot be located.  It seems that the link is in terms of an absolute path.  My colleague did not use the same path above the project root. e.g.. on my machine I have

           c:\"my user name"\ccs4 projects\project_1

    while my colleague, on his machine, has

           c:\"colleague's user name"\dsp_projects\project_1

    Is there any way to specify a relative path, or to use "macros" in the path?  Or are we forced to use the same location on every machine that needs to share this project??

     

    BR

     

    Paul

  • >
    > Is there any way to specify a relative path, or to use
    > "macros" in the path?
    >
    Look at http://processors.wiki.ti.com/index.php/Portable_Projects_in_CCSv4_for_C2000

  • Gary Lynch said:

     

    Thanks Gary, that looks very useful. 

    Fingers crossed that it isn't limited to the C2000, I'll report back when I tried it for the C64x.

     

    BR

     

    Paul

  • Paul Bray said:
    I'll report back when I tried it for the C64x.

    I have now performed a quick trial using C64x with V 4.1.3.00038, most of it seems to work as the wiki page indicates.

            1) I can define relative path macro in Macros.ini, that gets loaded and resolved to an "defined path variable" with an absolute path when I open the workspace containing the project

            2) I can use "Method 2" to link a file to the project so that it references the macro, and this is reported in "properties" of the linked file and when I inspect .project.

    However I cannot get "Method 1" to work, the link shows the full absolute path name., and linked files in locations that contain the "defined path variable" still seem to use the absolute path rather than the macro.  I was expecting part of the absolute path to be replaced by the macro. But perhaps I misunderstood this part.

    However I think that 1 and 2 above will enable me to do what I need to do.

    Thanks again Gary

    BR

    Paul

     

     

  • Paul Bray said:
    However I cannot get "Method 1" to work, the link shows the full absolute path name., and linked files in locations that contain the "defined path variable" still seem to use the absolute path rather than the macro.  I was expecting part of the absolute path to be replaced by the macro. But perhaps I misunderstood this part.

    Importing a project with a macros.ini file will have CCS add whatever definitions are in the macro.ini file to the Linker Resources variables list. While the macros.ini file can have a relative path, it will be expanded to an absolute path when added to the Linked Resources variables list. It will not change any paths for existing linked files from an absolute path to the macro however. You must do it either when you create a new link using the GUI, or you can edit the .project file (easier when dealing with multiple files).

    Thanks,

    ki

  • Thanks Ki,

     

    I had misunderstood :)  My eyes had skipped over the bullet point that described editing the .project file.  Thanks for the pointer.

    I have now tested the method with a more representative project and it seems to work very  well. 

    BR

    Paul