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.

Managing Linked resources without saving absolute file paths in a file under revision control

I apologize for the loaded title, maybe the question is best asked through an example. What is the preferred method for accomplishing the following scenario:

  • Several projects exist that share several modules but are different enough to warrant separate source repositories. 
  • The shared modules exist as a separate repository that can be cloned anywhere on a developers filesystem (Lets call it the SDK).
  • Two developers are working on the same project (Lets say an MSP430 project in CCS) and have a copy of the SDK located in two different places on their computers.
  • They must configured a path variable that points to the location of SDK (Which is linked into the project).

How is this accomplished without inserting conflicting paths into the .project file?

I initially created a Windows environment variable that pointed to the SDK. After attempting to link a folder based on the environment variable, I discovered this doesn't appear possible with Eclipse as a path variable must be created that is essentially a copy of the environment variable (Thus defeating the purpose of an environment variable and also inserting absolute paths into the .project file).

This seems like a problem that crops up all of the time, so I must be missing something simple.

Thanks,

  • Hello Sheldon,

    • They must configured a path variable that points to the location of SDK (Which is linked into the project).

    How is this accomplished without inserting conflicting paths into the .project file?

    Note that you can set path variables at both the project and workspace level. If you set it at the workspace level, then you should not need to modify the project.

    Please see slide 22 of the below presentation for more details:

    https://software-dl.ti.com/ccs/esd/training/modules/portable_projects/sdoapps_mod_generic_ccsv6_portable-projects.pptx

    Thanks

    ki

  • This resolved my issue. Just to expand on your response on how to use workspace variables:

    • CCS -> Windows -> Preferences -> CCS -> Build -> Variables -> Add
    • Create a variable of type Directory
    • Right Click Project -> CCS Build -> MSP430 Compiler -> Include Options -> Add  (From Variable)
    • Right Click Project -> New -> Folder -> Advanced -> Link to alternate location (Linked Folder) -> Variables

    Note: I wasn't able to reference my Windows Environment variable when creating the workspace variable. Fortunately it was a moot point because the Environment variable was no longer needed.