Code Composer Studio ( CCS ) and the  DSKs DSK6711,  DSK6713  and DSK6416 Dr. Naim Dahnoun, Bristol University,  (c) Texas...
Learning Objectives <ul><li>Introduction  to Code Composer Studio ( CCS ). </li></ul><ul><li>Installation  and  Setup  of ...
CCS Code Composer Studio <ul><li>The Code Composer Studio ( CCS ) application provides an integrated environment with the ...
CCS -  Installation  and  Setup <ul><li>(A) Install the CCS Software. </li></ul><ul><li>(B) Run  CCS Setup : </li></ul><ul...
CCS  Setup <ul><li>You should now see a screen similar to this: </li></ul>Note:  If you don’t see the  Import Configuratio...
CCS  Setup <ul><li>You can clear the previous configuration by selecting the configuration you wish to clear and clicking ...
<ul><li>If you do not know your configuration then you can select it automatically using the “ Configure C6x11 DSK ” Utili...
<ul><li>Finally save and quit the import configuration dialog box. </li></ul>CCS  Setup
<ul><li>Start CCS  by either: </li></ul><ul><ul><li>Using the desktop icon: </li></ul></ul><ul><ul><li>Start -> Programs -...
Troubleshooting <ul><li>If the following window appears on your screen then: </li></ul><ul><ul><li>Check that the DSK is c...
Introduction to the  ‘C6711 DSK <ul><li>The  ‘C6711 DSK  provides a powerful,  low-cost  development environment. </li></u...
DSK6711  Contents <ul><li>Hardware </li></ul><ul><ul><li>150 MHz   ‘C6711 DSP </li></ul></ul><ul><ul><li>TI  16-bit  A/D C...
Hardware:  Overview 1.8V Power Supply 16M SDRAM 128K FLASH Daughter Card I/F (EMIF Connector) Parallel Port I/F Power Jack...
Hardware:  DSK Connections (A)  Parallel port : The PC’s parallel port is connected to the parallel port on the DSK. (B)  ...
Hardware: Power On Self Test ( POST ) <ul><li>There are three  LEDs  to provide the user with feedback from the test proce...
Hardware:  Resets TMS320C6711  <ul><li>Apply Power </li></ul><ul><li>POST runs </li></ul><ul><li>CCS Reset </li></ul><ul><...
Hardware:  Memory Maps FFFF_FFFF 0000_0000 64 kB  Internal  – L2 ( Program  or  Data ) On-chip Peripherals 0180_0000 CE2 -...
Description  Origin Length Internal RAM (L2) mem 0x00000000   0x00010000 EMIF control regs  0x01800000   0x00000024 Cache ...
Software:  PC Host Utilities <ul><li>DSK Loader dsk6ldr.exe  f.out </li></ul><ul><li>Runs on PC host </li></ul><ul><li>Dow...
Software:  CCS DSK Utilities Confidence Test 1. Unload any gel files already loaded in CCS 2. Load  conftest.gel 3. Run co...
Software:  DSK Help <ul><li>DSK6711 help is available via the Help menu in CCS. </li></ul>
Software:  PC    DSK Communications XDS CCS uses  parallel port  to  control DSP  via  JTAG port You can use full TI eXte...
dsk6x_ open( )   Open a connection to the DSK dsk6x_ close( )   Close a connection to the DSK dsk6x_ reset_board( )   Rese...
TMS320C 6713 DSP Starter Kit (DSK) The TMS320C6713 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a  low...
'C6713  -  DSK Block Diagram Daughter Card Room for Expansion Internal Memory CPU Program Cache Data Cache EMIF SDRAM (8 M...
‘ C6713   -   DSK Memory Map CPLD C omplex  P rogrammable  L ogic  D evice Sono dispositivi logici programmabili e cancell...
'C6713  -  DSK Block Diagram
TMS320C 6416 DSP Starter Kit (DSK) The TMS320C6416 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a  low...
'C6416  -  DSK Block Diagram <ul><li>DSK uses both EMIFs (A and B) </li></ul><ul><li>EMIFA </li></ul><ul><ul><li>CE0  for ...
'C6416  -  DSK Block Diagram
‘ C6416  -  DSK Memory Map
Laboratory Exercise: DSK Hardware Setup <ul><li>(1)  Connect  the following cables: </li></ul><ul><ul><li>Parallel port . ...
(3.b) If you are using the  DSK6713 or DSK6416 Use the Diagnostics Utilities show below: Laboratory Exercise: DSK Hardware...
<ul><li>Notes: </li></ul><ul><li>The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK. </li></ul>...
Laboratory Exercise:  Using CCS <ul><li>Implement: </li></ul><ul><li>with:  a i  = {40, 39, …, 1} </li></ul><ul><li>x i  =...
Laboratory Exercise:  Using CCS Note: When you type in the “ Project Name ” a directory is created in the “ Location ”.  D...
Laboratory Exercise:  Using CCS (3) Add files to the project - lab3.c  (source file) - lab3.cdb  (configuration file) - la...
(4)  Change the  build options  ( compile  and  link ): Laboratory Exercise:  Using CCS
(5)   Build the output program (lab3.out):   (a) Build the project by: (i) Clicking the  Rebuild All   toolbar icon . (ii)...
Laboratory Exercise:  Using CCS (6)  Load the output file lab3.out into DSP memory:   (a) The program will be automaticall...
(6)  Load the output file lab3.out into DSP memory:   (b)  Load the lab3.out by selecting   F ile : Load   P rogram  as sh...
(7)   Debug and run code :   (a) Go to the beginning of the program, that is main() by selecting Debug:Go Main .   (b)  Wa...
(7)  Debug and run code :   (c)  CCS will automatically add the local variables : Laboratory Exercise:  Using CCS
(7) Debug and run code: (d) You can run or step through the code by using the  various icons on the  toolbar  or use the  ...
(7) Debug and run code:    (e) Stop the processor from running and watch the variable y: y = 0x2cdb  or  11480 (8)  Benchm...
(8) Benchmarking and profiling code:   (c) Expand the lab3.c as shown below: Laboratory Exercise:  Using CCS
(8) Benchmarking and profiling code:   (d) Add a breakpoint at “ for(;;); ”. This can be done by:   (i)  Click the cursor ...
(8)  Benchmarking and profiling code:   (e) Run the program and  examine the profile window : Laboratory Exercise:  Using ...
CCS and DSK <ul><li>CCS Overview:  </li></ul><ul><ul><li>Linksspru301c.pdf </li></ul></ul><ul><li>Resets: </li></ul><ul><u...
Upcoming SlideShare
Loading in...5
×

Lezione del 11 Gennaio 2007

365

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
365
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Lezione del 11 Gennaio 2007

  1. 1. Code Composer Studio ( CCS ) and the DSKs DSK6711, DSK6713 and DSK6416 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
  2. 2. Learning Objectives <ul><li>Introduction to Code Composer Studio ( CCS ). </li></ul><ul><li>Installation and Setup of CCS . </li></ul><ul><li>Introduction to the DSK . </li></ul><ul><li>Laboratorio (Implementazione di un filtraggio vocale sul 6713-DSK). </li></ul>
  3. 3. CCS Code Composer Studio <ul><li>The Code Composer Studio ( CCS ) application provides an integrated environment with the following capabilities: </li></ul><ul><ul><li>Integrated Development Environment ( IDE ) with an Editor , Compiler , Debugger , Project Manager , Profiler , etc. </li></ul></ul><ul><ul><li>C/C++ Compiler , Assembly Optimiser and Linker (code generation tools). </li></ul></ul><ul><ul><li>DSP Simulator . </li></ul></ul><ul><ul><li>Real-time operating system - RTOS ( DSP/BIOS™ ). </li></ul></ul><ul><ul><li>Real-Time Data Exchange ( RTDX™ ) between the Host and Target. </li></ul></ul><ul><ul><li>Real-time Analysis and Data Visualization . </li></ul></ul>
  4. 4. CCS - Installation and Setup <ul><li>(A) Install the CCS Software. </li></ul><ul><li>(B) Run CCS Setup : </li></ul><ul><ul><li>Start CCS setup utility by using the following desktop icon: </li></ul></ul><ul><ul><li>Alternatively: </li></ul></ul><ul><ul><ul><li>Windows Start Menu -> Programs -> Texas Instruments -> Code Composer Studio 2 (‘C6000) -> Setup Code Composer Studio. </li></ul></ul></ul><ul><ul><ul><li>Run cc_setup.exe located in: c: ticcin </li></ul></ul></ul>
  5. 5. CCS Setup <ul><li>You should now see a screen similar to this: </li></ul>Note: If you don’t see the Import Configuration dialog box you should open it from the menu using: F ile: I mport .
  6. 6. CCS Setup <ul><li>You can clear the previous configuration by selecting the configuration you wish to clear and clicking the clear button. </li></ul><ul><li>Next select a new configuration that you would like to add: </li></ul><ul><ul><li>Select the C6x11DSK - Port x - y Mode . </li></ul></ul><ul><ul><li>The port number, x, and port mode, y, depend on your PC setup. </li></ul></ul>
  7. 7. <ul><li>If you do not know your configuration then you can select it automatically using the “ Configure C6x11 DSK ” Utility. </li></ul>CCS Setup
  8. 8. <ul><li>Finally save and quit the import configuration dialog box. </li></ul>CCS Setup
  9. 9. <ul><li>Start CCS by either: </li></ul><ul><ul><li>Using the desktop icon: </li></ul></ul><ul><ul><li>Start -> Programs -> Texas Instruments -> Code Composer Studio 2 -> Code Composer Studio. </li></ul></ul><ul><ul><li>Run cc_app.exe in c: iccin </li></ul></ul>Using CCS
  10. 10. Troubleshooting <ul><li>If the following window appears on your screen then: </li></ul><ul><ul><li>Check that the DSK is connected properly and powered up. </li></ul></ul><ul><ul><li>Check if the port address and mode is correct (See Slide 6). </li></ul></ul>
  11. 11. Introduction to the ‘C6711 DSK <ul><li>The ‘C6711 DSK provides a powerful, low-cost development environment. </li></ul><ul><li>The DSK comes with CCS code development tools (does not include the simulator ). </li></ul><ul><li>A laboratory at the end of this section takes you through the DSK setup and shows you how to run the confidence test to check if it is working correctly. </li></ul>
  12. 12. DSK6711 Contents <ul><li>Hardware </li></ul><ul><ul><li>150 MHz ‘C6711 DSP </li></ul></ul><ul><ul><li>TI 16-bit A/D Converter (‘AD535) </li></ul></ul><ul><ul><li>External Memory </li></ul></ul><ul><ul><ul><li>16 MB SDRAM </li></ul></ul></ul><ul><ul><ul><li>128 kB Flash ROM </li></ul></ul></ul><ul><ul><li>LED’s </li></ul></ul><ul><ul><li>Daughter card expansion </li></ul></ul><ul><ul><li>Power Supply & Parallel Port Cable </li></ul></ul><ul><li>Software </li></ul><ul><ul><li>Code Generation Tools </li></ul></ul><ul><ul><li> (C Compiler, Assembler & Linker) </li></ul></ul><ul><ul><li>Code Composer Debugger </li></ul></ul><ul><ul><li> (256K program limitation) </li></ul></ul><ul><ul><li>Example Programs & S/W Utilities </li></ul></ul><ul><ul><ul><li>Power-on Self Test </li></ul></ul></ul><ul><ul><ul><li>Flash Utility Program </li></ul></ul></ul><ul><ul><ul><li>Board Confidence Test </li></ul></ul></ul><ul><ul><ul><li>Host access via DLL </li></ul></ul></ul><ul><ul><ul><li>Sample Program(s) </li></ul></ul></ul>
  13. 13. Hardware: Overview 1.8V Power Supply 16M SDRAM 128K FLASH Daughter Card I/F (EMIF Connector) Parallel Port I/F Power Jack Power LED 3.3V Power Supply JTAG Header Emulation JTAG Controller Reset Line Level Output (speakers) Line Level Input (microphone) 16-bit codec (A/D & D/A) Three User LEDs User DIP switches ‘ C6711 DSP D. Card I/F (Periph Con.) TMS320C6711 <ul><li>The daughter card interface socket provides a method for accessing most of the C6711 DSP for hardware extension. </li></ul>
  14. 14. Hardware: DSK Connections (A) Parallel port : The PC’s parallel port is connected to the parallel port on the DSK. (B) JTAG : An XDS - JTAG emulator connected to the PC (either internal or external) is connected to the JTAG header on the DSK. Line-level Output Line-level Input PC DSK Parallel Cable Power Supply External Power Supply PC DSK JTAG Power Supply Line-level Output Line-level Input XDS External Power Supply HPI
  15. 15. Hardware: Power On Self Test ( POST ) <ul><li>There are three LEDs to provide the user with feedback from the test procedure. </li></ul><ul><li>The Test Program (stored in the FLASH memory, code available on the DSK CD-ROM) runs every time DSK is powered on and reset. </li></ul>Test LED 3 LED 2 LED 1 Description 0 0 0 0 Start state 1 0 0 1 DSP internal SRAM test 2 0 1 0 External SDRAM test 3 0 1 1 DSP McBSP0 loop back test 4 1 0 0 External codec read/write test 5 1 0 1 External codec tone generation test 6 1 1 0 External LED and DSP timer test 7 1 1 1 Unused – available for future test use B L I N K A L L All tests completed successfully
  16. 16. Hardware: Resets TMS320C6711 <ul><li>Apply Power </li></ul><ul><li>POST runs </li></ul><ul><li>CCS Reset </li></ul><ul><li>Menu selection: Debug  DSP Reset </li></ul><ul><li>Resets ‘C6711 DSP </li></ul><ul><li>Causes bootload from FLASH which overwrites internal memory </li></ul><ul><li>Absolute Reset </li></ul><ul><li>On rare occasions you might have to: </li></ul><ul><ul><li>Pull power jack </li></ul></ul><ul><ul><li>Pull parallel port </li></ul></ul><ul><li>Reset Pushbutton </li></ul><ul><li>Don’t push when CCS is running </li></ul><ul><li>Does not force FULL system reset </li></ul><ul><li>To fully reset board, pull power plug </li></ul><ul><li>Power On Self Test (POST) </li></ul><ul><li>Counts 1 - 7 </li></ul><ul><li>4:   mic input  spkr out </li></ul><ul><li>5:    sinewave  spkr out </li></ul><ul><li>Don’t start CCS until end (all 3 LEDs flash at the end) </li></ul><ul><li>If switches are set to 0100, a fast version of POST is run </li></ul>
  17. 17. Hardware: Memory Maps FFFF_FFFF 0000_0000 64 kB Internal – L2 ( Program or Data ) On-chip Peripherals 0180_0000 CE2 - 128 MB External CE3 - 128 MB External 8000_0000 9000_0000 A000_0000 B000_0000 CE0 - 128 MB External CE1 - 128 MB External TMS320C6711 9008_0000 Available via Daughter Card Connector ‘ C6711 DSK 16 MB SDRAM 128 kB FLASH 4 byte I/O Port <ul><li>LED’s </li></ul><ul><li>Switches </li></ul><ul><li>DSK status </li></ul><ul><li>DSK rev# </li></ul><ul><li>Daughter Card </li></ul>Program File Program File
  18. 18. Description Origin Length Internal RAM (L2) mem 0x00000000 0x00010000 EMIF control regs 0x01800000 0x00000024 Cache configuration reg 0x01840000 0x00000004 L2 base addr & count regs 0x01844000 0x00000020 L1 base addr & count regs 0x01844020 0x00000020 L2 flush & clean regs 0x01845000 0x00000008 CE0 mem attribute regs 0x01848200 0x00000010 CE1 mem attribute regs 0x01848240 0x00000010 CE2 mem attribute regs 0x01848280 0x00000010 CE3 mem attribute regs 0x018482c0 0x00000010 HPI control reg 0x01880000 0x00000004 McBSP0 regs 0x018c0000 0x00000028 McBSP1 regs 0x01900000 0x00000028 Timer0 regs 0x01940000 0x0000000c Timer1 regs 0x01980000 0x0000000c Interrupt selector regs 0x019c0000 0x0000000c EDMA parameter RAM 0x01a00000 0x00000800 EDMA control regs 0x01a0ffe0 0x00000020 QDMA regs 0x02000000 0x00000014 QDMA pseudo-regs 0x02000020 0x00000014 McBSP0 data 0x30000000 0x04000000 McBSP1 data 0x34000000 0x04000000 CE0, SDRAM, 16 MB 0x80000000 0x01000000 CE1, 8-bit ROM (FLASH) ,128 kB 0x90000000 0x00020000 CE1, 8-bit I/O port 0x90080000 0x00000004 CE2 – Daughter card 0xA0000000 0x10000000 CE3 – Daughter card 0xB0000000 0x10000000 On-chip Peripherals Memory Maps DK6711
  19. 19. Software: PC Host Utilities <ul><li>DSK Loader dsk6ldr.exe f.out </li></ul><ul><li>Runs on PC host </li></ul><ul><li>Downloads file .out to DSK memory map </li></ul><ul><li>Stand alone DSK loader for when you want to bypass CCS </li></ul><ul><li>FLASH Programming hex6x.exe f.out h.cmd </li></ul><ul><li>flash.exe f.hex </li></ul><ul><li>First, convert file.out to file.hex </li></ul><ul><li>The flash utility downloads the file.hex into the on-DSK FLASH </li></ul><ul><li>Both programs run on the PC host. Links: SPRA804.pdf </li></ul><ul><li>DSK Confidence Test dsk6xtst </li></ul><ul><li>Run from MSDOS prompt </li></ul><ul><li>Command-line utility tests proper installation of the DSK board </li></ul><ul><li>Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Timers, EDMA, LEDs and Audio codec </li></ul>
  20. 20. Software: CCS DSK Utilities Confidence Test 1. Unload any gel files already loaded in CCS 2. Load conftest.gel 3. Run confidence tests from GEL menu <ul><li> Quick Test </li></ul><ul><li>Run from CCS GEL menu </li></ul><ul><li>Defined in dsk6xinit.gel </li></ul><ul><li>Non-intrusive test by reading and writing: </li></ul><ul><ul><li>LEDs </li></ul></ul><ul><ul><li>Switches </li></ul></ul><ul><ul><li>DSK board revision </li></ul></ul><ul><li>Outputs switch values </li></ul>General Extension Language ( GEL ) : An interpretive language that enables you to write functions to configure the IDE and access the target processor .
  21. 21. Software: DSK Help <ul><li>DSK6711 help is available via the Help menu in CCS. </li></ul>
  22. 22. Software: PC  DSK Communications XDS CCS uses parallel port to control DSP via JTAG port You can use full TI eXtended Device System ( XDS ) via 14 pin header connector Communicate from Windows program (C++, VB) via parallel port using Win32 DLL ( HPI ) Note: You should not use the parallel port for simultaneous JTAG emulation and HPI connection .
  23. 23. dsk6x_ open( ) Open a connection to the DSK dsk6x_ close( ) Close a connection to the DSK dsk6x_ reset_board( ) Reset the entire DSK board dsk6x_ reset_dsp( ) Reset only the DSP on the DSK dsk6x_ coff_load( ) Load a COFF image to DSP memory dsk6x_ hpi_open( ) Open the HPI for the DSP dsk6x_ hpi_close( ) Close the HPI for the DSP dsk6x_ hpi_read( ) Read DSP memory via the HPI dsk6x_ hpi_write( ) Write to DSP memory via the HPI dsk6x_ generate_int( ) Generate a DSP interrupt <ul><li>Win32 API functions for Host to DSK communications: </li></ul>Software: PC  DSK Communications
  24. 24. TMS320C 6713 DSP Starter Kit (DSK) The TMS320C6713 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a low-cost development platform designed to speed the development of high precision applications based on TI´s TMS320C6000 floating point  DSP generation. Link: tmdsdsk6713.html Link: Reference Manual
  25. 25. 'C6713 - DSK Block Diagram Daughter Card Room for Expansion Internal Memory CPU Program Cache Data Cache EMIF SDRAM (8 MB) CE2 CE3 Flash ROM (256 kB) I/O Port CE1 <ul><li>DSK uses all FOUR External Memory regions </li></ul><ul><ul><li>CE0 for SDRAM </li></ul></ul><ul><ul><li>CE1 for Flash Memory and I/O Port (switches, LED’s, etc.) </li></ul></ul><ul><ul><li>CE2 and CE3 pinned-out to daughter card connector </li></ul></ul>CE0
  26. 26. ‘ C6713 - DSK Memory Map CPLD C omplex P rogrammable L ogic D evice Sono dispositivi logici programmabili e cancellabili. La programmazione permette ai CPLD di simulare un generico circuito digitale di complessita' non elevata. A differenza delle FPGA le CPLD mantengono la programmazione anche quando non sono alimentate perché contengono delle memorie non volatili. Vengono usate per applicazioni particolari dove sono richieste alte velocita' o bassi costi o funzionalita' di glue logic overo di interfacciamento tra due dispositivi complessi.
  27. 27. 'C6713 - DSK Block Diagram
  28. 28. TMS320C 6416 DSP Starter Kit (DSK) The TMS320C6416 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a low-cost development platform designed to speed the development of high performance applications based on TI´s TMS320C64x DSP generation. The kit uses USB communications for true plug-and-play functionality .   Link: tmdsdsk6416.html Link: Reference Manual
  29. 29. 'C6416 - DSK Block Diagram <ul><li>DSK uses both EMIFs (A and B) </li></ul><ul><li>EMIFA </li></ul><ul><ul><li>CE0 for SDRAM </li></ul></ul><ul><ul><li>CE2 and CE3 pinned-out to daughter card connector </li></ul></ul><ul><li>EMIFB </li></ul><ul><ul><li>CE1 for Flash Memory and CE0 for CPLD (switches, LED’s, etc.) </li></ul></ul>TMS320C6416 DSP Starter Kit (DSK) Daughter Card CE3 CE2 SDRAM (16 MB) Flash ROM (512 kB) CPLD CE1 CE0 L2 RAM Prog/Data (1 MB) CPU EMIF A EMIF B Program Cache Data Cache CE0 Room for Expansion
  30. 30. 'C6416 - DSK Block Diagram
  31. 31. ‘ C6416 - DSK Memory Map
  32. 32. Laboratory Exercise: DSK Hardware Setup <ul><li>(1) Connect the following cables: </li></ul><ul><ul><li>Parallel port . </li></ul></ul><ul><ul><li>Audio cables . </li></ul></ul>(2) Connect the power and observe the Power On Self-Test (POST) . (3.a) If using the DSK6711 Configure and test the DSK with the utilities shown below:
  33. 33. (3.b) If you are using the DSK6713 or DSK6416 Use the Diagnostics Utilities show below: Laboratory Exercise: DSK Hardware Setup
  34. 34. <ul><li>Notes: </li></ul><ul><li>The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK. </li></ul><ul><li>The CODEC test performs two operations: (1) a 1kHz tone output, and (2) an audio input to output loopback. You must have a speaker connected to the the output jack to hear the test. </li></ul><ul><li>If the confidence test fails: </li></ul><ul><ul><li>(1) Remove the power and parallel cable from the DSK. </li></ul></ul><ul><ul><li>(2) Reset your PC. </li></ul></ul><ul><ul><li>(3) Reconnect the power and the parallel cable. </li></ul></ul><ul><ul><li>(4) Invoke CCS. </li></ul></ul>Laboratory Exercise: DSK Hardware Setup
  35. 35. Laboratory Exercise: Using CCS <ul><li>Implement: </li></ul><ul><li>with: a i = {40, 39, …, 1} </li></ul><ul><li>x i = {1, 2, …, 40} </li></ul>(1) Create a working directory and copy the following files from CodeChapter 03 - CCS and DSK: (a) lab3.cdb (b) lab3.c (c) lab3cfg.cmd (2) Create a new project: (a) Start CCS. (b) Create a new project as shown on the following slide.
  36. 36. Laboratory Exercise: Using CCS Note: When you type in the “ Project Name ” a directory is created in the “ Location ”. Delete this if not required.
  37. 37. Laboratory Exercise: Using CCS (3) Add files to the project - lab3.c (source file) - lab3.cdb (configuration file) - lab3.cmd (linker command file)
  38. 38. (4) Change the build options ( compile and link ): Laboratory Exercise: Using CCS
  39. 39. (5) Build the output program (lab3.out): (a) Build the project by: (i) Clicking the Rebuild All toolbar icon . (ii) Selecting Rebuild All in the project menu . (b) Verify that the build output window is complete with “ 0 errors, 0 warnings ”: Laboratory Exercise: Using CCS
  40. 40. Laboratory Exercise: Using CCS (6) Load the output file lab3.out into DSP memory: (a) The program will be automatically loaded after each project build if the “ Program Load after Build ” option is selected as shown below:
  41. 41. (6) Load the output file lab3.out into DSP memory: (b) Load the lab3.out by selecting F ile : Load P rogram as shown below: Laboratory Exercise: Using CCS
  42. 42. (7) Debug and run code : (a) Go to the beginning of the program, that is main() by selecting Debug:Go Main . (b) Watch variables : (i) Select the variable (to be watched) from the lab3.c file, right click and select “ Add To Watch Window ”. If the variable is y for instance, the following window will be shown. (ii) To add another variable to the watch select it and then drag and drop it on to the window. Laboratory Exercise: Using CCS
  43. 43. (7) Debug and run code : (c) CCS will automatically add the local variables : Laboratory Exercise: Using CCS
  44. 44. (7) Debug and run code: (d) You can run or step through the code by using the various icons on the toolbar or use the Debug menu : Laboratory Exercise: Using CCS
  45. 45. (7) Debug and run code: (e) Stop the processor from running and watch the variable y: y = 0x2cdb or 11480 (8) Benchmarking and profiling code : (a) Stop the processor, reload the code or select Debug:Restart then select Debug:Go Main . (b) Open a new profiling session and name it “Session 1” and select “ Profile All Functions ” by clicking the following toolbar button: Laboratory Exercise: Using CCS
  46. 46. (8) Benchmarking and profiling code: (c) Expand the lab3.c as shown below: Laboratory Exercise: Using CCS
  47. 47. (8) Benchmarking and profiling code: (d) Add a breakpoint at “ for(;;); ”. This can be done by: (i) Click the cursor on the highlighted line below. (ii) Click the “Add Breakpoint” toolbar button: Laboratory Exercise: Using CCS
  48. 48. (8) Benchmarking and profiling code: (e) Run the program and examine the profile window : Laboratory Exercise: Using CCS
  49. 49. CCS and DSK <ul><li>CCS Overview: </li></ul><ul><ul><li>Linksspru301c.pdf </li></ul></ul><ul><li>Resets: </li></ul><ul><ul><li>Links ccs_dsk.pdf </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×