Texas Instruments MSP-FET430 manual Using Watch Windows

Page 29

Development Flow

2.3.4Using 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.

2-11

Image 29
Contents 2004 Users GuideImportant Notice Page July About This Manual How to Use This ManualRead This First Related Documentation From Texas Instruments Information About Cautions and WarningsFCC Warning If You Need AssistancePage Contents Frequently Asked Questions Tables FiguresPage Topic Get Started NowKit Contents, MSP-FET430X110 Hardware Installation, MSP-FET430X110 Kit Contents, MSP-FET430UIFSoftware Installation Flashing the LED Hardware Installation, USB-IF, MSP-FET430UIFGet Started Now Important MSP430 Documents on the CD-ROM and WEB Development Flow Overview Using KickstartOUTPUT-OUTPUT FILE-EXECUTABLE Project SettingsFactory Settings Creating a Project from Scratch Stack Management within the .xcl Files Using an Existing IAR V1.x/V2.x ProjectOverview of Example Programs How to Generate Texas Instrument .TXT and other format FilesDevelopment Flow Breakpoint Types Using C-SPYUsing Breakpoints Using Single Step Using Watch Windows Page Design Considerations for In-Circuit Programming External Power Bootstrap LoaderDesign Considerations for In-Circuit Programming PRGS430 Device SignalsDesign Considerations for In-Circuit Programming Signal connections for MSP-FET430X110 Design Considerations for In-Circuit Programming Jtag Signal Connections Frequently Asked Questions Hardware Program Development Assembler, C-Compiler, Linker Should Done or Not Return Omit OPTIONS-FET DEBUGGER-CONNECTIONS Debugging C-SPYFrequently Asked Questions Figure A-1. Modification to FET Interface module Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Frequently Asked Questions Hardware Figure B-1. MSP-FET430X110, SchematicFigure B-1. MSP-FET430X110, Schematic Figure B-2. MSP-FET430X110, PCB Pictorials Figure B-3. MSP-FET430IF FET Interface module, Schematic Figure B-4. MSP-FET430IF FET Interface module, PCB Pictorial Figure B-5. MSP-TS430DW28 Target Socket module, Schematic LED connected to P1.0 Hardware Jumper J7 Jumper J6Open to measure current Hardware Jumper J6 Open to disconnect LED History of changes to MSP-TS430PM64 Target Socket module Figure B-11. MSP-TSPN80 Target Socket module, Schematic Figure B-12. MSP-TSPN80 Target Socket module, PCB Pictorials Figure B-13. MSP-TSPZ100 Target Socket module, Schematic Jumper J6 Figure B-15. MSP-FET430UIF USB Interface schematics Hardware Hardware Hardware Hardware Page FET Specific Menus Emulator EMULATOR-POWER on Reset EMULATOR-FORCE Single Stepping EMULATOR-GIE on/offPin MSP430F44x and MSP430F43x Device Emulation Table D-1. F4xx/80-pin Signal Mapping P1.5/TACLK/ACLK P1.4/TBCLK/SMCLK P1.3/TBOUTH/SVSOUT Page TI to IAR 2.x/3.x Assembler Migration Translating Asm430 Assembler Directives to A430 Directives Segment ControlIntroduction Character stringsDescription Asm430 Directive TI A430 Directive IAR Section Control DirectivesListing Control Directives Constant Initialization DirectivesFile Reference Directives Conditional-Assembly DirectivesReptc Symbol Control DirectivesPreprocessor Directives Macro DirectivesMiscellaneous Directives Asm430 directive A430 directive Additional A430 Directives IARLstpag + #if, #else, #elif Page MSP-FET430UIF Installation Guide Figure F-1. WinXP Hardware Recognition Hardware InstallationFigure F-3. WinXP Driver Location Selection Folder Figure F-4. WinXP Driver Installation Figure F-5. Device Manager