Specifications

Viewing Out-of-Scope Variables
Testing Algorithms and Data from a File
4-13
4.7 Viewing Out-of-Scope Variables
You have used the Watch Window to view and change the values of variables.
Sometimes you want to examine variables when they are not currently in
scope at the current breakpoint. You can do this by using the call stack.
1) Click (Halt) or press Shift F5 to stop the program.
2) Review the volume.c program within Code Composer Studio (or by
looking at section 4.2, page 4-4). Notice that *input is defined in both the
main and processing functions. However, it is not defined within the
dataIO function.
3) In the Volume.c window, put your cursor on the line that says
return;
within the dataIO function.
4) Click the (Toggle Breakpoint) toolbar button or press F9. The line is
highlighted in magenta to indicate that a breakpoint is set (unless you
changed the color using Option
Color).
5) Press F5 to run the program. Code Composer Studio automatically
moves the breakpoint to the next line within that function that corresponds
to an assembly instruction. It displays a message telling you that it has
moved the breakpoint.
6) Click OK.
7) Press F5 until the program stops at the breakpoint at the end of the
dataIO function (instead of at the breakpoint on the call to the dataIO
function).
8) Right-click on the Watch window area and choose Insert New Expression
from the pop-up list.
9) Type
*input
as the Expression and click OK.