You are on page 1of 7

Creation of new project (for C2000 piccolo) in CCS (Code Composer Studio):

Install CCS (Code composer studio) and Control Suite. 1. Create a project folder, for example test_1.

2. Now create another subfolder, for example test into test_1.

3. Start CCS Project New CCS Project Project Name: test Output type: Executable Location: Define location/Path for project so that it is created into that folder i.e. test_1. In above case it is D:\Projects\test_1\test Family: C2000 Variant: 2802X piccolo F2802XX. Connection: Texas instruments XDS100V1 USB Emulator

4. Now go to C ti ControlSuite device_support v129. Path: C:\ti\controlSUITE\device_support\f2802x\v129

F2802X

There are two folders a. DSP2802X_Common b. DSP2802X_headers

5. Copy these folders into project main folder i.e. test_1.

6. Again go to CCS open project test Create all required .c files, .h files for project 7. Now select project right click add files Here we have to add two linker command files (.cmd) which are as follows: a. DSP2802X_headers cmd DSP2802X_Headers_nonBIOS.cmd b. DSP2802X_common cmd 1. 280200_RAM_lnk.cmd (used for program loading into RAM) 2. F280200.cmd (used for program loading into Flash)

8. Inclusion of paths required: Now select project right click Properties C2000 compiler Include options Include two relative paths using relative addressing as follows: 1. ..\..\DSP2802X_headers\include 2. ..\..\DSP2802X_common\include 3. Include other paths if application requires another library for example: IQ math library Note: ..\ indicates that folder exists before the destination folder.

9. Now build project test and if there is no any error then project is ready, by using debug option we can download the project into controller.

Create user defined (custom) data section in RAM: If we want to define particular RAM section for some variables then create a data section using linker command file.

1. Suppose we defined some global variables in .c file: unsigned int test1 = 5; unsigned char test2 = 2; int test3 = 6; unsigned char test_arr[10] ; 2. Now create a data section using #pragma directive in .c file : #pragma DATA_SECTION (test1, FixLoc1) #pragma DATA_SECTION (test2, FixLoc2) #pragma DATA_SECTION (test3, FixLoc3) #pragma DATA_SECTION (test_arr, FixLoc4) 3. Now allocate memory in .cmd file : MEMORY { PAGE 1: L1 L2 L3 L4 } : origin = 0x000601, length = 0x0000001 : origin = 0x000602, length = 0x0000001 : origin = 0x000603, length = 0x0000001 : origin = 0x000604, length = 0x000000A

SECTIONS { FixLoc1 FixLoc2 FixLoc3 FixLoc4 } 4. Now save the program and rebuild it then in .map file we see that all variables are located at their desired locations. :> L1 :> L2 :> L3 :> L4 PAGE =1 PAGE =1 PAGE =1 PAGE =1

You might also like