Getting started with CCS

Laurier Boulianne September 21, 2006


Setting up CCS

This section states how to set up the program to use the C6713 board correctly. Usually, you will only need to set this up once. 1 Before even starting Code Composer Studio, you have to make sure that it is configured for the right board. That is why you need to run the setup program. The CCsetup icon should be on your desktop, double click on it. 2 When you open the program, a window called Import Configuration should pop up. If not, open it using the File → Import menu. Press the Clear button to remove any previous configurations. 3 Now, select the ”C6713 DSK” configuration and click the Import button. Save and Quit, and start CCS. 4 In CCS, there is a few options that are not set by default that you might want to activate. Select the Option → Customize menu. In the Debug Properties tab, you can select the ”Perform Go Main automatically” box and deselect the ”Open the Disassembly Window automatically” box. In the Program Load Options tab, you can select the ”Load Program After Build” and ”Clear All Breakpoints When Loading New Programs”. 5 One last step before starting up your project, make sure that the Text-Based Linker is selected. You can access the Linker Configuration window with the Tools → Linker Configuration menu.


Creating your project

1 Create a new project by selecting the Project → New Menu. Make sure that the Project Type is set to Executable (.out) and the Target is set to TMS320C67XX. You will probably want to save your project in a new folder on your ”H” drive. Note: Since 1

3 Using the same method.your H drive is on the network. 2 Once your project is created. cache. Note that for this code to compile properly in CCS. You can do so by selecting the File → New → DSP/BIOS Configuration menu. it is much slower than the main hard disk. The CDB file is used to configure various parameters of the board like memory. 2 in the project settings. The CDB file should pop up.cdb. save it in your project folder and add it to the project by selecting the Project → Add Files to Project menu. In the new window. If it happens. and 3 add the CHIP 6713 to the preprocessor symbol list in the Project Build Options.CMD file that is present in your project folder. just like you would do with Visual Studio. The CMD file has been created when the CDB file was created. First.h> #include <dsk6713_aic23. This can produce some weird errors when trying to compile or run a program with CCS. include the two following headers to your project. just copy your project directory to the main hard disk when you work on it. #include <dsk6713. 3 Configuring the audio codec The following procedure allows you to process data in real-time. interrupts. 4 You are now ready to write your program by adding c. h. The following code needs to be added in your program. you need to 1 add the library C:\CCS v3.1\c6000\dsk6713\include to the header search path.h> Next. select dsk6713. /* 0 DSK6713_AIC23_LEFTINVOL Left line input channel volume */ 0x0017. /* 1 DSK6713_AIC23_RIGHTINVOL Right line input channel volume */ 2 . and library files. create a new CDB file.1\c6000\dsk6713\lib\dsk6713bsl. DSK6713_AIC23_Config config = { 0x0017.lib to your project. Do not forget to copy it back to your H drive and delete your temporary project when you are done. add C:\CCS v3. the configuration structure will set the various parameters of the audio codec while the handle can be considered as a pointer to the audio codec. I/O and so on (more on that in the tutorials and the lab handout). also add to the project the .

DSK6713_AIC23_CodecHandle hCodec. y1)). /* 7 DSK6713_AIC23_DIGIF Digital audio interface format */ 0x0081. while(!DSK6713_AIC23_write(hCodec. at the end of the program. DSK6713_init(). In your main function.&config). /* 4 DSK6713_AIC23_ANAPATH Analog audio path control */ 0x0000. &x2)). y1)). /* 8 DSK6713_AIC23_SAMPLERATE Sample rate control */ 0x0001 /* 9 DSK6713_AIC23_DIGACT Digital interface activation */ }.0x01f9. you first need to initialize the library and then open the codec (with the configuration structure defined up above). Finally. a very similar function is used. while(!DSK6713_AIC23_read(hCodec. 3 . you can close the codec when you do not need the it anymore. /* 5 DSK6713_AIC23_DIGPATH Digital audio path control */ 0x0000. /* 2 DSK6713_AIC23_LEFTHPVOL Left channel headphone volume */ 0x01f9. /* 6 DSK6713_AIC23_POWERDOWN Power down control */ 0x0043. DSK6713_AIC23_closeCodec(hCodec). &x1)). /* 3 DSK6713_AIC23_RIGHTHPVOL Right channel headphone volume */ 0x0011. hCodec = DSK6713_AIC23_openCodec(0. You also need to set the sampling frequency of the AIC23. while(!DSK6713_AIC23_read(hCodec. Note that you need to use the function two times. DSK6713_AIC23_setFreq(hCodec. DSK6713_AIC23_FREQ_8KHZ). you just need to read the codec. since the codec is stereo. while(!DSK6713_AIC23_write(hCodec. To get the signal from the LINE IN. we need to read the data twice. To write your result to the LINE OUT.

Sign up to vote on this title
UsefulNot useful