Development Flow
2-11
2.3.4 Using
Watch
Windows
The C-SPY Watch Window mechanism permits C variables to be monitored
during the debugging session. Although not originally designed to do so, the
Watch Window mechanism can be extended to monitor assembler variables.
Assume that the variables to watch are defined in RAM, say:
RSEG DATA16_I
varword ds 2 ; two bytes per word
varchar ds 1 ; one byte per character
In C-SPY:
1) Open the Watch Window: VIEW->WATCH
2) Use
DEBUG->QUICK
WATCH
3) To watch varword, enter in the Expression box:
(__data16 unsigned int *) #varword
4) To watch varchar, enter in the Expression box:
(__data16 unsigned char *) #varchar
5) Press the Add Watch button
6) Close the Quick Watch window
7) For the created entry in the Watch Window, click on the + symbol. This will
display the contents (or value) of the watched variable.
To change the format of the displayed variable (default, binary, octal, decimal,
hex, char), select the type, click the right mouse button, and then select the
desired format. The value of the displayed variable can be changed by
selecting it, and then entering the new value.
In C, variables can be watched by selecting them and then dragging-n-dropping
then into the Watch Window.
Since the MSP430 peripherals are memory mapped, it is possible to extend the
concept of watching variables to watching peripherals. Be aware that there may
be side effects when peripherals are read and written by C-SPY. Refer to FAQ,
Debugging #22).
CPU core registers can be specified for watching by preceding their name with
‘#’ (i.e., #PC, #SR, #SP, #R5, etc.).
Variables watched within the Watch Window are only updated when C-SPY
gets control of the device (say, following a breakpoint hit, a single step, or a
STOP/escape).
Although registers can be monitored in the Watch Window, VIEW->REGISTER
is a superior method.
Summary of Contents for MSP-FET430
Page 3: ......
Page 4: ...July 2004 U s e r s G u i d e ...
Page 8: ...vi ...
Page 12: ......
Page 30: ......
Page 52: ...Hardware B 2 Figure B 1 MSP FET430X110 Schematic ...
Page 54: ...Hardware B 4 Figure B 3 MSP FET430IF FET Interface module Schematic ...
Page 63: ...Hardware B 13 Figure B 11 MSP TSPN80 Target Socket module Schematic ...
Page 67: ...Hardware B 17 Figure B 15 MSP FET430UIF USB Interface schematics ...
Page 68: ...Hardware B 18 ...
Page 69: ...Hardware B 19 ...
Page 70: ...Hardware B 20 ...
Page 71: ...Hardware B 21 ...
Page 72: ......
Page 80: ......
Page 90: ......
Page 95: ...MSP FET430UIF Installation Guide F 5 Figure F 5 Device Manager ...