Beruflich Dokumente
Kultur Dokumente
DSK6713
Chapter 3, Slide 1 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Learning Objectives
Introduction to Code Composer Studio
(CCS).
Installation and setup of CCS.
Introduction to the DSK.
Laboratory.
Chapter 3, Slide 2 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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 Dahnoun, Bristol University, (c) Texas Instruments 2004
The 6713 DSP Starter Kit (DSK) is a low-cost platform which
lets customers evaluate and develop applications for the Texas
Instruments C67X DSP family. The primary features of the
DSK are:
Chapter 3, Slide 4 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
DSK6713 Block Diagram
Chapter 3, Slide 5 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
6713 DSK
Chapter 3, Slide 6 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
C6713 DSK Memory Map
TMS320C6713 ‘C6713 DSK
0000_0000
8 MB SDRAM
256 kB Internal
Program / Data
FFFF_FFFF
Chapter 3, Slide 7 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
225MHz VLIW DSP core and 256Kbytes of internal
memory. On-chip peripherals include a 32-bit
external memory interface (EMIF) with integrated
SDRAM controller, 2 multi-channel buffered serial
ports (McBSPs), two on-board timers and an
enhanced DMA controller (EDMA).
Chapter 3, Slide 8 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
The 6713 has a significant amount of internal
memory so many applications will have all
code and data on-chip. External accesses are
done through the EMIF which can connect to
both synchronous and asynchronous
memories. The EMIF signals are also brought
out to standard TI expansion bus connectors
so additional functionality can be added on
daughter card modules.
Chapter 3, Slide 9 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
on-board codec called the AIC23. Codec
stands for coder/decoder, the job of the
AIC23 is to code analog input samples into
a digital format for the DSP to process,
then decode data coming out of the DSP to
generate the processed analog output.
Digitial data is sent to and from the codec
on McBSP1.
Chapter 3, Slide 10 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
The DSK has 4 light emitting diodes (LEDs) and 4
DIP switches that allow users to interact with
programs through simple LED displays and user
input on the switches. Many of the included
examples make use of these user interface
options.
Chapter 3, Slide 12 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
The 6713 DSK includes a special device called
a JTAG emulator on-board that can directly
access the register and memory state of the
6713 chip through a standardized JTAG
interface port. When a user wants to monitor
the progress of his program, Code Composer
sends commands to the emulator through its
USB host interface to check on any data the
user is interested in.
Chapter 3, Slide 13 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Debugging method is extremely powerful because
programs can be debugged unobtrusively on real
hardware targets without making any special
provisions for debug like external probes,
software monitors or simulated hardware. When
designing your own hardware around the 6713
you can debug your application with the same
rich functionality of the DSK simply by using Code
Composer with an external emulator and
including a header for the JTAG interface signals.
Chapter 3, Slide 14 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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 15 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(3) Add files to the project (lab3.c, lab3.cdb,
lab3cfg.cmd).
Chapter 3, Slide 16 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(4) Change the build options (compile and link):
Chapter 3, Slide 17 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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 18 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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:
Chapter 3, Slide 19 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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 20 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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
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.
Chapter 3, Slide 21 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(7) Debug and run code:
(c) CCS will automatically add the local
variables:
Chapter 3, Slide 22 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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
Debug menu:
Chapter 3, Slide 23 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(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:
Chapter 3, Slide 24 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(8) Benchmarking and profiling code:
(c) Expand the lab3.c as shown below:
Chapter 3, Slide 25 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
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 26 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Laboratory Exercise: Using CCS
(8) Benchmarking and profiling code:
(e) Run the program and examine the profile
window:
Chapter 3, Slide 27 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
CCS and DSK
CCS Overview:
\Links\spru301c.pdf
Resets:
\Links\ccs_dsk.pdf
Chapter 3, Slide 28 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Debug
Break point
Watch the Variables
View Memory, Registers
View C and Assembly code
Graph the results
Monitor execution time
Step through program (into, over, out)
RTDX – real time data exchange between
DSP board and the PC
Chapter 3, Slide 29 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004
Code Composer Studio and the DSK
- End -
Chapter 3, Slide 30 Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004