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.

Problem when copying motorware project from one pc to another

Other Parts Discussed in Thread: MOTORWARE

Hi, 

I've copied a motorware project that I've been working on for a long time from one pc to another, but when I try to build I get the error message fatal  error #1965: cannot open source file "user.h"

I'm guessing the problem is related to file paths or workspace location but I'd like some guidance on the correct steps to correct the problem.

On the original pc the Linked Resources show PARENT_LOC     at  C:\Users\Geoff\workspace_v6.0,    PROJECT_LOC at c:\ti\motorware\motorware_1_01_00_12_jwcamera\solutions\........., and    WORKSPACE_LOC at C:\Users\Geoff\workspace_v6.0

On the new pc the Linked Resources show PARENT_LOC at C:\Users\Geoff\workspace_v5.3,   PROJECT_LOC at C:\Users\Geoff\workspace_v5.3\proj_lab13b_test,   and    WORKSPACE_LOC at C:\Users\Geoff\workspace_v5.3

it also has another entry ORIGINAL_PROJECT_ROOT at c:\ti\motorware\motorware_1_01_00_12_jwcamera\solutions\.........


Clearly these are different, so is this the problem and what do I need to change ? Is there any problem using a 6.0 project in 5.3 ?

Thanks,

Geoff

 

  • Hi Geoff,

    Check this thread: e2e.ti.com/.../314410

    Regards,
    Gautam
  • GEOFF JACKSON said:
    I've copied a motorware project that I've been working on for a long time from one pc to another, but when I try to build I get the error message fatal  error #1965: cannot open source file "user.h"

    For a project to be truly portable, it is ideal to not have any relative paths that may be affected when the root of the project changes. Taking a look at the Motorware example projects (proj_labxxx), I see that one of the compiler include paths is "${PROJECT_ROOT}/../../../src". This is the path to the "user.h" header file. As you can see, it is specified relative to PROJECT_ROOT.  You can get to this option by going to Project Properties->Build->Compiler->Include Options.

    When you import the project into CCS, if you leave the project in its original project, (ie) do not tell it to "copy to workspace", then PROJECT_ROOT will be the original project path and the path to user.h will resolve correctly. However, if you tell it to "copy to workspace" (same as copying the project to another location), then the PROJECT_ROOT now becomes the location, hence the relative path to user.h is no longer resolved properly. 

    You can fix your build error by adding a compiler include path to the directory wherever user.h is located on your PC.

    GEOFF JACKSON said:
    Is there any problem using a 6.0 project in 5.3 ?

    In general, CCS projects are not backward compatible. So a project created with CCSv6 is not guaranteed to work in CCSv5. For Motorware though, I see that their example projects are for CCSv5, so you may be ok starting with those, but in terms of moving between versions, it is generally ok to move up versions of CCS but not down. 

  • Thanks for the advice Aarti.

    I feel a bit stupid because all I needed to do was import it as a new project and everything was sorted out automatically.

    As you recommended, I didn't use the option to import into the workspace. The program seems to work fine in CCS 5.3 as well.

    Geoff