189/317
7 - Debugger and PROM Programmer Tutorial for ST72251
tents of the window. However, this test is automatically performed prior to programming, and
thus, is optional.
7.3 EMULATOR AND DEBUGGER
7.3.1 Introducing the emulator and the debugger
The emulator and the debugger constitute together the essential tool for testing and debug-
ging a program. They allow you to load the program, have it run either at full speed, or step by
step, or at full speed from one point and stop at a predefined point or when a predefined con-
dition is met. This allows you to see where the program goes and the value of the data pro-
duced.
To achieve this, we need both software and hardware.
The hardware part may be either the Developer K it or the E mulator. In our case, it is the
ST7MDT1-DVP, when it comes to the Developer Kit; or the ST7MDT1-EMU for the emulator.
Both have a probe that is terminated by a male socket identical to that of the selected micro-
controller, here the S T72251. This socket, when inserted in lieu of the real microcontroller,
makes believe it is a microcontroller, and performs exactly as such in the application. But, on
the other side, the Development Kit board or the Emulator enclosure is connected to the PC,
and from here, we can drive program execution and monitor what is going on, as well as
reading and writing any memory byte or register (except that it is not possible to write into
read-only peripheral registers).
The debugger is the software part of the system that drives the emulator, by presenting the
data in a legible way on the screen, and providing controls for startins, stopping, stepping
through the execution or setting breakpoints.
The WGDB7 debugger allows you to debug programs by following the execution both on a
display showing the machine language, and a display showing the corresponding source text.
We shall see in the later chapters that this is also possible using C language, and the execu-
tion can be traced on the C source text as well as on the machine language display.
We shall start by installing the emulator and the debugger, and try out their functions using the
example program from the previous chapter.
7.3.2 Installing the emulator and the debugger
The emulator is composed of two enclosures, the main emulator block, and the probe. The
main block is connected to one of the PC serial ports at one end, and to the probe at the other.
It receives power from the power line.
The probe is connected to the main block at one end, and to the target application at the other,
through a socket that must be plugged in the same place that the real microcontroller would be
inserted in the application. The probe is supplied by the power block.
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...