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.

Copying a project in CCSv6 - how to do it correctly?

Other Parts Discussed in Thread: MOTORWARE

Hi Folks,


I've looked at: http://processors.wiki.ti.com/index.php/Projects_and_Build_Handbook_for_CCS#Copying_Projects but this isn't very clear on how (or what) needs to be changed to allow copying one of the projects into a new directory.  I'd like to copy over LAB10a to another directory before changing files.


Has anybody successfully done this? What are steps to do it?  What needs to be changed in the Properties screen?

Thanks in advance.


Richard C

  • Hello Richard,

    I just copied a project using the steps described at that web page and everything went ok.

    What exactly wasn't clear?

    In some cases, it may be necessary to make a copy of a project so you can make changes to the copied version rather than the original. To make a copy of a project that is open in the Project Explorer view:

    Right click on the Project and select Copy
    Right click in the Project Explorer view and select Paste
    In the Copy Project dialog
    give the new project a different name, and
    use the default location or specify a different location

    Stephen

  • Hi Stephen,


    That's a loaded question when you ask what wasn't clear.  I've been using the InstaSpin example projects and have been somewhat successful in using them,  I'm to the point where I want to copy the project to a new location - one that gets backed-up automatically.  The problem is that LAB10a has a multitude of files that are required to compile the project.

    I've tried to do the copy and paste routine but CCS complains that it can't find a bunch of files. Specifically all of the header files.

    I'm just really frustrated as this whole arrangement isn't very user friendly and when CCS pops up an error message it doesn't give any solutions.  I think TI needs to realize that some of the people who are trying to use their software - and are trying to be customers of their parts - aren't full time software people.  I can see if you live and breath CCS for 40 hours a week you will probably get comfortable with the intricacies of the thing but for the rest of us it's a very long up hill battle.

    It shouldn't be that hard for TI to write up an easily understood post on how a "normal" person should handle modifying one of their projects.  I feel that it's good practice to leave the example projects and source as is and to make a working copy to do testing on.

    I'll keep trying.  I have to get it to work.

    Thanks,

    Richard C

  • Hello Richard,

    After re-reading my response, I realized the wording "What wasn't exactly clear" sounds rude, is rude and not particularly helpful.

    Where are the header files in the original project? It strange that it can't find them.

    Stephen

  • Hi Stephen,

    No worries. I didn't take is as rude.

    For example - the ADC.C file has the following include:
    #include "sw/drivers/adc/src/32b/f28x/f2802x/adc.h". The directory is located at D:\ti\motorware\motorware_1_01_00_14\

    I'd like to be able to copy all of the files to another location so I can edit files but still leave the original files intact. I can't seem to figure out how to change CCS to allow me to do that.

    Thanks,

    Richard
  • How about creating a workspace in the location where you want your project.  Then, import the project (File->Import) into the workspace.  To do so, you'll have to select the copy option when you import (i.e. select "Copy projects into workspace" in the Import CCS Eclipse Projects dialog box)

  • Richard Cooke said:
    For example - the ADC.C file has the following include:
    #include "sw/drivers/adc/src/32b/f28x/f2802x/adc.h". The directory is located at D:\ti\motorware\motorware_1_01_00_14\

    I'd like to be able to copy all of the files to another location so I can edit files but still leave the original files intact. I can't seem to figure out how to change CCS to allow me to do that.

    Richard,

    Portability of CCS projects is highly dependent on how the original project is created. As you noted, in Motorware source files, the header files are #included using a path relative to a variable that is set to point to the root Motorware directory (in your case D:\ti\motorware\motorware_1_01_00_14\). The variable is named MW_INSTALL_DIR and is added to the compiler's include path options so that the compiler can find the header file.

    If you choose to copy all source and header files to another location, you would need to either
    (1) maintain the same directory structure or
    (2) modify either how the #include is specified in the .c file or modify the compiler's include path options to ensure a successful build 

    The easier solution in this case would be to make a copy of the entire "sw" folder within Motorware (along with all sub-directories) so the sub-directory structure is maintained. The downside is that it will take up more disk space. 

  • Hi Folks,

    Thanks for all of the suggestions.

    I did finally manage to get it sorted out by:
    1 - copying the project (and re-naming it) to a new sub-directory in the workspace
    2 - opened the files that I'm actually going to modify (hal.c, hal.h, user.h, lab10a.c) and saved them to the new sub-directory
    3 - deleted them from the original location in the project. NOT from the disk.
    4 - Added include path to moved files by right clicking on the project name - Properties/Build/C2000 Compiler/Include Options
    5 - Edited #include lines in .C files

    I'm pretty sure I've got that correct since I was able to connect to the 27F LaunchPad and the original project ran fine. But if someone sees a mistake in my procedure please let me know.

    Richard C