ST WGDB7 User manual

July 1998 1/76
Rev. 2.2
WGDB7
WINDOWS DEBUGGER FOR THE ST7 EMULATOR,
SIMULATOR AND DEVELOPMENT KIT
PREFACE
Purpose of the Manual
This manual describes how to configure, start and operate the WGDB7 Windows Debugger, to
debug programs written for the ST7 family of microcontrollers, in any of these development
and test environments:
• Program debugging with ST7 emulators,
• Program debugging with ST7 simulators,
• Program debugging with ST7 development kits.
WGDB7 communicates with the user via the standard Windows Graphical User Interface.
It is based on the GNU Debugger (GDB) command set, and uses additional ST7-specific com-
mands. Consequently, the manual discusses also basic GDB commands.
Audience
This book is intended for persons who have previous experience using assembler or C lan-
guages, but who are beginners in the ST7 microcontroller field and need to know how to han-
dle related development and test tools.
Related Publications
The following publications contain useful complementary information:
•
ST7-Family, Data Sheets
,
•
ST7-Family, 8-bit MCUs, Product Overview
, Ref. BKST7/2
•
Software Tools for the ST7 Family
, Ref. Doc-ST7ASMLK-SW
•
ST7-Family, Programming Manual
,
•
ST7-Family Development Kit, Getting Started
, Ref. Doc-ST7MDTx-DVP
151

2/76
Table of Contents
76
152
WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 AN ST7-FAMILY DEBUGGING TOOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 EMULATORS, SIMULATORS, DEVELOPMENT KITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 WGDB7 MAIN FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Displaying Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.2 Entering Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.3 Workspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.4 Using GDB Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.5 WGDB7 Debugging Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 INSTALLING WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1 HARDWARE AND SOFTWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 COMPATIBILITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 BASIC INSTALLATION PROCEDURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 INSTALLING WGDB7 IN THE WINDOWS NT ENVIRONMENT: COMPLETING THE INSTALLA-
TION 12
2.5 POWERING UP THE EMULATOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.1 Connecting the Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.2 Running the Hardware Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.5.3 Connection Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.6 POWERING UP THE DEVELOPMENT KIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6.1 Connecting the Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.6.2 Running the Hardware Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3 PREPARING PROGRAMS FOR DEBUGGING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4 OPERATING WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 18
4.2 STARTING WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.3 GETTING HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 EMULATOR/SIMULATOR CONFIGURATION OPTIONS . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.4.1 Choosing the Emulated/Simulated ST7 Microcontroller . . . . . . . . . . . . . . . . . . . . . . 20
4.4.2 Changing the Emulated/Simulated ST7 Memory Mapping . . . . . . . . . . . . . . . . . . . 21
4.4.3 Viewing and Setting Additional Emulator Configuration Options . . . . . . . . . . . . . . . 24
4.5 VIEWING ST7 RESOURCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5.1 Viewing ST7 Memory Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5.2 Viewing Disassembled Program Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5.3 Viewing Register Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6 LOADING A PROGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.7 VIEWING PROGRAM INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.7.1 Viewing a Source Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.7.2 Finding and Viewing Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.7.3 Watching Variable or Expression Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.8 EXECUTING LOADED PROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.9 USING SOFTWARE BREAKPOINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.9.1 Setting Software Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.9.2 Managing Software Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3/76
Table of Contents
4.10USING HARDWARE BREAKPOINTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.10.1Hardware and Advanced Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.10.2Setting Hardware Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.10.3Setting Advanced Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.10.4Managing Hardware Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.11WORKING WITH OUTPUT TRIGGERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.11.1Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.11.2Setting Trigger Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.11.3Setting the TRIGOUT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.11.4Managing Trigger Event Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.12WORKING WITH THE TRACE BUFFER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.12.1Viewing Trace Buffer Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.13MANAGING TRACE BUFFER RECORDING USING THE LOGIC ANALYSER . . . . . . . . 50
4.14PIN INPUT/OUTPUT SIMULATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.14.1The Input-Process-Output Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.14.2How to Setup Pin Input Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.14.3Starting Pin Input Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.14.4Pin Output Signals Generated by your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.14.5Viewing Pin Output Generated by your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.15TIME MANAGEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5 CUSTOMISING WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.1 CHANGING THE COLOUR SETTINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2 SELECTING WHICH EVENTS ARE INDICATED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
6 WORKING WITH WORKSPACES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.1 SAVING AND LOADING WORKSPACE DEFINITIONS . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.2 ENABLING/DISABLING AUTOMATIC DEFAULT WORKSPACE SAVING . . . . . . . . . . . 65
7 USING GDB7 COMMANDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.1 EXECUTING GDB7 COMMANDS WHEN A PROGRAM IS LOADED . . . . . . . . . . . . . . . 66
7.2 EXECUTING GDB7 COMMAND BATCH FILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.3 ENTERING GDB7 COMMANDS USING YOUR KEYBOARD . . . . . . . . . . . . . . . . . . . . . . 67
7.4 VIEWING GDB7 DIALOG EXECUTED BY WGDB7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
7.5 RECORDING GDB7 COMMANDS IN A LOG FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8 QUESTIONS AND ANSWERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.1 WHAT DOES THE HOUR GLASS CURSOR MEAN? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.2 WHY IS THE LOCALS WINDOW EMPTY? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.3 HOW DO I SPECIFY THE LOCATION OF SOURCE FILES? . . . . . . . . . . . . . . . . . . . . . . 69
8.4 HOW CAN I MODIFY A HARDWARE BREAKPOINT? . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
8.5 WHY ARE SOME SOFTWARE BREAKPOINTS NEVER TRIGGERED? . . . . . . . . . . . . . 69
8.6 WHY ARE SOME HARDWARE BREAKPOINTS NEVER TRIGGERED? . . . . . . . . . . . . . 70
8.7 WHAT DOES “STOP AT USER REQUEST” MEAN? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.8 HOW DO I EXECUTE WGDB7 FROM WINEDIT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
153

4/76
WGDB7
Organization of the Manual
This manual contains eight chapters:
Chapter 2,
INSTALLING
WGDB7,
explains how to in-
stall WGDB7 with
simulator or emu-
lator.
Chapter 3,
PREPARING PRO-
GRAMS FOR DE-
BUGGING
is a general discus-
sion on source pro-
gram origin.
Chapter 4,
OPERATING
WGDB7,
explains how to
use the debugger.
Chapter 8,
QUESTIONS
AND ANSWERS,
answers some
general questions
about WGDB7 op-
eration.
Chapter 7,
USING GDB7
COMMANDS, pro-
vides information
on GDB7 com-
mands that can be
used with WGDB7.
Chapter 6,
WORKING WITH
WORKSPACES,
is devoted to pro-
gram workspace
management.
Chapter 1,
INTRODUCTION,
discusses the con-
cepts of simula-
tion- and emula-
tion-aided debug-
ging.
Chapter 5,
CUSTOMISING
WGDB7,
explains how to tai-
lor WGDB7 to you
own needs.
154

5/76
WGDB7
1 INTRODUCTION
1.1 An ST7-Family Debugging Tool
WGDB7 is a debugger for programs developed for the ST7 family of microcontrollers and
based on either the STMicroelectronics ST7 Macro-Assembler and linker ASM/LYN or the Hi-
ware ST7 C Toolchain.
WGDB7 runs under Windows 3.xTM, Windows 95TM or Windows NTTM.
1.2 Emulators, Simulators, Development Kits
You can use WGDB7 with either of the following device:
• ST7 Emulator,
•ST7Simulator,
• ST7 Development Kit.
In the following, the icons , and will be used to point out topics relat-
ed to features specific to emulators, simulators and development kits, respectively.
The ST7 HDS2 Emulator is a
hardware device
that behaves like an actual ST7 microcontrol-
ler and provides real-time execution of ST7 programs.
The emulator can be connected to your own board, enabling you to emulate the target appli-
cation hardware and software.
The following diagram summarizes the ST7 HDS2 Emulator operating configurations:
LPT1/LPT2
HDS2
WGDB7 Emulator
ST7XXX Probe
User
Application
Board
Flat Cable
155

6/76
WGDB7
The ST7 Simulator is a
program
that simulates the execution of ST7 programs, instruction
by instruction. The behaviour of the peripherals is also simulated.
The following diagram shows the WGDB7 simulator operating configuration:
You may see that, in this case, no external hardware is required. This is the major difference
between the debugging methods presently available: using a simulator or an emulator.
A Development Kit is an assembly of hardware and software components that combines de-
velopment, debugging and chip-programming functions. It covers an extensive development
and test field.
The Development Kit board is connected through a parallel port interface to a PC used to
monitor debugging and device programming operations.
The following diagram summarizes the Development Kit operating configurations:
For more information on a particular Development Kit, see the appropriate
ST7 Family, De-
velopment KIt, User Manual
.
WGDB7 SIMULATOR
LPT1/LPT2
Development
WGDB7
ST7XXX Probe
User
Application
Board
Flat Cable
Kit
156

7/76
WGDB7
Simulation-aided debugging lets you develop and test your application(s) long before your
hardware is finished or available. This could save time and provide you with some comfort re-
garding your own application development plans. Also, this debugging method relieves you
from any premature, undesirable, hardware dependency. Lastly, this is the cheapest solution.
Some real-time debugging features such as the tracing facility and the logic analyser function
are not available, however. Nevertheless, you will benefit from new other features such as
time measurement, and time-dependent break management.
Emulation-aided debugging lets you also develop and test your application(s) long before
your hardware is finished or available. Although it is more hardware-dependent than the sim-
ulation option, because emulators have components specific to various microcontroller fami-
lies, it presents the major advantage of supporting real-time testing and debugging in the user
application board environment. Also, it supports the tracing and logic analyser debugging fea-
tures that can be used in conjunction with the emulators.
The Development Kit and the Emulator debugging capabilities are very close. Compared
with the Simulator and the Emulator, the Development Kit shows some differences, however,
summarized in the table “WGDB7 Debugging Features for the Development Kit, Emulator and
Simulator” on page 9
1.3 WGDB7 Main Features
1.3.1 Displaying Data
WGDB7 can display data in either ‘
normal
’ or ‘
hot
’ mode.
In
normal display mode
, data is displayed as it was when you chose to view it, and it is not
automatically updated. Data is displayed on a white background.
In
hot display mode
, data is updated every time the execution of the program you are debug-
ging is suspended, and is displayed on a yellow background.
1.3.2 Entering Data
When you operate WGDB7, you enter data in standard Windows dialog boxes. In some cas-
es, you’ll notice that when you update fields, the field name is highlighted in red. This indicates
that you have changed a value but the changes have not yet been implemented by the emu-
lator or simulator. You must press the
Enter
key when the cursor is on that field to implement
the changes you made.
157

8/76
WGDB7
1.3.3 Workspaces
WGDB7 enables you to save and load workspaces. Workspaces are snapshots of windows
and option choices that are taken when you close a program. Each program you debug using
WGDB7 has its own default workspace definition. When you load a program, the workspace
that you were using when you last closed it is restored, thus you can continue working from
where you left off. You can also save workspace definitions at any time, so that you can re-
store them at a later date. See “Working with Workspaces” on page 64 for further details.
1.3.4 Using GDB Commands
You can execute general purpose GNU and ST7-specific debugging commands through a
command line interface, via the
Console
option in the main menu, so that you can use the
commands that are not built into the WGDB7 Windows interface.
1.3.5 WGDB7 Debugging Capabilities
WGDB7 enables you to execute ST7 programs, and view the contents of the ST7 data and
program memory as the program progresses. You can examine source code, as you would
with a C-language source program, and assembler code. Program execution history can be
viewed at source or instruction level. WGDB7 lets you read and write all ST7 registers and
memory locations.
The debugging capabilities of WGDB7 depends on which version of the debugger is imple-
mented: WGDB7 with Emulator or Simulator.
Differences are summarized below in Table 1, “WGDB7 Debugging Features for the Develop-
ment Kit, Emulator and Simulator,” on page 9.
As a general rule, WGDB7:
• Enables you to execute source code and machine code line by line. A function call can
optionally be considered as a single instruction, depending on the level of detail required.
• Lets you set software breakpoints on source or disassembled code, that stop the program
running when a chosen instruction is reached.
• Lets you set hardware breakpoints, which either stop the program running when a pre-
defined area of memory is accessed or send a signal to the output triggers (only with emu-
lators and development kits in the later case).
• Enables you to view and modify the simulated/emulated ST7 memory and register con-
tents.
• Enables you to view and modify assembly symbols or C-language variables in their type-
158

9/76
WGDB7
defined format with possible display options such as binary, decimal or hexadecimal.
• Enables you to view the stack contents.
• Enables you to write small programs or modify them at assembly mnemonic level, using
the Online Assembler feature.
• Automatically executes GDB7 command batch files, with or without the WGDB7 graphical
interface, at start-up.
• Enables you to quickly switch from a target debugging mode to the other, for example from
the simulator to the emulator, maintaining all workspace context information such as win-
dows position, software breakpoints, etc.
The features supported by WGDB7 when running with an emulator, a simulator or a develop-
ment kit are summarized in the following table:
.
Table 1. WGDB7 Debugging Features for the Development Kit, Emulator and Simulator
Description
Debugger
+DEVKIT
Debugger
+EMU
Debugger
+SIMU
Hardware Test YES YES NO
Loading Programs, Viewing Program Details YES YES YES
Executing Loaded Programs YES YES YES
Managing Software Breakpoints YES YES YES
Managing Hardware Breakpoints YES YES YES
Viewing ST7 Resources YES YES YES
Viewing Disassembled Program Code YES YES YES
Viewing Register Contents YES YES YES
Watching Symbols, Types of Variables, Expressions YES YES YES
159

10/76
WGDB7
Entering, Assembling Mnemonics to Emu /Simu ST7
Memory YES YES YES
Using GDB7 Commands YES YES YES
Choosing Emulated/Simulated ST7 Micro Name YES YES YES
Changing ST7 Emulated/Simulated Memory Mapping YES YES YES
Displaying and Modifying Configuration Options YES YES YES
Customising the Debugger YES YES YES
Working with Trace Buffer NO YES NO
Accessing Logic Analyser Information NO YES NO
Simulating Pin Input/Output Signals n.a. n.a. YES
Time Management NO NO YES
Output Trigger Management YES YES NO
Stack Overflow/Underflow Stop YES NO NO
Non-existent Memory Stop YES NO NO
Write Protect Memory Stop YES NO NO
Input Trigger Stop YES NO NO
Table 1. WGDB7 Debugging Features for the Development Kit, Emulator and Simulator
Description
Debugger
+DEVKIT
Debugger
+EMU
Debugger
+SIMU
160

11/76
WGDB7
2 INSTALLING WGDB7
2.1 Hardware and Software Requirements
To run WGDB7, you must have the following hardware and software:
• A PC with a 386 or higher processor
• At least 5 Mbytes hard disk space
• At least 4 Mbytes RAM
• Microsoft Windows 3.1x, Windows 95 or Windows NT
• For Emulators and Development Kits: Your PC parallel port must have been configured as
an output-only type port. WGDB7 does not support EPP, ECP or bi-directional parallel port
configurations.
2.2 Compatibility
WGDB7 is compatible with all families of Development Kits and ST7 HDS2 emula-
tors.
2.3 Basic Installation Procedure
To install WGDB7, follow these steps:
1Insert the delivery CD-ROM into your CD-ROM drive.
2Using Windows Explorer, open the root directory of your CDROM drive
3Find the St7tools sub-directory in the CDROM and run
St7tools\disk1\setup.exe
to start the installation program.
4Follow the installation instructions. You may:
• change the destination folder (c:\St7tools by default),
• choose to install only a selection of the software components, to spare disk space,
• specify the connection port name, LPT1 or LPT2 (LPT1 by default) for emulators and
development kits.
161

12/76
WGDB7
2.4 Installing WGDB7 in the Windows NT Environment: Completing the Installation
If you are installing WGDB7 on a Windows NT platform, and you want to use WGDB7 with an
HDS Emulator or a Development Kit over a parallel port, you must install the genport.sys
parallel port driver that is supplied in the diskette labelled “NT Driver Installation” included in
the delivery package.
For this, you must have the Windows NT system administrator’s rights.
To start the installation of the driver, run the setup.exe installation program in the supplied
diskette and follow the instructions.
2.5 Powering Up the Emulator
2.5.1 Connecting the Emulator
To connect your emulator to your PC.
1Connect the parallel cable of the emulator to the LPT1 or LPT2 parallel port of your PC,
2Switch on the emulator,
3Start WGDB7 by following the instructions given in “Starting WGDB7” on page 18.
Look at the emulator front panel: a red LED should be turned on indicating that WGDB7 is
communicating with the emulator.
By default, when you start WGDB7 in this environment, the emulator program memory is set
to undefined values.
2.5.2 Running the Hardware Test
The hardware test lets you check that your emulator is correctly connected, config-
ured and working.
You can test components of the emulator individually or all at the same time.
To run the hardware test:
1Run WGDB7.
162

13/76
WGDB7
2On the Commands menu, click Hardware Test.
The Hardware Test dialog box opens.
3Select the components you want to test from the list, by clicking the appropriate check box-
es. When a box is checked, its component is tested.
4Click the Test button to start the test.
Once the test has been performed, the results are displayed in the Hardware Test dialog box:
NOTE:
In case of test failure, contact your local support representative.
Click the Close button to close the Hardware Test dialog box. You are directed to the WGDB7
main window.
2.5.3 Connection Troubleshooting
The following messages may be displayed when you start WGDB7 with an emula-
tor:
Message:
Check that the emulator is switched on
and the parallel cable is properly connected
Meaning:
163

14/76
WGDB7
No connection has been established between the emulator and your PC.
Action:
1Exit WGDB7
2Check the following:
iYour emulator is switched on,
ii You switched on the emulator after switching on your PC. If you switched on the emu-
lator before switching on your PC, switch the emulator off then on again.
iii The cable is correctly connected to your PC.
Message:
No message received from the emulator
Meaning:
Configuration problem.
Actions:
• If you are running an HDS2 emulator on a Windows NT platform, check that you have cor-
rectly installed the Windows NT driver that is supplied on the diskette labelled “NT Driver
Installation Diskette”.
• Check that your PC parallel port has been configured as an output-only parallel type port
(BIOS settings). WGDB7 does not support EPP, ECP or bi-directional parallel port configu-
rations.
2.6 Powering Up the Development Kit
2.6.1 Connecting the Development Kit
Proceed as follows:
1Connect the evaluation board (P2 connector) to the parallel port (LPT1 or LPT2) of your
PC via the appropriate cable.
164

15/76
WGDB7
NOTE:
The supplied interface cable has been tested in order to operate properly on most
PCs. Do not use any other cable, especially if it is longer than the one provided by
STMicroelectronics: the board may not operate properly.
The cable should be connected directly to the DB-25 female connector of the PC par-
allel port. This connector is similar to the one installed on the board. Do not insert any
additional cables or switchboxes between the PC and the board: a malfunctioning of
the board may result.
2If necessary, connect the probe (P3 connector) using the flat cable that has been supplied
in the package.
3Power up the board.
NOTE:
To avoid risks of short circuits, first connect the plug-in power supply pack jack into
the P1 female jack connector on the board, then plug the power supply pack into the
mains AC outlet.
If the board is fed via the complementary two-point connector make sure that the right
feeders lead to the right polarities.
The green POWER LED lights up.
2.6.2 Running the Hardware Test
The hardware test lets you check that the evaluation board is correctly connected,
configured and working.
To run the hardware test:
1Run WGDB7.
2On the Commands menu, click Hardware Test.
165

16/76
WGDB7
The components of the development kit are tested one after the other
During the tests the following message box is displayed:
Upon successful completion of the tests the following message box appears:
NOTE:
In case of test failure, contact your local support representative.
Click OK to close the Hardware Test Result message box.
166

17/76
WGDB7
3 PREPARING PROGRAMS FOR DEBUGGING
You can debug programs that were generated using either the STMicroelectronics ST7 Mac-
ro-Assembler or the Hiware ST7 toolchain.
In both cases, make sure that the
Reset Vector
is correctly initialised, so that the Run and Re-
set commands operate correctly.
Some example macro-assembler source programs are provided in the Sample subdirectory
of the WGDB7 installation directory.
To be able to load a program, WGDB7 must have access to the *.s19 file in the Srecord for-
mat or the .abs file for the Hiware ST7 toolchain.
From the *.s19 file, WGDB7 can obtain the symbol files that were generated by the toolchain.
For the STMicroelectronics ST7 Macro-Assembler, symbol files include .MAP. and .LST files.
To generate the correct files for WGDB7, when you assemble programs using the STMicroe-
lectronics ST7 Macro-Assembler, you must use the following options:
asm -li macrost7.asm -- assemble with listing(*)
lyn macrost7.obj,macrost7 -- link and generate map
asm macrost7.asm -sym -fi=macrost7.map -- update the listing with symbols(*)
obsend macrost7,f,macrost7.s19,srec -- generate srec code
or:
obsend macrost7,f,macrost7.hex,intel -- or generate intel hex code
(*) to be repeated for each module linked in the application.
Make sure that you use the STMicroelectronics ST7 Macro-assembler version pack 8 or later.
If no symbol file is provided with the .s19 or .hex file, you can still perform some debugging
tasks, such as viewing ST7 memory contents, viewing disassembled code, displaying and
modifying register values, executing programs and viewing trace buffer contents (not applica-
ble in the later case for simulators).
For the ST7 C compiler, refer to the compiler documentation for information on how to gener-
ate debug information.
For more information on Assembler directives, see “
Software Tools for the ST7 Family”
.
167

18/76
WGDB7
4 OPERATING WGDB7
4.1 Introduction
This section describes how to perform the basic tasks that you will typically carry out when you
debug a program using WGDB7. It aims to get you quickly started with WGDB7. For detailed
information about windows, menus and dialog boxes, and on how to perform all tasks, use the
WGDB7 online help (see “Getting Help” on page 19).
4.2 Starting WGDB7
The WGDB7 debugger is installed in the installation root directory. By default, you willfind it in:
C:\St7tools
To start WGDB7, just click the appropriate icon (or name in the cascading menus) in the Win-
dows desktop.
Depending on which tool you installed, you may find icons (or names) for:
WGDB7 Emulator
WGDB7 Development Kit
WGDB7 Simulator
The WGDB7 Introductory window appears (simulator example):
168

19/76
WGDB7
The debugging session starts a few seconds later.
To get accustomed to the product, you may start one of the sample programs provided with
the package, via the
File/Open
debugger menu chain.
The sample programs can be found in:
C:\<install folder>\sample
where <install folder> is the installation root folder (directory), St7tools by default.
Once WGDB7 starts, the main window opens (simulator example):
The Title bar will later display the name of the program that is currently loaded (see “Loading
a Program” on page 29).
The Menu bar displays the available menus. Clicking a menu name opens it. Since no pro-
gram is loaded, all program-related menus are greyed out and thus cannot be accessed.
The program execution buttons provide you with quick access to the program execution func-
tions. See “Executing Loaded Programs” on page 35.
NOTE:
All the task procedures described in this book start from the main window.
4.3 Getting Help
WGDB7 enables you to access two types of help messages:
• Task-based help, where you choose a task about which you want information.
• Context-sensitive help, that displays information about the window or dialog box that is cur-
rently active.
Menu bar
Title bar
Program execution buttons
169

20/76
WGDB7
To access task-based help:
1From the Help menu in the main window click Contents.
2Click the task about which you want further information.
To access context-sensitive help on the window or dialog box that is currently active:
1On the window or dialog box, click the Help button if there is one, otherwise click the [F1]
key.
A help window opens displaying the window or dialog box that is currently active.
2In the help window, click on the item, such as a menu name or field, about which you want
further information.
4.4 Emulator/Simulator Configuration Options
Once you have started the debugger, even if you have not yet loaded a program, you can view
and configure some emulator/simulator-specific settings.
These are:
• The ST7 micro name that is being emulated or simulated.
• The emulated/simulated ST7 memory mapping.
• Other emulator configuration options, such as the clock speed. The configurable options
depend on the emulator family you are using. Refer to the documentation provided with
your ST7 HDS emulator for further details.
When you close an application, a configuration file (
<application>.CF7
) that con-
tains memory mapping information is automatically generated. The definitions
stored in this file are restored when reloading the application. This configuration file
includes the micro name, the memory configuration, micro configuration and the
trace analyser settings. When WGDB7 is used with a simulator, this information is
saved in the application workspace.
4.4.1 Choosing the Emulated/Simulated ST7 Microcontroller
1On the Commands menu, click Micro Name.
The name of the ST7 that is currently being emulated/simulated is displayed in the Micro
Name dialog box
170
Table of contents
Other ST Computer Accessories manuals
Popular Computer Accessories manuals by other brands

Thermaltake
Thermaltake ARMOR A60 AMD VM200P Series user manual

Cooler Master
Cooler Master Elite 241 installation guide

Dell
Dell OptiPlex Micro Form Factor installation guide

Intermec
Intermec 700 Series 700 installation instructions

Dell
Dell Inspiron One 2020 quick start guide

Dynex
Dynex DX-WRC1401 Guide d'installation rapide