C28x Creating a New Project from an Old Project in CCS 4

From Texas Instruments Wiki
Jump to: navigation, search

Introduction

Example projects are supplied as part of the C/C++ header files and peripheral examples for C2000 devices. Often you may want to simply copy one of these projects and modify it for your own use. This wiki article shows how this can quickly be done for CCS 4 projects.

Copy an existing project

Select the project you would like to start with. In this example the project is the cpu_timer example.


Copy001.jpg

Right click on the project name and select copy (or ctrl-C). Then paste the new project so that it is at the same directory level as the original project. In the example shown, both projects will be under DSP2803x_examples_ccs4. Since the directory level is the same, all links to files in other directories will work properly.


Copy004.jpg


After the paste, there is now a copy of the project:


Copy002.jpg

Rename the project

Right click on the new project and select rename. Type in the name of the new project. In the example shown "my_project" is the new project name.

Edit the .project file

Open the .project file and edit the <name> field with the new project name.


Example: .project file before the modification:


<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>Example_2803xCpuTimer</name>
	<comment></comment>
....


Exmaple: .project after modification. Example_2803xCpuTimer was changed to my_example.


<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>my_project</name>
	<comment></comment>
....

.cdtbuild File

Edit the .cdtbuild file.

  • In this file do a search/replace of the old directory name with the new directory. In this case search for "cpu_timer" and replac it with "my_project".
  • Optional: Change the name of the .map and .out file. In this case these names were originally taken from the C file that contains main(): Example_2803xCpuTimer.c. There are three options (that I know of)
  • Do nothing. Use the old .c file name and the old .map and .out file names.
  • Change the name of the .c file and do a search/replace to match in the .cdtbuild file
  • or Leave the C file named as it is, import the project. In the linker section of the build options, specify a new .out file and map file name.


essay writing help