Sunteți pe pagina 1din 50

Chapter 3

Code Composer Studio and the DSKs


DSK6711, DSK6713 and DSK6416

Learning Objectives

Chapter 3, Slide 2

Introduction to Code Composer Studio


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

Dr. Naim

Code Composer Studio

The Code Composer Studio (CCS) application provides an integrated environment with the
following capabilities:

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

Chapter 3, Slide 3

Dr. Naim

CCS Installation and Setup


(A) Install the CCS Software.
(B)Run CCS Setup:

Start CCS setup utility by using the following desktop icon:

Alternatively:

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\

Setup CCS 2.lnk

Chapter 3, Slide 4

Dr. Naim

CCS Installation and Setup

You should now see a screen similar to this:

Note: If you dont see the Import Configuration dialog box you should open it
from the menu using: File:Import.
Chapter 3, Slide 5

Dr. Naim

CCS Installation and Setup

You can clear the previous configuration by selecting the


configuration you wish to clear and clicking the clear button.
Next select a new configuration that you would like to add:

Chapter 3, Slide 6

Select the C6x11DSK Port x y Mode.


The port number, x, and port mode, y, depend on your PC setup.

Dr. Naim

CCS Installation and Setup

Chapter 3, Slide 7

If you do not know your configuration


then you can select it automatically using
the Configure C6x11 DSK Utility.

Dr. Naim

CCS Installation and Setup

Chapter 3, Slide 8

Finally save and quit the import


configuration dialog box.

Dr. Naim

Using CCS

Start CCS by either:

Using the desktop icon:

Start -> Programs -> Texas Instruments -> Code Composer Studio 2 ->
Code Composer Studio.
Run cc_app.exe in c:\ti\cc\bin\

Chapter 3, Slide 9

CCS 2.lnk

Dr. Naim

Troubleshooting

If the following window appears on your screen then:

Chapter 3, Slide 10

Check that the DSK is connected properly and powered up.


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

Dr. Naim

Introduction to the C6711 DSK

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


The DSK comes with CCS code development tools (does not include the
simulator).
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.

Chapter 3, Slide 11

Dr. Naim

DSK6711 Contents
Hardware (Schematics)

150 MHz C6711 DSP


TI 16-bit A/D Converter (AD535)
External Memory

16 MB SDRAM
128 kB Flash ROM

LEDs
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

Chapter 3, Slide 12

Power-on Self Test


Flash Utility Program
Board Confidence Test
Host access via DLL
Sample Program(s)
Dr. Naim

Hardware: (1) Overview

The daughter card interface socket provides a


method for accessing most of the C6711 DSP for
hardware extension.
1.8V Power Supply

16M SDRAM

128K FLASH

Daughter Card I/F


(EMIF Connector)

Parallel
Port I/F
TMS320C6711
Power
Jack

D. Card I/F
(Periph Con.)

Power
LED

User DIP
switches
3.3V Power Supply
JTAG Header

Chapter 3, Slide 13

C6711
DSP

Reset
Emulation
JTAG Controller

Three User LEDs


16-bit codec (A/D & D/A)
Line Level Input (microphone)
Line Level Output (speakers)
Dr. Naim

Hardware: (2) DSK Connections


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

Parallel Cable

Power
Supply

External
Power
Supply

DSK

Line-level Output
Line-level Input

PC

XDS

(B) JTAG: An XDS JTAG emulator connected to the PC


(either internal or external) is connected to the JTAG
header on the DSK.
JTAG

DSK
Power
Supply

Chapter 3, Slide 14

External
Power
Supply
Line-level Output
Line-level Input
Dr. Naim

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

There are three LEDs to provide the user with


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

Test
0
1
2
3
4
5
6
7
Chapter 3, Slide 15

LED 3 LED 2
0
0
0
0
0
1
0
1
1
0
1
0
1
1
1
1
BLINK ALL

LED 1 Description
0
Start state
1
DSP internal SRAM test
0
External SDRAM test
1
DSP McBSP0 loop back test
0
External codec read/write test
1
External codec tone generation test
0
External LED and DSP timer test
1
Unused available for future test use
All tests completed successfully
Dr. Naim

Hardware: (4) Resets


CCS Reset
Menu selection:
DebugDSP Reset
Resets C6711 DSP
Causes bootload
from FLASH which
overwrites internal
memory
TMS320C6711

Absolute Reset
On rare occasions you
might have to:
Pull power jack
Pull parallel port

Apply Power
POST runs

Chapter 3, Slide 16

Reset Pushbutton
Dont 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
Dont start CCS until end
(all 3 LEDs flash at the end)
If switches are set to 0100, a fast version of
POST is run
Dr. Naim

Hardware: (5) Memory Maps


TMS320C6711
0000_0000

64 kB Internal

C6711 DSK
16 MB SDRAM

(Program or Data)
0180_0000

On-chip Periph

128 kB FLASH
4 byte I/O Port

8000_0000
9000_0000
A000_0000

128 MB External

B000_0000

128 MB External

LEDs

Switches

128 MB External
128 MB External

9008_0000
DSK status
DSK rev#
Daughter Card

Available via
Daughter Card
Connector

FFFF_FFFF

Chapter 3, Slide 17

Dr. Naim

Hardware: (5) Memory Maps DK6711


Description
Internal RAM (L2) mem
EMIF control regs
Cache configuration reg
L2 base addr & count regs
L1 base addr & count regs
L2 flush & clean regs
CE0 mem attribute regs
CE1 mem attribute regs
CE2 mem attribute regs
CE3 mem attribute regs
HPI control reg
McBSP0 regs
McBSP1 regs
Timer0 regs
Timer1 regs
Interrupt selector regs
EDMA parameter RAM
EDMA control regs
QDMA regs
QDMA pseudo-regs
McBSP0 data
McBSP1 data
CE0, SDRAM, 16 MB
CE1, 8-bit ROM, 128 kB
CE1, 8-bit I/O port
CE2 Daughter card
CE3 Daughter card
Chapter 3, Slide 18

Origin
0x00000000
0x01800000
0x01840000
0x01844000
0x01844020
0x01845000
0x01848200
0x01848240
0x01848280
0x018482c0
0x01880000
0x018c0000
0x01900000
0x01940000
0x01980000
0x019c0000
0x01a00000
0x01a0ffe0
0x02000000
0x02000020
0x30000000
0x34000000
0x80000000
0x90000000
0x90080000
0xA0000000
0xB0000000

Length
0x00010000
0x00000024
0x00000004
0x00000020
0x00000020
0x00000008
0x00000010
0x00000010
0x00000010
0x00000010
0x00000004
0x00000028
0x00000028
0x0000000c
0x0000000c
0x0000000c
0x00000800
0x00000020
0x00000014
0x00000014
0x04000000
0x04000000
0x01000000
0x00020000
0x00000004
0x10000000
0x10000000
Dr. Naim

Software: (1) PC Host Utilities


DSK Loader

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

FLASH Programming

hex6x.exe
flash.exe

f.out h.cmd
f.hex

First, convert file.out to file.hex


The flash utility downloads the hex file into the on-DSK FLASH
Both programs run on the PC host.
Links\SPRA804.pdf

DSK Confidence Test

dsk6ldr.exe filename.out

dsk6xtst

Run from MSDOS prompt


Command-line utility tests proper installation of the DSK board
Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Timers,
EDMA, LEDs and Audio codec

Chapter 3, Slide 19

Dr. Naim

Software: (2) CCS DSK Utilities


Confidence Test

Quick Test

1. Unload any gel files already


loaded in CCS
2. Load conftest.gel
3. Run confidence tests from
GEL menu

General Extension Language (GEL):

Run from CCS GEL menu


Defined in dsk6xinit.gel
Non-intrusive test by reading
and writing:
LEDs
Switches
DSK board revision
Outputs switch values

An interpretive language that enables


you to write functions to configure the
IDE and access the target processor.

Chapter 3, Slide 20

Dr. Naim

Software: (3) DSK Help

DSK6711 help is available via the Help menu


Chapter 3, Slide 21 in CCS.

Dr. Naim

Software: (4) PC DSK Communications


CCS uses parallel port to control DSP via JTAG port
You can use full TI eXtended Dev System (XDS) via 14 pin
header connector
Communicate from Windows program (C++, VB) via
parallel port using Win32 DLL

Use HPI via Win32 DLL

DSP

JTAG

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

JTAG
Emulation
Port

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

Chapter 3, Slide 22

Dr. Naim

Software: (4) PC DSK Communications

Win32 API functions for Host to DSK


communications:

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

Chapter 3, Slide 23

Dr. Naim

TMS320C6713 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 TIs TMS320C6000 floating point DSP
generation.

Link: tmdsdsk6713.html
Link: Reference Manual
Chapter 3, Slide 24

Dr. Naim

'C6713 DSK Block Diagram


CE0

Program
Cache

SDRAM
(8 MB)

CPU

Internal
Memory

EMIF
CE1

Flash ROM
Data
Cache

Chapter 3, Slide 25

(256 kB)

I/O Port

Daughter
DaughterCard
Card
CE2

Room
for
Expansion
CE3

DSK uses all four External Memory regions


CE0 for SDRAM
CE1 for Flash Memory and I/O Port (switches, LEDs, etc.)
CE2 and CE3 pinned-out to daughter card connector
Dr. Naim

DSK6713 Block Diagram

Chapter 3, Slide 26

Dr. Naim

C6713 DSK Memory Map


TMS320C6713
0000_0000

256 kB Internal

C6713 DSK
8 MB SDRAM

Program / Data
0180_0000

Peripheral Regs

256 kB FLASH
CPLD

8000_0000

128 MB External

9000_0000

128 MB External

A000_0000

128 MB External

B000_0000

128 MB External

Available via
Daughter Card
Connector

9008_0000
CPLD:
LEDs
DIP Switches
DSK status
DSK rev#
Daughter Card

FFFF_FFFF
Chapter 3, Slide 27

Dr. Naim

TMS320C6416 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 TIs TMS320C64x DSP generation.
The kit uses USB communications for true plug-and-play
functionality.

Link: tmdsdsk6416.html
Link: Reference Manual
Chapter 3, Slide 28

Dr. Naim

'C6416 DSK Block Diagram


CE0

Program
Cache

CPU
Data
Cache

Chapter 3, Slide 29

CPLD

L2 RAM
Prog/Data
(1 MB)

CE1

EMIFB

Flash ROM

EMIFA

CE0

(512 kB)

Daughter
DaughterCard
Card
CE2

Room
for
Expansion

TMS320C6416 DSP SDRAM


Starter Kit (DSK)
CE3
(16 MB)

DSK uses both EMIFs (A and B)


EMIFA
CE0 for SDRAM
CE2 and CE3 pinned-out to daughter card connector
EMIFB
CE1 for Flash Memory and CPLD (switches, LEDs, etc.)
Dr. Naim

DSK6416 Block Diagram

Chapter 3, Slide 30

Dr. Naim

C6416 DSK Memory Map


TMS320C6416

C6416 DSK

0000_0000

Internal RAM: 1 MB

Internal RAM: 1MB

0010_0000

Internal Peripherals
or reserved

Internal Peripherals
or reserved

6000_0000

EMIFB CE0: 64 MB

CPLD

6400_0000

EMIFB CE1: 64 MB

6800_0000

EMIFB CE2: 64 MB

6C00_0000

EMIFB CE3: 64 MB

8000_0000

EMIFA CE0: 256 MB

9000_0000

EMIFA CE1: 256 MB

A000_0000

EMIFA CE2: 256 MB

B000_0000
Chapter 3, Slide 31

EMIFA CE3: 256 MB

Flash: 512 kB

CPLD:
LEDs
DIP Switches
DSK status
DSK rev#
Daughter Card

SDRAM: 16 MB

Daughter Card
Dr. Naim

Laboratory Exercise: DSK Hardware Setup


(1) Connect the following
cables:
Parallel port.

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

(3) A . If using the DSK6711


Configure and test the DSK with the utilities shown below:

Chapter 3, Slide 32

Dr. Naim

Laboratory Exercise: DSK Hardware Setup


(3) B . If you are using the DSK6713 or DSK6416
Use the Diagnostics Utilities show below:

Chapter 3, Slide 33

Dr. Naim

Laboratory exercise: DSK hardware setup


Notes:
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.
If the confidence test fails:
(1) Remove the power and parallel cable from the DSK.
(2) Reset your PC.
(3) Reconnect the power and the parallel cable.
(4) Invoke CCS.

Chapter 3, Slide 34

Dr. Naim

Laboratory Exercise: Using CCS


Implement:
with: ai = {40, 39, , 1}
xi = {1, 2, , 40}

N 1

a x

i i

i 0

(1) Create a working directory and copy the following files from \Code\Chapter 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.

Chapter 3, Slide 35

Dr. Naim

Laboratory Exercise: Using CCS

Note: When you type in the Project Name a directory is created in the Location.
Delete this if not required.
Chapter 3, Slide 36

Dr. Naim

Laboratory Exercise: Using CCS


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

Chapter 3, Slide 37

Dr. Naim

Laboratory Exercise: Using CCS


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

Chapter 3, Slide 38

Dr. Naim

Laboratory Exercise: Using CCS


(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:

CCS menu

Chapter 3, Slide 39

Dr. Naim

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

Chapter 3, Slide 40

after Build option is selected as shown below:

Dr. Naim

Laboratory Exercise: Using CCS


(6) Load the output file lab3.out into DSP memory:
(b) Load the lab3.out by selecting File:Load Program as shown below:

Chapter 3, Slide 41

Dr. Naim

Laboratory Exercise: Using CCS


(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

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

Chapter 3, Slide 42

instance, the following window will be shown.

window.

Dr. Naim

Laboratory Exercise: Using CCS


(7) Debug and run code:
(c) CCS will automatically add the local variables:

Chapter 3, Slide 43

Dr. Naim

Laboratory Exercise: Using CCS


(7) Debug and run code:
(d) You can run or step through the code by using

Chapter 3, Slide 44

the various icons on the toolbar or use the Debug menu:

Dr. Naim

Laboratory Exercise: Using CCS


(e) Stop the processor from running and watch the
y = 0x2cdb or 11480

variable y:

(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:

Chapter 3, Slide 45

Dr. Naim

Laboratory Exercise: Using CCS


(8) Benchmarking and profiling code:
(c) Expand the lab3.c as shown below:

Chapter 3, Slide 46

Dr. Naim

Laboratory Exercise: Using CCS


(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:

Chapter 3, Slide 47

Dr. Naim

Laboratory Exercise: Using CCS


(8) Benchmarking and profiling code:
(e) Run the program and examine the profile window:

Chapter 3, Slide 48

Dr. Naim

CCS and DSK

CCS Overview:

Resets:

Chapter 3, Slide 49

\Links\spru301c.pdf
\Links\ccs_dsk.pdf

Dr. Naim

Chapter 3
Code Composer Studio and the DSK
- End -

S-ar putea să vă placă și