Creating copy of example project
From Texas Instruments Embedded Processors Wiki
Contents |
Introduction
TI provides many example CCS projects as part of their software offering. For example, the ControlSUITE software infrastructure for C2000 devices and Stellarisware for Stellaris devices include several example projects to jump-start the development process. Many users want to make copies of example projects provided by TI into a separate directory so they can make changes to it without fear of corrupting the original example. This article describes how this can be done for CCSv4 projects.
ControlSuite examples (C2000)
There are a couple of ways of creating copies of CCS4 example projects:
Make a copy of project level folder and edit project files
Use procedure described here: http://processors.wiki.ti.com/index.php/C28x_Creating_a_New_Project_from_an_Old_Project_in_CCS_4
Caveat: Even though this makes a copy of the project folder (and with it the main source files found within that folder), the common device source files (typically found in C:\ti\controlSUITE\device_support\f2833x\v132\DSP2833x_common\source) are still “linked” from their original location, so any changes made to these files will modify it in their original location.
Advantage: You can open both the original and copied project in the same CCS workspace (since they have different names) for quick comparison.
Make a copy of root level folder
This is the simplest and safest way to make a working copy but does use more disk space.
- Make a copy of the root folder for the device you are working with. For example, assuming ControlSuite is installed in c:\ti, and you are working with the examples for F2833x from the folder C:\ti\controlSUITE\device_support\f2833x\v132, make a copy of the v132 folder at that same level (for example, C:\ti\controlSUITE\device_support\f2833x\v132_copy).
Tip: To determine which root level to make a copy of, go into the project folder, open the file macros.ini and find the root level that the macro there resolves to. For example, the macros.ini within C:\ti\controlSUITE\device_support\f2833x\v132\DSP2833x_examples_ccsv4\adc_soc sets INSTALLROOT_2833X_V132 = ../../, which sets the root to C:\ti\controlSUITE\device_support\f2833x\v132, so you would make a copy of v132 folder.
- Open a new CCS workspace and import the desired projects into the new workspace from the copied folder (C:\ti\controlSUITE\device_support\f2833x\v132_copy).
To avoid confusion, keep two different CCS workspaces, one for working with out-of-box ControlSuite examples, and another for your working projects. This way, within a given workspace, you will always be importing projects from the same location.
Stellarisware examples (Stellaris)
Stellarisware examples have similar constraints in that they refer to sources and link in libraries from several other directories within the Stellarisware tree.
The same two methods described above can be applied to create copies of Stellarisware examples as well.
Make a copy of project level folder and edit project files
- Follow the same procedure as described in this wiki article to make a copy of a project: http://processors.wiki.ti.com/index.php/C28x_Creating_a_New_Project_from_an_Old_Project_in_CCS_4
For eg, assuming Stellarisware is installed in c:\Stellarisware, to make a copy of blinky project for ek-lm3s9b92, go to folder C:\StellarisWare\boards\ek-lm3s9b92 and make a copy of folder blinky to myblinky at that same level.
- Modify the .project and .cdtbuild files within C:\StellarisWare\boards\ek-lm3s9b92\myblinky\ccs as described in the wiki article above.
- In the step "Edit the .project file", in addition to editing the <name> field, also modify the <locationURI> under <linkedResources> to point to the file in the copied location instead of the original location as shown in the example:
<linkedResources> <link> <name>blinky.c</name> <type>1</type> <locationURI>SW_ROOT/boards/ek-lm3s9b92/myblinky/blinky.c</locationURI> </link> <link> <name>startup_ccs.c</name> <type>1</type> <locationURI>SW_ROOT/boards/ ek-lm3s9b92/myblinky/startup_ccs.c</locationURI> </link> <link> <name>blinky_ccs.cmd</name> <type>1</type> <locationURI>SW_ROOT/boards/ ek-lm3s9b92/myblinky/blinky_ccs.cmd</locationURI> </link> </linkedResources>
Make a copy of root level folder
This is the simplest and safest way to make a working copy but does use more disk space.
- Make copy of root Stellarisware folder, eg: c:\Stellarisware to c:\Stellarisware_copy
- Open a new CCS workspace and import the desired projects into the new workspace from the copied folder (C:\Stellarisware_copy). Modify and customize the project as needed.
- As suggested earlier, keep two different CCS workspaces, one for working with out-of-box Stellarisware examples, and another for your working projects. This way, within a given workspace, you will always be importing projects from the same location.
