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/LAUNCHXL-CC2640R2: working simultaneously on Linux and Windows

Part Number: LAUNCHXL-CC2640R2


Tool/software: Code Composer Studio

Hi there,

I'm wondering if there is an easy way to work in the same project both on Windows and Linux. The workspace and project path it is (more or less) the same for both operating systems (it is a dropbox folder) but the CCS v8 and simplelink-sdk installation folder aren't (in Windows is C.\ti\... and in Linux is /hom/me/ti).

At this moment the project has been created on Windows, and paths for includes and libraries are added in the way of c./ti.

I can open the project on Linux, but when I tried to compile I get the error: main.d:4: *** target pattern contains no '%'.  Stop.

Even if add to include and libraries path the right path on linux (in linux style) I get the error again. Moreover, If I remove Windows-style path and leave only Linux-style, I get the error again.

Thanks in advance,

Toni.

  • Antonio Marti said:
    At this moment the project has been created on Windows, and paths for includes and libraries are added in the way of c./ti.

    Ideally to keep projects portable across operating system, you want to avoid hard-coded paths that are OS specific such as c:\ti. Instead, the preferred method is to use paths relative to variables. There are several predefined variables available in CCS that you can use when referencing paths. For example, if you go into Project Properties->Build->Variables tab, and click on Show system variables, you can see the list of build variables supported by the project. Most of these variables will be automatically set based on the tools install locations on that specific host OS. If you ensure that include and library paths are set relative to these variables instead of using hard-coded paths, then the project should be easily ported from one OS to another.

    In addition to avoiding absolute paths, a couple of other things to keep in mind for portability across OS:

    • Use forward slashes in all settings and options
    • Avoid upper/lowercase characters in file names, as Windows does not differentiate between them but Linux does

  • Thanks AartiG for your help.

    I didn't carry out a lot of tests, but it seems that if the project is created in Linux (following your indications) I can move from Linux to Windows and then back to Linux with no problems. However, if the project is created in Windows it is not possible to use it in Linux. May be I did some mistake in Windows project, but your answer is useful for me.

    Regards.