lecture 3 code composer studio and the dsk6416. 2 learning objectives introduction to code composer...

62
Lecture 3 Code Composer Studio and the DSK6416

Upload: mildred-mason

Post on 23-Dec-2015

245 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

Lecture 3

Code Composer Studio and the DSK6416

Page 2: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

2

Learning Objectives

• Introduction to Code Composer Studio (CCS).• Installation and setup of CCS.• Introduction to the DSK.• Laboratory.

Page 3: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

3

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 visualization.

Page 4: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

4

CCS Installation and Setup

(A) Insert CD and Install the CCS Software.

(B) Connect DSK to Power and USB and Run CCS Setup (do not remove CD):

– Start CCS setup utility by using the following desktop icon:

– Alternatively:• Windows Start Menu -> Programs -> Texas Instruments -> Code

Composer Studio 3.1 (‘C6000) -> Setup Code Composer Studio 3.1

• Run cc_setup.exe located in: c:\CCStudio_v3.1\cc\bin\

Setup CCS 2.lnk

Page 5: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

5

CCS Installation and Setup

(C) After Installation you should see the following icons:

Page 6: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

6

CCS Installation and Setup

• You should now see a screen similar to this:

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

Page 7: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

7

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:– Select the C6416DSK Port x y Mode.– The port number, x, and port mode, y, depend on your PC setup.

Page 8: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

8

CCS Installation and Setup

• Finally save and quit the import configuration dialog box.

Page 9: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

9

Testing Your Connection

• If you want to test your DSK and USB connection you can launch the C6416 DSK Diagnostic Utility from the icon on your desktop.

• From the diagnostic utility, press the start button to run the diagnostics. In approximately 30 seconds all the on-screen test indicators should turn green.

Page 10: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

10

Testing Your Connection

Page 11: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

11

CCS Setup - Simulator

Page 12: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

12

CCS Setup - Simulator

Page 13: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

13

CCS Setup - DSK

Page 14: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

14

• 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:\CCStudio_v3.1\cc\bin\

Using CCS

CCS 2.lnk

Page 15: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

15

Troubleshooting

• If the following window appears on your screen then:– Check that the DSK is connected properly and powered up.– Check if the port address and mode is correct

Page 16: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

16

Starting CCS

Page 17: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

17

Connecting DSK Board to CCS Studio

Page 18: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

18

Software: (1) DSK Help

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

Page 19: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

19

Software: (2) PC 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 20: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

20

Software: (3) PC DSK Communications

DSPDSP

JTAGJTAG

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

JTAGJTAGEmulationEmulation

PortPort

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

You can use RTDXYou can use RTDX

Use USBUse USB

Communicate from MATLAB (SIMULINK)Communicate from MATLAB (SIMULINK)

Note: Limited data rate up to 2MB/Sec.Note: Limited data rate up to 2MB/Sec.

Page 21: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

21

Software: (4) PC 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 communications:

Page 22: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

22

Software (5): Project Management

• Intuitive organization– Drag & drop– Fast access– Easy file manipulation

• Graphically configurebuild options– Saved with each project

Page 23: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

23

Software: Program Code Editing Features

Code Composer Studio allows you to edit C and assembly source code together.

The integrated editor provides support for the following activities:

o Highlight of keywords, comments, and strings in coloro Mark C blocks in parentheses and braces, parenthesis or brace matchingo File Find and replace, and quick searcho Context-sensitive helpo Custom key commands

Page 24: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

24

Software: Edit and Build with CCS

Page 25: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

25

Software: Debugger in CCS

• Debugging is optimized for DSP

– C expression based conditional breakpoints

– Advanced breakpoints

– View source and dis-assembly simultaneously

• C and Assembly debugging

• Advanced Watch Window

• Multi-processor debug

– Global breakpoints

– Synchronized control over groups

Page 26: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

26

Software: What is DSP/BIOS?

• A scalable real-time kernel for applications– Real-time scheduling and synchronization– Host-to-target communication– Real-time instrumentation

• DSP/BIOS provides– Preemptive multi-threading, hardware abstraction, real-time analysis, and

configuration tools• Packaged as a set of modules that can be linked into an application• Integrated with CCSTM, requires no runtime fees, and is fully supported by TI• Supports the TMS320C6000 DSP platform• DSP/BIOS Users’ Guide SPRU303B.PDF

Page 27: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

27

Software: eXpress DSP Support Libraries

1. Chip Support Library (CSL)2. Board Support Library (BSL)

– DSK version– EVM version

3. DSPLIB– C62x version– C64x version

4. Image/Video Library (IMGLIB)– C62x version– C64x version

Page 28: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

28

Software: Chip Support Library (CSL)

• Provides a C-language interface for configuring and controlling on-chip peripherals.

• It consists of discrete modules that are built and archived into a library file.

• Each module relates to a single peripheral with the exception of several modules that provide general programming sup-port, such as the interrupt request (IRQ) module which contains APIs for interrupt management, and the CHIP module which allows the global setting of the chip.

• SPRU401.PDF

Page 29: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

29

Software: Chip Support Library (CSL)

Page 30: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

30

Software: DSK Board Support Library (BSL)

• BSL is a set of APIs used to configure and control all on-board devices

• To make it easier for developers by eliminating much of the tedious grunt-work usually needed to get algorithms up and running in a real system

Page 31: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

31

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

Link: Link: Reference Manual

Page 32: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

32

Kit Contents

Page 33: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

33

TMS320C6416 DSK Hardware

USB

CPU

Supply +5V LEDs

Switches

Mic In Line In Headphones Expansion

JTAG

Codec

RAM

Line Out

Sw3Reset

Page 34: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

34

Typical C6416 DSK Setup

USB to PC to +5V

Headphones Microphone

Page 35: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

35

DSK6416 Block Diagram

Page 36: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

36

TMS320C6416 DSP Starter Kit (DSK)

'C6416 DSK Block Diagram

Daughter CardDaughter Card

Roomfor

Expansion

SDRAM(16 MB)

CE2

CE3

Flash ROM(512 kB)

CPLDCE1

CE0

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, LED’s, etc.)

L2 RAM

Prog/Data

(1 MB)CPU

EMIFA

EMIFB

ProgramCache

DataCache

CE0

Page 37: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

37

C6416 DSK Memory Map

CPLD:LED’sDIP SwitchesDSK statusDSK rev#Daughter Card

0000_0000Internal RAM: 1 MB Internal RAM: 1MB

0010_0000 Internal Peripherals or reserved

Internal Peripherals or reserved

6000_0000EMIFB CE0: 64 MB CPLD

6400_0000EMIFB CE1: 64 MB Flash: 512 kB

6800_0000EMIFB CE2: 64 MB

6C00_0000EMIFB CE3: 64 MB

8000_0000EMIFA CE0: 256 MB SDRAM: 16 MB

9000_0000EMIFA CE1: 256 MB

A000_0000EMIFA CE2: 256 MB

Daughter CardB000_0000EMIFA CE3: 256 MB

TMS320C6416 C6416 DSK

Page 38: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

38

DSK6416 Block Diagram

Switch SW3Switch SW3

Page 39: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

39

DSK6416 Block Diagram

Page 40: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

40

Laboratory Exercise: DSK Hardware Setup

(1) Connect the following cables:– USB.– Audio cables.

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

(3) A . If using the DSK6416

Configure and test the DSK with the utilities shown below:

Page 41: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

41

Laboratory exercise: DSK Hardware Setup

Notes:• The SDRAM may take a while due to the large amount of SDRAM on the ‘C6416 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.

Page 42: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

42

Laboratory Exercise (hello64): Using CCS

• First Project• Hello World!

#include <stdio.h>#include <stdio.h>

void main()void main()

{{

int nTarget = 0;int nTarget = 0;

printf("Hello, CCStudio Scripting World!\n");printf("Hello, CCStudio Scripting World!\n");

nTarget = 0x64;nTarget = 0x64;

printf("We are a C%x!\n", nTarget);printf("We are a C%x!\n", nTarget);

}}

(1) Create a working directory and copy the following files from \Lab03\Code\Hello64:

(a) rts6400.lib

(b) hello.c

(c) lnk.cmd

(d) vectors.asm

(2) Create a new project (Hello64):

(a) Start CCS.

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

Page 43: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

43

Laboratory Exercise (dotp64): Using CCS

Implement:

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

xi = {1, 2, …, 40}

(1)Create a working directory and copy the following files from \Lab03\Code\Dotp64:

(a) rts6400.lib

(b) dotp.c

(c) lnk.cmd

(d) vectors.asm

(2)Create a new project (Dotp64):

(a) Start CCS.

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

1

0

N

iiixay

Page 44: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

44

Laboratory Exercise (dotp64): Using CCS

Note: When you type in the “Project Name” a directory is created in the “Location”. Note: When you type in the “Project Name” a directory is created in the “Location”.

Delete this if not required.Delete this if not required.

Page 45: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

45

Laboratory Exercise (dotp64): Using CCS

(3)Add files to the project (dotp.c, lnk.cmd, vectors.asm, rts6400.lib).

Page 46: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

46

Laboratory Exercise (dotp64): Using CCS

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

Page 47: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

47

Laboratory Exercise (dotp64): Using CCS

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

Page 48: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

48

Laboratory Exercise (dotp64): Using CCS

(5) Build the output program (dotp64.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 menuCCS menu

Page 49: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

49

Laboratory Exercise (dotp64): Using CCS

(6)Load the output file Dotp64.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:

Page 50: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

50

Laboratory Exercise (dotp64): Using CCS

(6)Load the output file dotp64.out into DSP memory:

(b) Load the dotp64.out by selecting File:Load Program as shown below:

Page 51: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

51

Laboratory Exercise (dotp64): 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 dotp64.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.

Page 52: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

52

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

(c) CCS will automatically add the local variables:

Page 53: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

53

Laboratory Exercise (dotp64): 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 Debug menu:

Page 54: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

54

(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 select “Profile All Functions” by clicking the following toolbar button:

Laboratory Exercise (dotp64): Using CCS

(e) Stop the processor from running and watch the variable y:

y = 0x2cdb or 11480

Page 55: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

55

Laboratory Exercise (dotp64): Using CCS

(8)Benchmarking and profiling code:

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

Page 56: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

56

Laboratory Exercise (dotp64): 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:

Page 57: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

57

Laboratory Exercise (dotp64): Using CCS

(8)Benchmarking and profiling code:

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

Page 58: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

58

Profiling

• Profiling allows you to obtain an average, maximum, and minimum cycle count for blocks of code. Multiple functions, loops, and ranges can all be profiled at the same time. Code Composer will provide you with many readings. The figure used in our DSP lab is the 'CPU Cycles: Incl. Max".

• The instructions to set profile points and obtain a cycle count for a piece of code:

– View the profiling windows by selecting Profile->Setup and Profile->Viewer. – Load the program onto the DSP. – Click on the Stopwatch symbol in the Profiling Setup window on the right to enable

profiling. – Select the 'Ranges' tab in the Profiling Setup window. – Highlight the range of code you would like to obtain the cycle count for and drag it

to the 'Ranges' menu. (Another way to do the same is to highlight those lines, right click, and select Profile -> Range.)

– Run the code for a while for Code Composer to collect data. – The default stats shown do not include what we are looking for. In the profiler

viewer window, right click on the address range you would like stats for and select 'Columns and Rows Setting'. Different counts can be shown, but 'CPU Cycles: Incl. Max.' is probably the most important.

Page 59: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

59

Laboratory Exercise (Lab1): Using CCS

• Open Project: Lab1• (Lab03\Project\Lab1\)• Run• Use Graphics

Page 60: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

60

Laboratory Exercise (Lab1): Using CCS

• Watch Value it’s nice, but• Graphic Display is better!

Page 61: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

61

CCS and DSK

• CCS Overview: – \Links\spru327c.pdf

Page 62: Lecture 3 Code Composer Studio and the DSK6416. 2 Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction

Chapter 3

Code Composer Studio and the DSK

- End -