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 Portable Projects using project_loc

Hi,

While using CCS I've ran into path issues for include files. Although originally I used Environment Variables to solve this, the issue is that the environment variable is relative.

http://processors.wiki.ti.com/index.php/Portable_Projects

This means that I have to add every combination possible to the includes to ensure all header files are found.

I recently stumbled upon project_loc, which allows me to create a path that is relative to the project's location on compile time. For example:

"${project_loc}:/../DemoCode"

 

My question is, are there any unexpected issues with this? Why has this not been used in the tutorials since it seems to simplify the includes significantly?

 

Regards,
Gustavo

  • Hello Gustavo,

    project_loc is fine to use inside your project for things link include search paths. The wiki topic is more for using variables for your linked source files and you cannot use project_loc for that since it is not a linked resource path variable.

    Thanks

    ki

  • Ki,

    Thank you very much for the response (and kudos for responding on a Sunday evening of all days). Are there any issues with portability using project_loc? I have to ensure that anywhere the project is placed it will work.

    Regards,
    Gustavo

  • There should be no issues. It will always point to the location the project folder which contains the project files.

    It is pretty much the same as $(Proj_dir) from the CCS 3.3 world.

    Note that in CCSv5, project_loc has been deprecated in favor of ProjDirPath. ProjDirPath is also supported in v4 so I suggest using that so you don't hit any migration issues when going from v4 to v5.

    Thanks

    ki