Uploaded by bou hou

CCS h

advertisement
“Code Composer Studio (CCS)”
Code Composer Studio

The Code Composer Studio (CCS) application
provides an integrated environment with the
following capabilities:






Chapter 4, Slide 2
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.
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: What is a Project?
Project (.PJT) file contains
Project files (by reference):



Source
Libraries
Linker, etc …
Project settings:



Chapter 4, Slide 11
Build configurations
(compiler, asm options)
DSP/BIOS
Linking, etc …
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: (1) Create a new projects
Chapter 4, Slide 12
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Add files to the project
(2) Add files to the project (source, command, library)
Chapter 4, Slide 13
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Compiler Build Options


Nearly one-hundred compiler options available to
tune your code's performance, size, etc.
Following table lists most commonly used options:
debug
optimize
(release)
Chapter 4, Slide 14
Options
Description
-mv6700
-mv6400
-fr <dir>
-q
-g
-s
-o3
-gp
-k
Generate ‘C67x code (‘C62x is default)
Generate 'C64x code
Directory for object/ouput files
Quiet mode (display less info while compiling)
Enables src-level symbolic debugging
Interlist C statements into assembly listing
Invoke optimizer (-o0, -o1, -o2/-o, -o3)
Enable function-level profiling
Keep asm files, but don't interlist
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Two Default Build Configurations
-g -q -fr"c:\modem\Debug" -d"_DEBUG" -mv6700

-q -o3 -fr"c:\modem\Release" -mv6700
Chapter 4, Slide 15
For new projects, CCS
automatically creates two
build configurations:
 Debug
(unoptimized)
 Release
(optimized)
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Two Default Build Configurations
-g -q -fr"c:\modem\Debug" -d"_DEBUG" -mv6700

For new projects, CCS
automatically creates two
build configurations:
 Debug
(unoptimized)
 Release
(optimized)

Use the drop-down to
quickly select build config.
-q -o3 -fr"c:\modem\Release" -mv6700
Chapter 4, Slide 16
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Build Options GUI
-g -q -fr"c:\modem\Debug" -d"_DEBUG" -mv6700



These are the default
build options for a
new project
GUI has 8 pages of
options for code
generation tools
Basic page defaults
are -g -mv6700
Chapter 4, Slide 17
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Linker Options
Options
-o<filename>
-m<filename>
-c
-x
Description
Output file name
Map file name
Auto-initialize global/static C variables
Exhaustively read libs (resolve back ref's)
-q -c -o".\Debug\lab3.out" -x

Like Compiler Options,
Build Configurations also
contain Linker Options

Default linker options are
shown for the Debug
configuration of a project
name lab3.pjt

".\Debug\" indicates one
subfolder level below
project (.pjt) location

Linking discussed in
detail during four-day
workshop
.\Debug\lab3.out
Run-time Autoinitialization
Chapter 4, Slide 18
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Configuration Tool





Chapter 4, Slide 19
Simplifies system design
Automatically includes the
appropriate runtime support libraries
Automatically handles interrupt
vectors and system reset
MEM handles system memory
configuration (builds CMD file)
Many other capabilities will be
discussed later …
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Config Tool
Chapter 4, Slide 20
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Build
(3) Build the output program (lab1.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”:
Chapter 4, Slide 21
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Load Program
(4) Load the output file lab3.out into DSP memory:
(a) Load the lab3.out by selecting File:Load
Program as shown below:
Chapter 4, Slide 22
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Watch variables
(5) 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
lab1.c file, right click and select “Add To
Watch Window”. If the variable is ret for
instance, the following window will be
shown
Chapter 4, Slide 24
(ii) To add another variable to the watch select
it and then drag and drop it on to the
window.
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Watch variables
(5) Debug and run code:
(c) CCS will automatically add the local variables:
Chapter 4, Slide 25
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
LAB: Run / Step
(5) 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:
(e) Stop the processor from running and watch the
variable ret:
ret = 7
Chapter 4, Slide 26
Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002
“Code Composer Studio (CCS)”
- END -
Download