Professional Documents
Culture Documents
1
Code Composer Studio® IDE
Menus or Icons Help CPU
Project Manager: Window
¾Source & object files
¾File dependencies
¾Compiler, Assembler
& Linker build options
Productive Editor:
¾Structure Expansion Status Watch window Graph
window Memory window
window
2
Code Composer Studio
Build SIM
Compile lnk.cmd Probe In
eZdsp™
Asm Link Debug
EVM
DSP/BIOS
DSP/BIOS Probe Out
Edit Config Third
Libraries Graphs
Tool Party
Profiling
XDS
• Code Composer Studio includes:
– Integrated Edit/Debug GUI
– Code Generation Tools DSP
– DSP/BIOS
Board
3
Code Composer Studio: IDE
4
The CCS Project
Project (.pjt) files contain:
5
Build Options GUI - Compiler
6
Build Options GUI - Linker
7
Default Build Configurations
• For new projects, CCS automatically
creates two build configurations:
– Debug (unoptimized)
– Release (optimized)
• Use the drop-down menu to quickly
select the build configuration
8
eZdsp™ F2812 Hardware
JTAG Interface (P1) EXPANSION SRAM
Data & Address (P2) 64K x 16
Parallel Port/
JTAG
Controller
Interface (P3)
25 pin male
D-sub connector
(Plugs into parallel
port on PC)
25 Conductor Cable
eZdsp™ F2812
25 pin male
D-sub connector
Power
Supply
8 x switch
8 x LED
1 CAN - Transceiver ( TJA 1054 )
1 Loudspeaker
2 x push- button
2 potentiometers 1 SCI - Transceiver (MAX 232)
12
1. The Startup - Window
Project-
tree
Working
Area
13
2. Create a F28x - project
• Project ==> New
give your project a name : “Lab1”, select a target and a suitable
location of your hard disk:
Note : the project file (“Lab1.pjt) is a plain ASCII-text file and stores
all set-ups and options of the project. This is very useful for a version
management.
14
2. Create a F28x - project (cont.)
• Write a C-Source Code :
ÎFile ÎNew ÎSource File
unsigned int k;
void main (void)
{
unsigned int i;
while(1)
{
for (i=0;i<100;i++)
k=i*i;
}
}
15
2. Create a F28x - project (cont.)
16
2. Create a F28x - project (cont.)
• Add your file to the project :
– Î Project Î Add files to project
– Add: “lab1.c”
17
2. Create a F28x - project (cont.)
19
Placing Sections in Memory
Memory
Sections
0x00 0000 M0SARAM
(0x400)
.ebss
0x00 0400 M1SARAM
(0x400)
.stack
.text
20
Linking
zz Memory
Memorydescription
description
zz How
Howto
toplace
places/w
s/winto
intoh/w
h/w
name.cmd
.map
21
Linker Command File
MEMORY
{
PAGE 0: /* Program Space */
FLASH: org = 0x3D8000, len = 0x20000
SECTIONS
{
.text: > FLASH PAGE 0
.ebss: > M0SARAM PAGE 1
.cinit: > FLASH PAGE 0
.stack: > M1SARAM PAGE 1
}
22
2. Create a F28x - project (cont.)
– Note: a new binary code can be downloaded automatically into the target. This
is done by Î Option Î Customize Î Program Load Options ÎLoad Program
after Build. This setup will be stored for permanently.
Î Debug Î Go main
23
2. Create a F28x - project (cont.)
yellow arrow :
current PC
24
3. Debug your code !
• Perform a real time run :
Î Debug Î Run (F5)
Note 2: the yellow arrow is no longer visible – that’s another sign of a real time
run.
25
4. Watch your variables
• note : with the column ‘radix’ one can adjust the data format
between decimal, hexadecimal, binary etc.
26
4. Watch your variables
Watch-
Window
27
5. Perform a Single Step Debug
28
5. Perform a Single Step Debug
Step Out
29
6. Adding a Breakpoint
• Set a Breakpoint :
– Place the Cursor in Lab1.c on line : k = i * i;
– Click right mouse and select ‘Toggle Breakpoint’
– the line is marked with a red dot ( = active breakpoint )
Note : most Code Composer Studio Commands are also available through buttons
or trough Command -Keys ( see manual, or help )
Remove all
Breakpoints
31
7. Set a Probe Point
• Causes an update of a particular window at a specific point in your
program.
• Run the program and verify that the watch window is updated
continuously.
32
7. Set a Probe Point (cont.)
33
8. Other View Commands
– double click on line ‘ACC’ and modify the value inside the Accumulator ACC
34
8. Other View Commands (cont.)
Current
C - line
Current
Instruction
36
9. GEL - General Extension Language
• language similar to C
• lets you create functions to extend Code Composer's features
• to create GEL functions use the GEL grammar
• load GEL-files into Code Composer
37