+ All Categories
Home > Documents > Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas...

Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas...

Date post: 21-Dec-2015
Category:
View: 245 times
Download: 8 times
Share this document with a friend
Popular Tags:
41
Chapter 3 Chapter 3 Code Composer Studio and Code Composer Studio and the DSK the DSK
Transcript
Page 1: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Chapter 3Chapter 3

Code Composer Studio and the DSKCode Composer Studio and the DSK

Page 2: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 2

Learning ObjectivesLearning Objectives

Introduction to Code Composer Studio Introduction to Code Composer Studio (CCS).(CCS).

Installation and setup of CCS.Installation and setup of CCS. Introduction to the DSK.Introduction to the DSK. Laboratory.Laboratory.

Page 3: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 3

Code Composer StudioCode Composer Studio The Code Composer Studio (CCS) application provides an integrated environment with the The Code Composer Studio (CCS) application provides an integrated environment with the

following capabilities:following capabilities: Integrated development environment with an editor, debugger, project manager, profiler, etc.Integrated development environment with an editor, debugger, project manager, profiler, etc. ‘‘C/C++’ compiler, assembly optimiser and linker (code generation tools).C/C++’ compiler, assembly optimiser and linker (code generation tools). Simulator.Simulator. Real-time operating system (DSP/BIOS™).Real-time operating system (DSP/BIOS™). Real-Time Data Exchange (RTDX™) between the Host and Target.Real-Time Data Exchange (RTDX™) between the Host and Target. Real-time analysis and data visualisation. Real-time analysis and data visualisation.

Page 4: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 4

CCS Installation and SetupCCS Installation and Setup

(A)(A) Install the CCS Software.Install the CCS Software.

(B)(B)Run CCS Setup:Run CCS Setup: Start CCS setup utility by using the following desktop icon:Start CCS setup utility by using the following desktop icon:

Alternatively:Alternatively: Windows Start Menu -> Programs -> Texas Instruments -> Code Composer Studio 2 (‘C6000) -> Setup Code Composer Studio.Windows Start Menu -> Programs -> Texas Instruments -> Code Composer Studio 2 (‘C6000) -> Setup Code Composer Studio. Run cc_setup.exe located in: c:\ti\cc\bin\Run cc_setup.exe located in: c:\ti\cc\bin\

Setup CCS 2.lnk

Page 5: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 5

CCS Installation and SetupCCS Installation and Setup You should now see a screen similar to this:You should now see a screen similar to this:

Note: Note: If you don’t see the Import Configuration dialog box you If you don’t see the Import Configuration dialog box you should open it from the menu using: should open it from the menu using: FFile:ile:IImport.mport.

Page 6: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 6

CCS Installation and SetupCCS Installation and Setup

You can clear the previous configuration by selecting the You can clear the previous configuration by selecting the configuration you wish to clear and clicking the clear button.configuration you wish to clear and clicking the clear button.

Next select a new configuration that you would like to add:Next select a new configuration that you would like to add: Select the C6x11DSK Port x y Mode.Select the C6x11DSK Port x y Mode. The port number, x, and port mode, y, depend on your PC setup.The port number, x, and port mode, y, depend on your PC setup.

Page 7: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 7

CCS Installation and SetupCCS Installation and Setup

If you do not know your configuration If you do not know your configuration then you can select it automatically using then you can select it automatically using the “Configure C6x11 DSK” Utility.the “Configure C6x11 DSK” Utility.

Page 8: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 8

CCS Installation and SetupCCS Installation and Setup

Finally save and quit the import Finally save and quit the import configuration dialog box.configuration dialog box.

Page 9: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 9

Start CCS by either:Start CCS by either: Using the desktop icon:Using the desktop icon:

Start -> Programs -> Texas Instruments -> Code Composer Studio Start -> Programs -> Texas Instruments -> Code Composer Studio 2 -> Code Composer Studio.2 -> Code Composer Studio.

Run cc_app.exe in c:\ti\cc\bin\Run cc_app.exe in c:\ti\cc\bin\

Using CCSUsing CCS

CCS 2.lnk

Page 10: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 10

TroubleshootingTroubleshooting

If the following window appears on your screen then:If the following window appears on your screen then: Check that the DSK is connected properly and powered Check that the DSK is connected properly and powered

up.up. Check if the port address and mode is correct (See Slide Check if the port address and mode is correct (See Slide

7).7).

Page 11: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 11

Introduction to the ‘C6711 DSKIntroduction to the ‘C6711 DSK

The ‘C6711 DSK provides a powerful, low-cost development The ‘C6711 DSK provides a powerful, low-cost development environment.environment.

The DSK comes with CCS code development tools (does not include The DSK comes with CCS code development tools (does not include the simulator).the simulator).

A laboratory at the end of this section takes you through the DSK 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 it is setup and shows you how to run the confidence test to check it is working correctly.working correctly.

Page 12: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 12

DSK ContentsDSK ContentsHardware (Schematics)

150 MHz ‘C6711 DSP TI 16-bit A/D Converter (‘AD535) External Memory

16M Bytes SDRAM 128K Bytes Flash ROM

LED’s Daughter card expansion Power Supply & Parallel Port Cable

Software Code Generation Tools

(C Compiler, Assembler & Linker) Code Composer Debugger

(256K program limitation) Example Programs & S/W Utilities

Power-on Self Test Flash Utility Program Board Confidence Test Host access via DLL Sample Program(s)

Page 13: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 13

1.8V Power Supply 16M SDRAM 128K FLASH Daughter Card I/F(EMIF Connector)

ParallelPort I/F

PowerJack

PowerLED

3.3V Power Supply

JTAG Header

EmulationJTAG Header

Reset

Line Level Output (speakers)Line Level Input (microphone)

16-bit codec (A/D & D/A)Three User LEDs

User DIPswitches

‘C6711DSP

D. Card I/F(Periph Con.)

TMS320C6711

Hardware: (1) OverviewHardware: (1) Overview

The daughter card interface socket provides a The daughter card interface socket provides a method for accessing most of the C6711 DSP for method for accessing most of the C6711 DSP for hardware extension.hardware extension.

Page 14: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 14

Hardware: (2) DSK ConnectionsHardware: (2) DSK Connections

(A)(A) Parallel port: The PC’s parallel port is connected to the Parallel port: The PC’s parallel port is connected to the parallel port on the DSK.parallel port on the DSK.

(B)(B) JTAG: An XDS JTAG emulator connected to the PC JTAG: An XDS JTAG emulator connected to the PC (either internal or external) is connected to the JTAG (either internal or external) is connected to the JTAG header on the DSK.header on the DSK.

Line-level OutputLine-level OutputLine-level InputLine-level Input

PCPC DSKDSKParallel CableParallel Cable

Power Power SupplySupply

External External Power Power SupplySupply

PCPC DSKDSKJTAGJTAG

Power Power SupplySupply Line-level OutputLine-level Output

Line-level InputLine-level Input

XD

SX

DS External External

Power Power SupplySupply

Page 15: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 15

Hardware: (3) Power On Self Test (POST)Hardware: (3) Power On Self Test (POST)

TestTest LED 3LED 3 LED 2LED 2 LED 1LED 1 DescriptionDescription00 00 00 00 Start stateStart state11 00 00 11 DSP internal SRAM testDSP internal SRAM test22 00 11 00 External SDRAM testExternal SDRAM test33 00 11 11 DSP McBSP0 loop back testDSP McBSP0 loop back test44 11 00 00 External codec read/write testExternal codec read/write test55 11 00 11 External codec tone generation testExternal codec tone generation test66 11 11 00 External LED and DSP timer testExternal LED and DSP timer test77 11 11 11 Unused – available for future test useUnused – available for future test use

B L I N K A L LB L I N K A L L All tests completed successfullyAll tests completed successfully

There are three LEDs to provide the user with There are three LEDs to provide the user with feedback from the test procedure.feedback from the test procedure.

The test program (stored in the FLASH memory, code The test program (stored in the FLASH memory, code available on the DSK CD-ROM) runs every time DSK available on the DSK CD-ROM) runs every time DSK is powered on and reset.is powered on and reset.

Page 16: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 16

TMS320C6711

Hardware: (4) ResetsHardware: (4) Resets

Apply Power POST runs

CCS Reset Menu selection:

DebugDSP Reset Resets ‘C6711 DSP Causes bootload

from FLASH which overwrites internal memory

Absolute ResetOn rare occasions you might have to:

Pull power jack Pull parallel port

Reset Pushbutton Don’t push when CCS

is running Does not force FULL

system reset To fully reset board,

pull power plug

Power On Self Test (POST) Counts 1 - 7 4: mic input spkr out 5: sinewave spkr out Don’t start CCS until end

(all 3 LEDs flash at the end) If switches are set to 0100, a fast version of

POST is run

Page 17: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 17

Hardware: (5) Memory MapsHardware: (5) Memory Maps

FFFF_FFFFFFFF_FFFF

0000_00000000_0000

64KB Internal64KB Internal(Program or Data)(Program or Data)

On-chip PeriphOn-chip Periph0180_00000180_0000

128MB External128MB External

128MB External128MB External

8000_00008000_0000

9000_00009000_0000

A000_0000A000_0000

B000_0000B000_0000

128MB External128MB External

128MB External128MB External

TMS320C6711TMS320C6711

9008_00009008_0000

Available viaAvailable viaDaughter CardDaughter Card

ConnectorConnector

‘‘C6711 DSKC6711 DSK

16MB SDRAM16MB SDRAM

128K byte FLASH128K byte FLASH

4 byte I/O Port4 byte I/O Port

LED’sLED’sSwitchesSwitchesDSK statusDSK statusDSK rev#DSK rev#Daughter CardDaughter Card

Page 18: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 18

Hardware: (5) Memory MapsHardware: (5) Memory MapsDescription Description OriginOrigin LengthLengthInternal RAM (L2) memInternal RAM (L2) mem 0x00000000 0x00000000 0x000100000x00010000EMIF control regs EMIF control regs 0x01800000 0x01800000 0x000000240x00000024Cache configuration reg Cache configuration reg 0x01840000 0x01840000 0x000000040x00000004L2 base addr & count regs L2 base addr & count regs 0x01844000 0x01844000 0x000000200x00000020L1 base addr & count regs L1 base addr & count regs 0x01844020 0x01844020 0x000000200x00000020L2 flush & clean regs L2 flush & clean regs 0x01845000 0x01845000 0x000000080x00000008CE0 mem attribute regs CE0 mem attribute regs 0x01848200 0x01848200 0x000000100x00000010CE1 mem attribute regs CE1 mem attribute regs 0x01848240 0x01848240 0x000000100x00000010CE2 mem attribute regs CE2 mem attribute regs 0x01848280 0x01848280 0x000000100x00000010CE3 mem attribute regs CE3 mem attribute regs 0x018482c0 0x018482c0 0x000000100x00000010HPI control reg HPI control reg 0x01880000 0x01880000 0x000000040x00000004McBSP0 regs McBSP0 regs 0x018c0000 0x018c0000 0x000000280x00000028McBSP1 regs McBSP1 regs 0x01900000 0x01900000 0x000000280x00000028Timer0 regs Timer0 regs 0x01940000 0x01940000 0x0000000c0x0000000cTimer1 regs Timer1 regs 0x01980000 0x01980000 0x0000000c0x0000000cInterrupt selector regs Interrupt selector regs 0x019c0000 0x019c0000 0x0000000c0x0000000cEDMA parameter RAM EDMA parameter RAM 0x01a00000 0x01a00000 0x000008000x00000800EDMA control regs EDMA control regs 0x01a0ffe0 0x01a0ffe0 0x000000200x00000020QDMA regs QDMA regs 0x02000000 0x02000000 0x000000140x00000014QDMA pseudo-regs QDMA pseudo-regs 0x02000020 0x02000020 0x000000140x00000014McBSP0 data McBSP0 data 0x30000000 0x30000000 0x040000000x04000000McBSP1 data McBSP1 data 0x34000000 0x34000000 0x040000000x04000000CE0, SDRAM, 16 MBytes CE0, SDRAM, 16 MBytes 0x80000000 0x80000000 0x010000000x01000000CE1, 8-bit ROM, 128 KbytesCE1, 8-bit ROM, 128 Kbytes 0x90000000 0x90000000 0x000200000x00020000CE1, 8-bit I/O port CE1, 8-bit I/O port 0x90080000 0x90080000 0x000000040x00000004CE2 - Daughtercard CE2 - Daughtercard 0xA0000000 0xA0000000 0x100000000x10000000CE3 - Daughtercard CE3 - Daughtercard 0xB0000000 0xB0000000 0x100000000x10000000

Page 19: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 19

Software: (1) PC Host UtilitiesSoftware: (1) PC Host Utilities

DSK LoaderDSK Loader dsk6ldr.exe dsk6ldr.exe filename.outfilename.out

Runs on PC hostRuns on PC host Downloads .out file to DSK memory mapDownloads .out file to DSK memory map Stand alone DSK loader for when you want to bypass CCSStand alone DSK loader for when you want to bypass CCS

FLASH ProgrammingFLASH Programming hex6x.exe hex6x.exe f.out h.cmdf.out h.cmd

flash.exe flash.exe f.hexf.hex First, convert First, convert file.outfile.out to to file.hexfile.hex The flash utility downloads the hex file into the on-DSK FLASHThe flash utility downloads the hex file into the on-DSK FLASH Both programs run on the PC host. Both programs run on the PC host. Links\SPRA804.pdf

DSK Confidence TestDSK Confidence Test dsk6xtstdsk6xtst Run from MSDOS promptRun from MSDOS prompt Command-line utility tests proper installation of the DSK boardCommand-line utility tests proper installation of the DSK board Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP,

Timers, EDMA, LEDs and Audio codecTimers, EDMA, LEDs and Audio codec

Page 20: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 20

Software: (2) CCS DSK UtilitiesSoftware: (2) CCS DSK Utilities

Confidence TestConfidence Test

1.1. Unload any gel files already Unload any gel files already loaded in CCSloaded in CCS

2.2. Load Load conftest.gelconftest.gel

3.3. Run confidence tests from Run confidence tests from GEL menuGEL menu

Quick TestQuick Test

Run from CCS GEL menuRun from CCS GEL menu Defined in Defined in dsk6xinit.geldsk6xinit.gel Non-intrusiveNon-intrusive test by reading test by reading

and writing:and writing: LEDsLEDs SwitchesSwitches DSK board revisionDSK board revision

Outputs switch valuesOutputs switch valuesGeneral Extension Language (GEL):

An interpretive language that enables you to write functions to configure the IDE and access the target processor.

Page 21: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 21

Software: (3) DSK HelpSoftware: (3) DSK Help

DSK6711 help is available via the Help menu DSK6711 help is available via the Help menu in CCS.in CCS.

Page 22: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 22

Software: (4) PC Software: (4) PC DSK Communications DSK Communications

DSPDSP

JTAGJTAG

............................

JTAGJTAGEmulationEmulation

PortPort

CCS uses parallel port to control DSP via JTAG portCCS uses parallel port to control DSP via JTAG port

You can use full TI eXtended Dev System (XDS) via 14 pin You can use full TI eXtended Dev System (XDS) via 14 pin header connectorheader connector

Use HPI via Win32 DLLUse HPI via Win32 DLL

Communicate from Windows program (C++, VB) via Communicate from Windows program (C++, VB) via parallel port using Win32 DLLparallel port using Win32 DLL

Note: You should not use the parallel port for simultaneous emulation and HPI connection.Note: You should not use the parallel port for simultaneous emulation and HPI connection.

Page 23: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 23

Software: (4) PC Software: (4) PC DSK Communications DSK Communications

dsk6x_open( )dsk6x_open( ) Open a connection to the DSKOpen a connection to the DSK

dsk6x_close( )dsk6x_close( ) Close a connection to the DSKClose a connection to the DSK

dsk6x_reset_board( )dsk6x_reset_board( ) Reset the entire DSK boardReset the entire DSK board

dsk6x_reset_dsp( )dsk6x_reset_dsp( ) Reset only the DSP on the DSKReset only the DSP on the DSK

dsk6x_coff_load( )dsk6x_coff_load( ) Load a COFF image to DSP memoryLoad a COFF image to DSP memory

dsk6x_hpi_open( )dsk6x_hpi_open( ) Open the HPI for the DSPOpen the HPI for the DSP

dsk6x_hpi_close( )dsk6x_hpi_close( ) Close the HPI for the DSPClose the HPI for the DSP

dsk6x_hpi_read( )dsk6x_hpi_read( ) Read DSP memory via the HPIRead DSP memory via the HPI

dsk6x_hpi_write( )dsk6x_hpi_write( ) Write to DSP memory via the HPIWrite to DSP memory via the HPI

dsk6x_generate_int( )dsk6x_generate_int( ) Generate a DSP interruptGenerate a DSP interrupt

Win32 API functions for Host to DSK Win32 API functions for Host to DSK communications:communications:

Page 24: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 24

Laboratory Exercise: DSK Hardware SetupLaboratory Exercise: DSK Hardware Setup

(1)(1) Connect the following cables:Connect the following cables: Parallel port.Parallel port. Audio cables.Audio cables.

(2)(2) Connect the power and observe the Power On Self-Test (POST) (Refer to Slide 15).Connect the power and observe the Power On Self-Test (POST) (Refer to Slide 15).

(3)(3) Run the confidence test for the PC. There are three methods to run this test:Run the confidence test for the PC. There are three methods to run this test:

(a)(a) Run the “dsk6xtst.exe” by double-clicking on the Run the “dsk6xtst.exe” by double-clicking on the file in “\Code\Chapter 03 - CCS and DSK\”.file in “\Code\Chapter 03 - CCS and DSK\”.

(b)(b) Run the “dsk6xtst.exe” file from windows by Run the “dsk6xtst.exe” file from windows by double clicking on the file in double clicking on the file in “\ti\c6000\dsk\conftest\Host\Debug”.“\ti\c6000\dsk\conftest\Host\Debug”.

(c)(c) Open a DOS window and run the “dsk6xtst.exe” Open a DOS window and run the “dsk6xtst.exe” file located in the directory above.file located in the directory above.

Page 25: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 25

Laboratory exercise: DSK hardware setupLaboratory exercise: DSK hardware setupNotes:Notes: The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK.The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 DSK. 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.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. If the confidence test fails:If the confidence test fails:

(1)(1) Remove the power and parallel cable from the DSK.Remove the power and parallel cable from the DSK.

(2)(2) Reset your PC.Reset your PC.

(3)(3) Reconnect the power and the parallel cable.Reconnect the power and the parallel cable.

(4)(4) Invoke CCS.Invoke CCS.

Page 26: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 26

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCSImplement:Implement:

with: with: aaii = {40, 39, …, 1} = {40, 39, …, 1}

xxii = {1, 2, …, 40} = {1, 2, …, 40}

(1)(1) Create a working directory and copy the following files from \Code\Chapter 03 - CCS and DSK\:Create a working directory and copy the following files from \Code\Chapter 03 - CCS and DSK\:

(a)(a) lab3.cdblab3.cdb

(b)(b) lab3.clab3.c

(c)(c) lab3cfg.cmdlab3cfg.cmd

(2)(2) Create a new project:Create a new project:

(a)(a) Start CCS.Start CCS.

(b)(b) Create a new project as shown on the following Create a new project as shown on the following slide.slide.

1

0

N

iiixay

Page 27: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 27

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

Page 28: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 28

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

(3)(3) Add files to the project (lab3.c, lab3.cdb, lab3cfg.cmd).Add files to the project (lab3.c, lab3.cdb, lab3cfg.cmd).

Page 29: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 29

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS

(4)(4) Change the build options (compile and link):Change the build options (compile and link):

Page 30: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 30

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(5)(5) Build the output program (lab3.out):Build the output program (lab3.out):

(a)(a) Build the project by:Build the project by:

(i)(i) Clicking the Rebuild All Clicking the Rebuild All toolbar icon.toolbar icon.

(ii)(ii) Selecting Rebuild All in Selecting Rebuild All in the project menu.the project menu.

(b)(b) Verify that the build output Verify that the build output window is complete with “0 window is complete with “0 errors, 0 warnings”:errors, 0 warnings”:

Page 31: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 31

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(6)(6) Load the output file lab3.out into DSP memory:Load the output file lab3.out into DSP memory:

(a)(a) The program will be automatically loaded The program will be automatically loaded after each project build if the “Program Load after each project build if the “Program Load after Build” option is selected after Build” option is selected as shown below:as shown below:

Page 32: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 32

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(6)(6) Load the output file lab3.out into DSP memory:Load the output file lab3.out into DSP memory:

(b)(b) Load the lab3.out by selecting Load the lab3.out by selecting FFile:Load ile:Load PProgram as shown below:rogram as shown below:

Page 33: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 33

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(a)(a) Go to the beginning of the program, that is Go to the beginning of the program, that is main() by selecting Debug:Go Main.main() by selecting Debug:Go Main.

(b)(b) Watch variables:Watch variables:

(i) (i) Select the variable (to be watched) from the Select the variable (to be watched) from the lab3.c file, right click and select “Add To lab3.c file, right click and select “Add To Watch Window”. If the variable is y for Watch Window”. If the variable is y for instance, the following window will be instance, the following window will be shown.shown.

(ii)(ii) To add another variable to the watch select To add another variable to the watch select it and then drag and drop it on to the it and then drag and drop it on to the window.window.

Page 34: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 34

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(c) (c) CCS will automatically add the local variables:CCS will automatically add the local variables:

Page 35: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 35

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(7)(7) Debug and run code:Debug and run code:

(d) (d) You can run or step through the code by using You can run or step through the code by using the various icons on the toolbar or use the the various icons on the toolbar or use the Debug menu:Debug menu:

Page 36: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 36

(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(a)(a) Stop the processor, reload the code or select Stop the processor, reload the code or select Debug:Restart then select Debug:Go Main.Debug:Restart then select Debug:Go Main.

(b)(b) Open a new profiling session and name it Open a new profiling session and name it “Session 1” and select “Profile All Functions” “Session 1” and select “Profile All Functions” by clicking the following toolbar button:by clicking the following toolbar button:

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(e)(e) Stop the processor from running and watch the Stop the processor from running and watch the variable y:variable y:

y = 0x2cdb or 11480y = 0x2cdb or 11480

Page 37: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 37

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(c)(c) Expand the lab3.c as shown below:Expand the lab3.c as shown below:

Page 38: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 38

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(d)(d) Add a breakpoint at “for(;;);”. This can be Add a breakpoint at “for(;;);”. This can be done by:done by:

(i)(i) Click the cursor on the highlighted line Click the cursor on the highlighted line below.below.

(ii)(ii) Click the “Add Breakpoint” toolbar Click the “Add Breakpoint” toolbar button:button:

Page 39: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 39

Laboratory Exercise: Using CCSLaboratory Exercise: Using CCS(8)(8) Benchmarking and profiling code:Benchmarking and profiling code:

(e)(e) Run the program and examine the profile Run the program and examine the profile window:window:

Page 40: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002

Chapter 3, Slide 40

CCS and DSKCCS and DSK

CCS Overview: CCS Overview: \Links\spru301c.pdf\Links\spru301c.pdf

Resets:Resets: \Links\\Links\ccs_dsk.pdfccs_dsk.pdf

Page 41: Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives

Chapter 3Chapter 3

Code Composer Studio and the DSKCode Composer Studio and the DSK

- End -- End -


Recommended