EasyManuals Logo

Texas Instruments C2000 Workshop Guide And Lab Manual

Texas Instruments C2000
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #41 background imageLoading...
Page #41 background image
Lab 2: Linker Command File
C2000 Microcontroller Workshop - Programming Development Environment 2 - 23
Debug Environment Windows
It is standard debug practice to watch local and global variables while debugging code. There
are various methods for doing this in Code Composer Studio. We will examine two of them
here: memory browser, and expressions.
23. Open a “Memory Browserto view the global variable “z”.
Click: View Memory Browser on the menu bar.
Type &z into the address field, select “Data” memory page, and then select Go. Note
that you must use the ampersand (meaning “address of”) when using a symbol in a
memory browser address box. Also note that CCS is case sensitive.
Set the properties format to “Hex 16 Bit – TI Style Hexin the browser. This will give
you more viewable data in the browser. You can change the contents of any address in
the memory browser by double-clicking on its value. This is useful during debug.
24. Notice theVariables” window automatically opened and the local variables x and y are
present. The variables window will always contain the local variables for the code
function currently being executed.
(Note that local variables actually live on the stack. You can also view local variables in
a memory browser by setting the address to “SP” after the code function has been
entered).
25. We can also add global variables to the “Expressions” window if desired. Let's add the
global variable “z”.
Click the “Expressions” tab at the top of the window. In the empty box in the
“Expression” column (Add new expression), type z and then enter. An ampersand is not
used here. The expressions window knows you are specifying a symbol. (Note that the
expressions window can be manually opened by clicking: View Expressions on
the menu bar).
Check that the expressions window and memory browser both report the same value for
z”. Try changing the value in one window, and notice that the value also changes in the
other window.
Single-stepping the Code
26. Click the “Variables” tab at the top of the window to watch the local variables. Single-
step through main() by using the <F5> key (or you can use the Step Into button on
the horizontal toolbar). Check to see if the program is working as expected. What is the
value forzwhen you get to the end of the program?
Terminate Debug Session and Close Project
27. The Terminate button will terminate the active debug session, close the debugger and
return CCS to theCCS Edit Perspective” view.
Click: Run Terminate or use the Terminate icon:

Table of Contents

Other manuals for Texas Instruments C2000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C2000 and is the answer not in the manual?

Texas Instruments C2000 Specifications

General IconGeneral
BrandTexas Instruments
ModelC2000
CategoryMicrocontrollers
LanguageEnglish

Related product manuals