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 projects in Windows and Linux without importing

Can a project be used as is on both Linux and Windows without importing?

I notice that in .cproject, there are a few variables that have absolute paths like:

<stringMacro name="NEW_CCS_INSTALL_ROOT" type="VALUE_PATH_DIR" value="C:\TI\ccsv4"/>

, which is odd since I'm running ccs 6.  The project which was created on Windows using CCS4 produces the build error on Linux:

Cannot run program "C:\TI\ccsv4/utils/gmake/gmake": Unknown reason

The "Path Variables" CCS_BASE_ROOT,  CCS_INSTALL_ROOT, etc. in the project properties on Linux look correct, but something is getting mixed at build time.

Ideally the project would not have to be imported with separate project files, and I could just check out from version control and build on either platform.  In the past I've had to hand edited paths and slashes which is not ideal.

Thanks.

  • Moving this to the CCS forum by request of Starterware team.

  • John F. said:
    Can a project be used as is on both Linux and Windows without importing?

    A project always has to be "imported" into CCS before it can be used. Having said that though, what you are asking is if the same project files can be imported into both Windows and Linux without having to make changes. This is possible, as long as the project has been created to be portable and OS-agnostic. 

    This may not be a comprehensive list, but these are some factors to take into consideration when creating the project:
    - ensure the project is portable with no absolute paths. Use relative paths with variables instead. See this wiki for more information on portable projects.
    http://processors.wiki.ti.com/index.php/Portable_Projects#Portable_Projects_in_CCSv6

    - If creating new variables, try setting their paths relative to Eclipse variables that automatically get set to the correct path.

    - Make sure to use forward slashes in all settings and options

    - Avoid mixing upper/lowercase characters in filenames, as Windows does not differentiate between them but Linux does.

  • Hi ArtiG

    I have created projects with relative paths and am able to save in source control and then import by both Linux and Windows users

    I found that I needed a to do some pre-linking work and so I wrote a shell  script that is a wrapper.  In windows I changed my  linker command from 

    "${CG_TOOL_CL}"

     to 

    ${CCS_UTILS_DIR}/cygwin/sh "${PROJECT_LOC}/../../../TI_CommonFW/tools/linkerwrapper.sh" "${CG_TOOL_CL}"

    so I'm using the bourne/posix shell that you have in the ccs6 windows installation, minimizing the need for any additional installation steps

    This path is not needed (non existent) in linux and there i an "sh" in the env so I wonder how do I create a variable whose contents are conditional on the platform (like ${CG_CLEAN_CMD})

    Thanks