Creating A New C Project With Code Composer Studio 4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Creating a New C Project with Code Composer Studio (CCS) Version 4

DSP SOFTWARE SYSTEM


Author: Syed Jawad Hussain

Introduction
The purpose of this document is to enable a student to quickly create a project under CCS for compiling assembling, and linking an C file. To complete this tutorial you will need two additional files: test.c and dsk6713.cmd , after obtaining them from our class web page, copy them into a directory called c:\xxxxx . Test.c is an elementary C file that shows you how to use printf statement and it contains a incremental counter dsk6713.cmd is a linker command file that is required to set the proper addresses for each code section and to instruct the linker how to build the final machine code output. This linker command file is an adaptation of Texas Instruments linker command file.

Procedure
1. This tutorial assumes that you already have Code Composer Studio installed and have set your workspace directory location on your hard disk. 2. Open CCS and create a new project via the following commands: File New CCS Project

Type in your Project Name. i.e. test Next, check the box Use default location to place the project in same location where your workspace folder is. 3. Select your Project Type: C6000 and press Next.

4. Skip through the Additional Project Settings window by pressing Next again.

5. Select Generic C67xx Device and point to Linker Command File: dskc6713.cmd and then point to Runtime Support Library rts6700.lib

Now press Finish.

6. We now have created the project dependencies (libraries to be used for linking and memory map for the machine code output) and will now create the actual C file. To create a new ASM file press: File New File and type in the new file name (test.c in this case) and then press the + inside the test directory or select the test directory by clicking on it and then press Finish. Note: Make sure to write the .c extension following your file name. Failure to do this will generate an error when trying to compile your code. If you type the .cextension correctly, a line number 1 will appear next to the cursor in the new file (window) you have just created.

7. You should now see the following created project. Note the included files in the left most window. Add csl6713.lib file into your project . We are now almost ready to compile the code but must create a target configuration file to tell CCS what emulator/programmer/simulator you will be using to download the code.

8. Create a new Target Configuration File by pressing Target New Target Configuration. The target configuration file will identify the type of emulator/simulator CCS will use for programming and simulating the DSP board. In our case the simulator is actually our lab board DSK6713. Type in a filename test to match the project name. Next, uncheck the Use shared location box and then press Browse to select the current project location. If the current project location shows up in the Location: field (i.e. /test), you can leave Use shared location checked and just press Finish. We want to make sure we add the target configuration file to our current project files.

Click Finish after the location and filename have been set. A new window should now appear that is titled test.ccxml. This is the preliminary target configuration window where parameters must be set to select our simulator/emulator/programmer that corresponds to the one our lab board.

9. In the target configuration window select Texas Instruments Simulator in the Connection pulldown. Next check the c6713 Device Cycle Accurate Simulator,Little Endian device in the Device scrollbar area. See the correct settings below.

Save this file in the project. You can now close it since no future modifications will be made to it when you are writing new code or debugging machine code. 10. Finally we are ready to build (assemble & link) the project. Press Project Build Active Project or simply press the icon on the toolbar (recommended to save time since you will do this several thousand times in this class) that corresponds to Build Active Project nearby the printer (print) icon. You should see zero errors and warnings when you build the project containing test.c and you should also see that a machine code output file is generated called test.out (see Finished building target: test.out in the console window).

You might also like