USE IN LIFE SUPPORT DEVICES OR SYSTEMS MUST BE EXPRESSLY AUTHORIZED.
STMicroelectronics PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN
LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF
STMicroelectronics. As used herein:
1. Life support devices or systems are those
which (a) are intended for surgical implant into
the body, or (b) support or sustain life, and whose
failure to perform, when properly used in
accordance with instructions for use provided
with the product, can be reasonabl y expected to
result in significant injury to the user.
2. A critical component is any component of a life
support device or system whose failure to
perform can reasonably be expected to cause the
failure of the life support device or system, or to
affect its safety or eff e cti ve n e ss.
ST7MDTU3-EMU2B Emulator User Manual1 - Introduction
1 INTRODUCTION
Thanks for choosing ST7! This manual will help you get started with the
ST7MDTU3-EMU2B emul ator kit.
The ST7MDTU3-EMU2B emulator allows you to control the execution of programs
that you have written for the ST7263BKX MCU and assists you in debugging your
application hardware as well as your software. The ST7MDTU3-EMU2B kit comes
with the debugger software pack age—ST7 Visual Debug—which contains all of the
necessary resources to help you design, develop and debug ST7 application
software running in a real environment.
Note:
Note:
If you come across any terms or abbreviations you do not unde rstand, you can check their
meaning in the Glossary on page 57.
Please refer to Section 4.8: Emulation Functiona l Lim itations an d Di s crepanc ies on page 51
for a description of the limitations on the current release of this emulator kit.
The Emulator Package is made up of two main parts:
•The Hardware Development System (ST7 HDS2), which is the common
mainframe to all ST7 emulators.
•The ST7MDT U3-Active Probe, dedicated to the family, which constitutes the
physical link between the emulator and your application.
When receiving the ST7MDTU3-EMU2B development tool, please refer to the Delivery
Checklist on page 9 to confir m that all of the contents of the package are present.
The emulator performs two main functions:
•It replaces the microcontroller in the application, by means of an emulation
probe that is plugged into the application in place of the emulated MCU.
•It controls the internal data bus of the emulated microcontroller, providing
arbitration and tracing capabilities on all accesses to any of the following
resources:
-ST7 HDS2 resources,
-ST7MDTU3-Active Probe resources,
-Application resources.
Therefore, you can have the emul ator running y our software in the application just
as the emulated MCU would do, and have extensive tracing and control
capabilities (i.e. keeping track of what the MCU does, and making it react in a
specific way upon defined conditions).
In this way, it is possible to fully emulate microcontroller resources.
5/63
1
Page 6
1 - IntroductionST7MDTU3-EMU2B Emulator User Manual
1.1 Emulator Configuration
Figure 1
main ST7 HDS2 box is connected to your PC via the parallel port. Two flat
cables connect the ST7 H DS2 box to the ST7MDTU3-Active Probe. The ST7
Generic Probe is connected to the ST72F63-TEB, to which a device adapter
can optionally be fixed so that you can connect the emulator to your application
board.
emulator power
supply
shows the configuration for the ST7MDTU3-EMU2B emulator kit. The
Figure 1: ST7MDTU3-EMU2B General Configuration
connection to PC’s
paral lel port
para llel ca ble
ST7-Generic
Probe
application board power supply
1.2 Emulator Operation
A symbolic debugger, ST7 Visual Debug, (also referred to as STVD7), is
provided to control the emulator.
ST7 Visual Debug can be run on a PC under the Windows environment, and is
common to all ST7 devices. ST7 Visual Debug uses a window menu-driven
interface, and enables you to configure the emulator.
device
adapter
ST72F63-TEB
applic at io n bo a rd
6/63
Page 7
ST7MDTU3-EMU2B Emulator User Manual1 - Introduction
Chapter 3: STVD7
on page 17, explains how to install ST7 Visual Debug on
your PC, and set up the emulator configuration so that you can begin your
debugging session.
Once assembled and linked, the application software is ready to be downloaded
into the ST7 emulator. The development station performs a real-time emulation
of the target device, thus allowing high performance testing and debugging of
both application hardware and software.
When the program is fully debugged, the ST7 EPROM programming board
(ref.: ST7MDTU3B-EPB — not provided with this emulator kit) can be used to
program the emulation device with the Motorola S Record format file produced
by the OBSEND formatter.
1.3 Software and Documentation for the Emulator Kit
The “MCU on CD” CD-ROM contains:
•ST7 Tools, comprising the following software:
-The source-level graphic debugger, ST7 Visual Debug, that operates
with ST7 HDS2 Emulators and ST7 Development Kits or as a
standalone ST7 simulator.
-The ST7 Assembly chain, composed of an assembler, linker, librarian
and formatter.
-The ST7 Windows Epromer to program your MCU target devices.
•Third-party C compiler and toolchain demos (Hiware and Cosmic).
•ST7 application notes (with sources), training slides and exercises, this
manual (in PDF version), and other useful reference materials.
•Datasheets for the ST7 MCU family.
1.4 About this manual....
Detailed instructions on how to install your emulator configuration is described
Chapter 2: Getting Started
in
How to start debugging your application using your emulator and ST7 Visual
Debug is described in
The emulator kit’s hardware features are described in
Features
on page 43.
on page 9.
Chapter 3: STVD7
on page 17.
Chapter 4: Emulator
7/63
Page 8
1 - IntroductionST7MDTU3-EMU2B Emulator User Manual
1.5 Related Documentation
To get all the essential information about your ST7 MCU and the software that
comes on the CD-ROM with the emulator kit, you will need to refer to these
documents (also contained on the CD-ROM):
•ST7-Family Data Sheets
ST7-Family 8-bit MCUs Product Overview
•
Software Tools for the ST7 Family
•
•ST7-Fam ily Programming Manual
1.6 Getting Assistance
For more information, application notes, FAQs and software updates on all the ST
microcontroller families, check out the CD-ROM or our website:
http://mcu.st.com
For assistance on all ST microcontroller subjects, or if you need help with using
your emulator, use the contac t list provided in
be glad to help you!
(Ref. BKST7/2)
(Ref. Doc-ST7ASMLK-SW)
Product Support
on page 59. We’ll
8/63
Page 9
ST7MDTU3-EMU2B Emulator User Manual2 - Getting Started
2 GETTING STARTED
2.1 Your System Requirements
The ST7MDTU3-EMU2B Emulator (both hardware and software components) has
been designed to work with PCs meeting the following requirements:
®
•One of the following operating systems: Microsoft
Windows® 95, 98 or NT®.
•Intel
®
Pentium (or compatible) processor with minimum speed of 100 MHz.
•Minimum RAM of 32 MB.
•21 MB of free hard disk space to install all of the ST7 tools.
2.2 Delivery Checklist
The emulator kit (ref.: ST7MDTU3-EMU2B), is delivered with the following (refer to
Figure 2
):
1One emulator box containing the ST7 HDS2 main board (ref.: MB176) and two
50-wire flat cables to connect the ST7 HDS2 main board to the generic
emulation probe.
2One emulator power supply.
3One parallel cable.
4Three EMC suppress ferrites.
5One logic probe cable.
6Two SMB to BNC cables.
7One generic emulation probe—the ST7 Generic Probe (ref.: DB467).
8An ST72F63-Target Emulation Board (TEB) (ref.: DB465).
9An SO34 socket adapter (ref.: DB354 & DB355).
10 One User Manual for the ST7 Family Software Development Tools (assembler,
linker, and formatter). (Not shown.)
11 This manual. (Not shown.)
9/63
2
Page 10
2 - Getting StartedST7MDTU3-EMU2B Emulator User Manual
12 A CD-ROM containing ST7 information and software, including ST7 Visual
®
Debug and a Windows
Epromer. (Not shown.)
(1)
(4)
(7)
Figure 2: Main Comp onents of ST7MDTU3-EMU2B Emulator Kit
2.3 Installing the Hardware
(2)
(8)
(5)
(3)
(6)
(9)
10/63
The ST7 HDS2 emulator is connected through the parallel port to a PC
computer which runs the control software (ST7 Visual Debug) as explained
later. To connect your ST7 HDS2 emulator, you will have to follow these general
steps (explained in detail later):
1Connect the ST7 HDS2 emulator to your PC using the parallel cable
provided.
2Connect the two flat cables of your ST7 HDS2 emulator to the emulation
probe connectors.
3Connect the probe to the application board using a device adapter.
4Connect the power supply cable between the power supply block and the
power connector located on the rear panel of your ST7 HDS2 emulator.
5Power up the emulator and then connect your application power supply.
Page 11
ST7MDTU3-EMU2B Emulator User Manual2 - Getting Started
A connection flow diagram is shown in
described in detail in the following sections.
PC Parallel Port
4
Power Supply
2
ST7 HDS2 Emulator Casing
ST7 Generic Probe
Figure 3
1
Parallel Cable
. Each installation step is
ST72F63-TEB
SO34 Socket Adapter
Application Board Power Supply
5
Figure 3: ST7M DTU3 -E MU2B Connection Flow
Step 1: Connecting the Emulator to your PC
1Shutdown and power-off the PC that is to be connected to the emulator.
2Connect one end of the parallel cable to the em ulator’s rear panel 25-pin
SUB-D connector and the other end to one of the PC’s parallel ports (LPT1
Note:
to LPT2)—refer to
Centronics (or PC-A T or SPP), ECP and EPP par all el p ort configu ra tio ns are supported b y
the emulator.
Figure 4
.
3
Application Board
11/63
Page 12
2 - Getting StartedST7MDTU3-EMU2B Emulator User Manual
Be sure to use the parallel cable provided with the emulator—using a longer parallel cable
may cause emulator malfunctions.
to LPT1 or LP T2
1
Figure 4: Connecting the Emulator to the PC
Step 2: Connecting the Emulator to the Probe
1Ensure that the application and the emulator are powered-off.
2Plug the two 50-wire flat c ables into the J1 and J2 connections on the probe, as
described below (refer also to
ST7 HDS2 emulator
(ref.: MB176)
Upper cable
Lower cable
Figure 5
2
SUBD25 connector
):
ST7-Generic Probe
(ref.: DB467)
J2
J1
rear panel
12/63
ST7 HDS2
Side View
Figure 5: Connecting the E mulator to the Generic Probe
Red Line
50 pin male connectors
J1 J2
DB467
Page 13
ST7MDTU3-EMU2B Emulator User Manual2 - Getting Started
EMC-Compliant Probes: In order to work under an EMC-com pliant environment,
you will have to clip two or three EMC-ferrites on the 50-wire flat cables linking the
probe to the emulator box. Place these ferrites as close to the emulator window as
possible. Three ferrites are provided in the package. See
Figure 6
for an illustration
of where to attach the ferrites.
ST7 HDS2
Emulator
Side View
Ferrites
Probe +
Application Board
Flat Cables
Side View
Figure 6: Making your Probes EMC-Compliant
Step 3: Connecting the Probe to your Application Board
Emulated devices of the ST7MDTU3 family are available in two packages.
Each package has its own connection procedure, found on the page cited in the
table below:
Package sPage No.
SO3414
SDIP3215
Note:
You can use your emulator kit with ST7 Visual Debug without an application board—however
the emulation probes must be connected to the HDS2 emulator.
13/63
Page 14
2 - Getting StartedST7MDTU3-EMU2B Emulator User Manual
If you are using the SO34 package, proceed as follows:
To connect the probe to its device adapter and then to your application, follow
these steps (see
Figure 7
):
1Solder the SO34 device adapter (ref.: DB354 & DB355) to your application
board.
ST7 Generic Probe
(ref.: DB467)
J2
J1
ST72F63 TEB (ref.: DB465)
2
SO34 device adapter
(ref.: DB354 & DB355)
1
Application Board
Figure 7: SO34 Package Connections
2Connect the joined generic probe (ref.: DB467) and ST72F63-TEB (ref.:
DB465) to the SO34 device adapter.
14/63
Page 15
ST7MDTU3-EMU2B Emulator User Manual2 - Getting Started
If you are using the SDIP32 package, proceed as follows:
Solder the joined generic probe (ref.: DB467) and ST72F63-TEB (ref.: DB465) to
your application board (see
J2
J1
Figure 8
ST7 Generic Probe
(ref.: DB467)
Application Board
).
ST72F63 TEB (ref.: DB465)
Figure 8: SDIP32 Package Connections
Step 4: Connecting the emulator power supply
Warning:Make sure that both the ST7MDTU3-EMU2B and the application are OFF before making
any connections.
1Connect the external power supply provided with the emulator to the rear panel
of the mainframe using a 5-pin DIN connector.
2Plug the power supply into the mains using the supply cable provided.
Mains voltage specifications:
AC voltage:100 V to 240 V
Frequency:50 to 60 Hz
Step 5: Powering up
1Check the ST7 HDS2 operating voltage (110 V/220 V) indicated on the label on
the power supply. Contact your dealer if this voltage does not correspond to
your mains’ power supply.
15/63
Page 16
2 - Getting StartedST7MDTU3-EMU2B Emulator User Manual
2Power up the ST7 HDS2 em ulator from the ON/OF F switch located on the rear
panel. The LED labelled
Power
on the front panel should then light up.
3Power up your application.
2.4 De buggers Supporting the ST7 HDS2 E mu l ator S eries
ST7 Visual Debug (also known as STVD7) is the STMicroelectronics debugger
currently supporting the ST7 HDS2 emulator.
Third party debuggers supporting the ST7 HDS2 emulator include the following:
•ST7-Hiwave by HIWARE
•Zap by COSMIC
•Hitop by HITEX.
ST7 Visual Debug is free software. It is available on the CD-ROM delivered with
your emulator kit and on the STMicroelectronics website. The next chapter tells
you how to configure your emulator and start debugging with ST7 Visual Debug.
16/63
Page 17
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
3 STVD7
STVD7 is an integrated development environment that allows you to edit, debug
and rebuild your application all from within STVD7.
The following sections tell you:
Section 3.1
•
Section 3.2
•
Section 3.3
•
Section 3.4
•
•
Section 3.5
Section 3.6
•
Section 3.7
•
Section 3.8
•
Section 3.10
•
Section 3.11
•
Section 3.12
•
Section 3.13
•
—how to install the STVD7 software,
—how to launch STVD7,
—a little about STVD7’s debugging featur es,
—what a workspace is,
—what toolchains and executable files are supported by STVD7,
—how to create a STVD7 workspace,
—how to open existing workspaces,
—how to open binary files,
—how to change your project settings,
—how to save workspaces,
—how to switch from the build context to the debug context,
—how to configure the target MCU in order to debug more
accurately and efficiently.
3.1 Installing STVD7
Your emulator comes with the “MCU on CD” CD-ROM which contains a number of
ST7 software tools. These tools run under the Windows
and Windows
®
NT® operating systems.
®
95, 98, 2000, Millenium
Note:
To install the software on “
administrator privileges.
MCU on CD
”, Windows® 2000 and NT® users must have
To install and setup the ST7 software tools, follow these steps:
1Close all other open applications on your Windows desktop.
2Insert the “MCU on CD” into your CD-ROM drive. The CD-ROM’s autorun
feature will open up a welcom e sc reen on your PC. If the autorun feature does
®
not work, use Windows
Explorer to browse to the CD-ROM’ s r oot folder, and
double-click on Welcome.exe.
3Select
Install Your Developmen t Tools
from the list of options. A new screen
will appear listing the different families of STMicroelectronics MCUs.
4Use your mouse to place the cursor over the
ST Tools
, then
ST7 Toolchain
from the lists that appear.
ST7 Tools
option. Choose
17/63
3
Page 18
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
5The install wizard will be launched. Follow the instructions that appear on the
screen.
You can choose to install the complete toolchain (i.e. the appropriate version of
STVD7, STVP7 and the Assembler-Linker) for each type of development tool
(development kit, HDS2 or EMU3 emulators or simulator), or perform a
customized installation.
If you choose a customized installation, you can choose to install any or all of
the STVD7 versions, and/or the Windows Epromer/STVP7 and/or the
Assembler-Linker. As a minimum, in order to emulate your application with
your emulator, you must install STVD7 for HDS2.
If you also install the ST7 Assembly Toolchain, you will be able to use the ST7
Assembly Toolchain as part of STVD 7’s integrated development environment.
The installation is now complete. You will be prompted to reboot your computer.
You should do so before launching STVD7.
3.2 Launching STVD7
1From your Windows desktop, select
Chain>Development Tools>STV D7
HDS2 emulator.
Start>Programs>ST7 Tool
2The first time you open a version of STVD7 y ou will be prompted to enter the
toolchain paths to be used by STVD7’s integrated development environment.
18/63
Figure 9: Toolchain Path dialog box
Page 19
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
Enter the paths for the toolchains that you use (i.e. any or all of the Hiware,
Cosmic or ST7 ASM toolchains) and click
OK
. (The default paths for each
toolchain are shown below.)
3If you choose
Cancel,
you will be prompted again to enter the toolchain paths
the next time you launch STVD7.
Note:
You may modify the toolchain path at any time from within STVD7—simply select
Project>Toolchain Paths from the main menu to access the dialog box above.
3.3 About S TVD7 debugging features
A number of advanced features are included in the STVD7 software:
•Data Breakpoints on the occurrence of a memory access via a read operation
or a write operation, or both.
•Instruction Breakpoints on the occurrence of an opcode fetch.
•A Logical Analyser that allows you to control either the recording of the trace
buffer, or a break in the execution of the application using a series of specific
conditions (events).
•A Trace window to view the contents of the trace buffer, which permanently
records in real time on 32-bits:
-Address and data bus information.
-Flag status and 4 external signal values.
You can record up to 1024 executed cycles. Using trace filtering, you can filter
out only those cycles you wish to record in the trace buffer. You can equally
control which of the recorded cycles are displayed in the Trace window using
line filtering. Addresses, data, control/status bits and 4 user signals are
displayed using mnemonic and user symbols.
•Internal synchronization signals can be output to either of two Trigger Outlets
on the front panel of the emulator (OUT1 or OUT2). This feature enables you to
count events using an external equipment, when optimizing software for
example, or to synchronize an oscilloscope when debugging hardware.
•Hardware Events can be used to control the sending of signals to the trigger
outputs.
•You can choose the output that you wish the signal to be sent to (i.e. either
OUT1 or OUT2).
•A Hardware Test function that allows you to perform a number of hardware
tests on the Development Board, at your choosing. Refer to
Running the
19/63
Page 20
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
Hardware Test
•A powerful online help facility can be invoked at any time to give additional
information about the commands, the processor or the emulator kit.
3.4 Workspaces
STVD7 organizes project development and debugging into workspaces.
Workspaces allow you to store application and project settings and save them, so
that each time you wish to work on the project, you will find all of the settings
exactly as you left them.
Creating a workspace is the first thing that you need to do when using STVD 7 for
the first time or when starting any new project. You must have an open workspace
to work with STVD7. How to create a new workspace is described in detail in
Section 3.6
. Sample workspaces for each supported toolchain are provided so that
you can familiarize yourself with STVD 7 (for a listing of sample workspaces, see
Table 1
).
Each workspace is comprised of three information sets: the project settings, the
visual environment and debugging information.
•The project settings consists of the information necessary for a successful
build of an application (commands to run, makefile file etc....). Your
workspace’s project settings include the definition of your application toolchain
Section 3.5
(see
for more information.
).
20/63
•The debugging information includes information on breakpoints, memory
mapping, advanced breakpoints programs, trace etc..
•The visu al environment consists of the open windows elements, along with
their current layout, customized toolbars and menus. The visual environment is
composed of two environments, one in the Build context and one in the
Debug context (see
Section 3.12
).
The above workspace information is stored in three types of files: a workspace file
(*.wsp) and two auxiliary files (*.wed and *.wdb).
Both project settings and debugging information is stored in the same workspace
file (*.wsp). In addition, to allow you to use the same workspace file for any STVD7
version (such as the STVD7 Simulator version, STVD7 for HDS2 Emulator, STVD7
for DVP, and/or STVD7 for EMU3 Emulator), the project settings and debug
information (such as the toolchain used, MCU emulated, memory mappi ng, etc.)
are kept separately in the same *.wsp file for each STVD7 version.This allows you
to use the same workspace file to debug the same application for two different
MCUs or MCU configurations on different STVD7 versions.
Page 21
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
Visual environment information (such as the location of debug windows, the
appearance of toolbars, and other aspects of STVD7’s graphical interface) is
saved in separate files for each of the two contexts of STVD7. Graphical interface
preferences while in Build context are saved in a *.wed file, and graphical
interface preferences while in Debug context are saved in a *.wdb file. Each of
these files is attached to a given workspace.
Note that if you move a workspace file (for example, mywork.wsp) to a new folder,
take care to move the associated *.wed and *.wdb files (mywork.wed andmywork.wdb) with the workspace file in order to preserve the latest visual
environment of your STVD7 session.
3.5 Toolchains and application files
A quick summary of development toolchains and application file types supported
by STVD7 will help you in setting up your workspace.
Three different development toolchains are currently supported by the STVD7.
Each type of toolchain has its own application and executable file types, project
environment and building tools (i.e. linkers and convertors):
•The ST7 macroassembler toolchain from STMicroelectronics, which
generates either .s19 or
.hex executable files with various intermediate files,
such as .map or .lst files.
•The Hiware C or Assembler toolchain, which generates .abs executable
files with various intermediate files, such as .o or .dbg files.
•The Cosmic C or Assembler toolchain which generates .elf executable
files with various intermediate files, such as .o or .st7 files.
When you set up a workspace, you will need to define the following project
settings:
•The toolchain to be used—Hiware, Cosmic o r ST7 macroassem b ler.
•The executable file (*.abs, *.elf, *.s19 or *.hex depending on
toolchain—refer to
Table 2
).
•The maker program f or the toolchain. The maker program can be a part of the
toolchain software (such as Hiware’s maker.exe) or you can choose to use a
generic maker such as Nmake.exe
or Gmake.exe (which is provided with the
STVD7).
•The maker batch file (*.mak or *.bat). This is a file which you create for
each application which spawns the compilation and/or link step each time you
wish to build or rebuild. In it, you define the conditions for recompiling, re-
21/63
Page 22
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
linking or both.
Default * .mak or *.bat files are often included with the toolchains—for
example, maker.mak is included with the Hiware toolchain and simply
recompiles your application if it detects that the file has been saved since the
start of your debugging session. The STVD7 software includes sample *.mak
and/or *.bat files for each toolchain—these are listed in
Table 1
.
Table 1: Sample files included with STVD 7
Toolchain
ST Macro
assembler
Cosmic
Hiware.../c/hiware/sample.wsp
Sample Workspace (with
default p at h
.../realtim/realtim.wsp .../realtim/tim_rtc.batBatch file that
.../spim11/spim11.wsp.../spim11/spim11.batBatch file that
.../c/cosmic/sample.wsp .../c/cosmic/sample.makRecompiles only if
Sample Make and/or Batch
1
files (with default path
.../c/cosmic/sample.batBatch file that
.../c/hiware/build.makRecompiles only if
.../c/hiware/rebuild.mak Forces a recom-
)
Description of
Make/Batch File
forces a recompile
of the application.
forces a recompile
of the application.
one (or more) of
the application files
has been resaved.
forces a recompile
of the application.
one (or more) of
the application files
has been resaved.
pile of the application.
1) The full default path is:
hds/sample/...
3.5.1 About executable files
The user should verify that the options to include debug information were active
during creation of the project files.
functions and lists the different file types (source files, intermediate files and
executable files) used and produced by the toolchain. The executable file types
22/63
C:/Program Files/Stm/st7toolchain/stvd7/
Table 2
summarizes the way each toolchain
Page 23
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
and intermediat e file types necessary to exploit fully the STVD7 capabilities are
listed.
The executable file(s), source files and any necessary intermediate files (these
are listed above and contain debug information necessary to the STVD) should be
located in the same project directory. You do this when you define your workspace.
It is always preferable to have access to all of the files generated by the development
toolchain. However, you can load
debugging capabilities (refer to Section 3.8).
*.s19
or
*.hex
binary files directly and have limited
23/63
Page 24
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
3.6 Creating a workspace
1Select
File>New Workspace
. This command opens the New Workspace
window where you define the name of your workspace and the directory in
which you want to work.
24/63
Figure 10: New Workspace window
Page 25
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
2Then, click
appears:
Next>
. The New Workspace: Project Settings dialog box
Figure 11: New workspace project settings
Here you enter your software toolchain, your executable filename and your
build parameters either by typing or using the drop boxes.
3Sel ect the toolchain and enter the name of your application’s executable file.
For example, if you wish to use the Hiware toolchain for ST7, your executable
file will be of type *.abs (ref er to
Table 2
)—click on the browse button to
browse to the folder where your executable file is saved and select it.
4Next, choose the type of maker your application uses from the drop down list. In
the example above, we have chosen the default Hiware maker, maker.exe.
STVD7 will automatically look for this maker file in the folder you defined as the
Hiware toolchain path.
25/63
Page 26
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
5Finally, you must define a make file or a batch file. There are several sample
files provided with STVD7 (see
the default make file, used when the
rebuild.mak as the make file to use when the
Table 1
). Here we have chosen build.mak as
Build
command is issued, and
Rebuild
command is issued.
6After you have finished defining your project settings, click
Once the workspace is opened, the Workspace window displays its contents.
When you create a new workspace, the first time you switch to Debug context (see
Section 3.12
for an explanation of STVD7 contexts), the MCU Configuration
window will automatically open to prompt you to choose you target MCU and
confirm or modify its option and memory configuration (see
3.7 Opening an existing workspace
If you have already created a workspace, y ou simply need to open it in order to
load all of your project settings into the STVD7.
Note:
There are a number of sample workspaces provided with STVD7 that you can open to get
familiar with STVD7. These samples are listed in Table 1.
1From the main menu, select
File>Open Workspace.
This command opens a window where you can browse to any folder you wish,
and select an existing workspace.
Finish
.
Section 3.13
).
26/63
Figure 12: Open Workspace window
Page 27
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
2The Workspace window opens.
Note:
Figure 13: Workspace window
When a workspace is opened, all of the predefined project settings are loaded
into the STVD7. The Workspace window will show a structured representation
of the project. For exampl e, mywork.wsp shows that it uses build.mak as
the make file and sample.abs
Although the name of the executable file is shown in the Workspace window, it has not yet
been loaded into the emulation memor y.
as the executable file.
27/63
Page 28
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
If you click on the Source Directory tab, the window will show ever y source
and intermediate file type (*.c, *.s, *.asm, *.h or *.o) in the selected
directory.
Figure 14: Source Directories tab
3If there are no source files shown in the Source Directory tab of the Workspace
window, or you wish to list additional files stored in another folder, you may
browse to them by clicking the
Double Click here...
folder. The Add Source
Directory window pops up allowing you to enter or browse for a new directory,
and filter out the file types of interest. You may also choose to specify a
28/63
Page 29
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
directory that is relative to the workspace directory by clicking on the
relative to the Workspace directory
option.
Path
Figure 15: Add source directory
4T o load the executable file, as well as any intermediate files, click the Debug
icon or the Reset Chip icon . The application and symbols will be
loaded. Before you can start debugging, you must set the target hardware
device by configuring the MCU.
3.8 Opening files directly for debugging (*.abs, *.s19, *.hex and *.elf )
You may also load .abs, .elf, .s19 and .hex files for debugging directly
using the Open Workspace command, without having to enter build parameters
immediately. (You may always enter the build parameters at a later time by
selecting
Project>Project Settings
from the main menu to open the Project
Settings dialog box.)
Note:
Howev er , fo r .s19 and .hex files to open correctly, the *.map and *.lst files generated by
the ST7 toolchain dur ing compilation must also be present. If this is no t the case, refer to
Section 3.9.
29/63
Page 30
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
The range of debugging features available will be more limited because the source
files will not be accessible .
1Launch STVD7 and select
File>Open Workspace
from the main menu.
2Browse to the folder where your binary file is stored, and select
Application files (*.abs, *.s19, *.hex, *.elf)
in the
Files of type
field.
Figure 16: Open Workspace window
ST7
3Select your binary file (*.abs, *.s19, *.hex or *.elf) and click
3.9 Opening lone programmable files (*.s19 or *.hex)
If you do not have access to the *.map and *.lst files generated by the ST7
toolchain, you may also load isolated *.s19 and *.hex files from within STVD7.
The range of debugging features available when you open these files will be very
restricted. You will only have access to the Disassembly Window and the
Memory window.
1Launch STVD7 and select
Debug>Start Debugging
click on .
2Open the Memory window by selecting
View>Start Debugging
menu.
3With the cursor in the Memory window, right-click the mouse to open the
Memory contextual menu.
30/63
Open
.
from the main menu or
from the main
Page 31
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
4In the Memory contextual memory, select
File>Restore Layout
. The Load File
to Memory window opens.
5Br owse to the folder whe re your programmable file i s stored, and s elect either
the Motorola format (*.s19) or the Intel format (*.hex) in the Files of type fi eld.
Figure 17: Load F ile to Memory
6Select your programmable file (*.hex or *.s19) and click
The binary code in the .s19 or .hex file will be loaded into STVD7 and you will be
able to access the Disassembly window and the Memory window. A workspace file
(of the same name a s the programmable file, but with an extension .wsp) w ill be
created automatically.
3.10 Changing your project settings
The Project menu contains the
recompile your application after having made changes to it in the course of
Build
and
Rebuild All
Open
.
commands you need to
31/63
Page 32
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
debugging. You may also access your project or toolchain settings in the event you
wish to change them.
Figure 18: Project menu
From the main menu, select
Project>Project Settings
.
32/63
Figure 19: Proje ct Se tti ngs wind ow
Page 33
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
You can change your settings here and continue running your application. When
you exit STVD7, the sy stem will ask you if you want to save these settings i n the
workspace you have been working in. If you c hoose
new workspace settings; if you choose
no
, these settings will be lost.
yes
, these will become your
Toolchain Path...
The
item invokes the following window:
Figure 20: Toolchain paths
In this window, you can define your builder and/or Assembler paths. Clicking
opens a browser window.
3.11 Saving workspaces
Whenever the current workspace is closed, it is automatically saved. This can
happen either when exiting STVD or opening or creating a new workspace.
In addition to this, a workspace can be explicitly saved with the
Workspace...
or
File>Save Workspace as...
The user is given the choice of which of the workspace element s to include in the
saved file. Either the visual environment or the debugging information may be
saved alone, or both may be saved together. This is configured as follows:
1From the main menu, select
2In the Options window that opens (see
commands.
Tools>Options
Figure 21
File>Save
.
), select the Workspace tab.
33/63
Page 34
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
3Choose whether you wish your saved workspace to include either the visual
environment or the debugging information or both.
4Select which windows will appear docked when a project is opened by checking
the appropriate check boxes in the
Floating windows in the main frame
area.
Only windows currently docked in the main window can be included.
34/63
Figure 21: Workpace tab of Options window
5Click
6Click
Apply
OK
to confirm your settings.
close the dialog box.
In addition, open file contexts and current window positions are saved when the
workspace is closed. This feature restores the workspace window, window layout
and file views to that which was current when STVD7 was closed. The toolbar
layout, plus customized toolbar content is also saved and restored with the
workspace (options set via the tabs entitled Toolbars and Commands).
By default (i.e. when saved automatically) the workspace is saved as file
application
<
executable file (for example, <
>.wsp. The name of the file corresponds to the name used for the
application
>.abs for a Hiware executab le file).
Page 35
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
Note :
Using the Configuration Setup dialog box (available from the MCU Configuration dialog
box), you can also control what type of M CU configuration information is restored from a
workspace file (*.wsp).
3.12 Debug context and Build context
There are two STVD7 c ontexts, the build context and the debug context. Until
now, in creating a workspace, and defining your project settings, you have been in
the build context. To proceed step—configuring your MCU—you need to change to
the debug context.
Briefly, the two contexts are different in that:
•In the build context, you can open and close workspaces and build or re-build
the application executable file.
•In the debug context you set the emulated MCU configuration (this step is
described in
Section 3.1 3
) and debug the executable file created while in the
build context.
3.12.1 Build Context
The build context is the context set when starting ST VD7. In this context, it is not
necessary to be connected to an emulator and the debug commands are not
available. You can also edit the source files of an application and perform the use
the
Build
command to perform compile and link actions in an interactive and
iterative way to re-build the application executable file.
3.12.2 Debug Context
In this context, the following debug actions can be carried out:
•Loading, running and stopping the application.
•Defining the MCU configuration (MCU options and memory mapping).
•Viewing source and disassembled code.
•Setting instruction breakpoints with a counter and/or condition.
•Setting data breakpoints.
•Viewing local variables, memory and ST7 registers.
•Viewing history of execution from the trace buffer or with the Call Stack feature
analyzing the performance of a piece of code.
35/63
Page 36
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
3.12.3 Switching between contexts
The switch between contexts usually occurs when the
Debugging
commands are used.
From the main menu, choose
click on the Start Debugging or Stop Debugging icons shown in
Figure 22: Start De bugging and Stop Debugging icons
While debugging, the editor allows source files to be modified. To switch to the
Build context perform either a
3.13 Configuring the MCU
After you create or open a workspace, the next step you must perform before
starting your STVD7 debugging session is to define and configure the target device
(MCU) that you wish to emulate.
The target device is defined and configured from the MCU Configuration window.
Start Debugging
and
Debug>Start Debugging or Stop Debugging
Chapter 3
Build
or
Rebuild
action or use the
Stop D ebug gi n g
Stop
or
.
Note:
1F irst, ensure that you are in Debug co ntext by clicking on . (STVD7 has
two contexts: Debug context and Build context—these are described in
Section 3.12
The first time you enter into the D ebug context after having created a new workspace, the
MCU Configuration window will be opened automatically.
2Select
.)
Tools>MCU Configuration
from the main menu. The MCU
Configuration window will open.
36/63
Page 37
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
An example of a typical MCU Configuration window is shown in
MCU Name field
Chapter 3
.
Note:
Option configuration
fields
Memory configuration
fields
Graphic memory
configuration viewer
Figure 23: MCU Configuration window
The options shown in the above example may not be avai l abl e for your particular target MCU.
3Set the Target MCU. In the MCU name field, select the target device for which
the application is intended from the dropdown box. Once a target MCU has
been chosen, the
Option configuration
and the
Memory configuration
fields will
show the default values for this device.
4Configure the MCU Options and On-Chip Peripherals. All of the
configurable options on your target hardware device are listed in the
configuration
fields. Beside each
option
, a default
value
is given. You may
Option
change this value by clicking on it and choosing a new value from the drop
down list. This allows you to configure your target device’s options and on-chip
peripherals. Depending on the MCU selected, the default settings in the
configuration
fields will change. It i s up to you to configure those options that will
Option
impact your application so that the emulator accurately em ulates your target
device.
Note :
For more information about the configurable options available on your target hardware
device, please consult your target MCU’s datasheet.
37/63
Page 38
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
5Configuring the MCU Memory. The default memory settings depend on the
MCU selected. However, you can configure the memory settings as you wish if
your application requires non-default settings. This feature would enable you,
for instance, to temporarily increase the ROM size during the development
phase of your application.
38/63
Memory
configuration fields
Graphic memory
configuration viewer
Figure 24: Memory mapping
There are two methods for configuring the memory settings on the M CU: by
typing in the start and s top addresses of eac h mem or y zone into the memoryconfiguration window, and by graphically moving the memory zone
boundaries in the graphic memory configuration viewer (see
page 39
for
more instruction ).
Memory zone types
The left column of the memory configuration window indicates the address
range of each memory zone. The right column indicates the memory type of each
zone. Depending on your target MCU, the available memory types may be:
Peripherals, RAM, ROM, Stack, System, EEPROM, Reserved, Vectors,
Page 39
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
Application. Some of these zones can have their type and size modified, others
cannot be modified. Their definitions and properties are explained as follows:
•Peripherals: Microcontroller internal or rebuilt peripherals registers. Their
properties are defined as in the microcontroller datasheet. This memory
cannot be modified.
•RAM: Random-Access-Memor y of the microcontroller. This memory type can
be modified.
•ROM: Read-Only Memory of the microcontroller. Write protected. This memory
type can be modified.
•Stack: Stack of the microcontroller. This memory type cannot be modified.
•System: The emulator uses this space for emulation management. This
memory type cannot be modified.
•EEPROM: This memory is internal to the microcontroller and is located inside
the emulation device. The programming of this zone is done according to an
automaton found in the datasheet. This memory type cannot be modified.
•Reserved: This memory zone is reserved as on the microcontroller. It i s not
allocated to any use and is write protected. This memory type cannot be
modified.
•Vectors: This memory zone contains the user interrupt vectors zone. It is write
protected. This memory type can be modi fied.
•Application: This memory type is microcontroller-specific. The user can add
memory or peripheral resources on its hardware. It is not available on ever y
emulator. Properties are linked to the user hardware. This memory type can be
modified.
For most target MCUs, you may modify the following types of memory zone: RAM,ROM, Reserved and Application. This feature would enable you, for instance, to
temporarily decrease the RAM zone, increase the size of the ROM (to exceed what
is available on the real microcontroller) during the first stages of development.
Once your program is functional, you can start to optimize its size by reducing your
code and returning these zones to their original size. There are two different
actions you may perform on the memory configuration:
•change the type of an entire existing zone.
•define a new zone of any type wherever possible.
To change an existing memory zone:
1Select the memory zone to be modified.
39/63
Page 40
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
2Click on the
Modify
button at the bottom of the window. A New MCU Memory
Range dialog box will open, allowing you to change either the address range
and/or the memory type of the memory zone.
Figure 25: New MCU memory ra nge
To create a new zone of any type:
1Click on the
Insert
button. The New MCU Memory Range dialog box will
appear.
From
2Enter the addr ess range of the new m e m or y z one in the
Type
3Select the type of the new memory zone in the
OK
4Click
to validate your choice.
field.
and To fields.
The new memory zone will then appear in the MCU Configuration window unless
you tried to create a new z one in a non-m odifiable memory s pace (such as Stac k
or EEPROM).
To use the Graphic Memory Config uration viewer:
1In the me mory configuration window, click on the zone whose boundaries you
wish to move.
2Check the
Selection auto zoom
box in the upper right-hand corner. The
graphical view of the memory configuration will be scaled so that the zone you
have selected is easily visible.
3At the upper and lower boundary of the zone, at the left-hand side of the
graphical viewer, you will see a small triangle and rectangular box giving the
boundary addresses of the memory zone. You can c hange a boundary addr ess
by dragging and dropping the triangle with the mouse to its new location. The
triangle can be moved either up or down, left or right in the graphical viewer.
40/63
Page 41
ST7MDTU3-EMU2B Emulator User Manual3 - STVD7
The MCU configuration that you specify will, by default, be saved in a wo rkspace
file (*.wsp) for the project. The next time the application i s opened, the STVD will
automatically set the MCU configuration (as well as the layout of opened windows
and other debug information) to the same conditions you had when you left the last
debugging session.
If you do not wish your MCU configuration information to be saved in the
workspace file, you must alter the default Configuration Setup options by clicking
on the
Conf...
button.
3.14 Start debugging!
Once i n debug context, you are now ready to start debugging your application
using the emulator.Full documentation on how to:
•control your STVD7 work environment
•use its integrated editor
•use the many debugging windows and features
is available from the online help and the online STVD7 user manual, located under
Help
in the main menu.
41/63
Page 42
3 - STVD7ST7MDTU3-EMU2 B E m ulator User Manual
42/63
Page 43
ST7MDTU3-EMU2B Emulator User Manu al4 - Emulator Features
4 EMULATOR FEATURES
4.1 Main Features of the ST7 HDS2 Emulator series
The features described below are common to all ST7 HDS2 emulators:
•Real-time emulation capability (internal frequency from internal 0.5 MHz up to
8MHz).
•Full memory emulation (up to 64 KB).
•Real-time trace with 3 event conditions allowing selective recording.
•Hardware breakpoint capability on instruction Fetch.
•Hardware breakpoint capability on address.
•Breakpoint capability on invalid address access.
•Breakpoint capability if trace is full.
•1K x 32-bit real-time trace (address, data, ctrl).
•6 differ ent m odes to configure trace access by combining 3 event conditions.
•Selective trace recording capability.
•2-Trigger output capability.
•4 probe inputs to display application signals in the trace.
4.2 Specific Features
The features described below are specific to the ST7MDTU3-Active Probe:
•6 MHz to 24 MHz internal clock operation.
•The application power supply follower allows this emulator to run with
application V
from 4.0 V to 5.5 V. When the probe is not connected to an
CC
application board or if the application board isn't powered (application
V
<4.0 V), the VCC default value is 4.0 V.
CC
4.3 Emulator Architecture
The ST7MDTU3-EMU2B em ulator is composed of 2 parts:
•The ST7 HDS2 ( Hardware Development System) contains all of the common
resources necessary to emulate any ST7 device (such as memory and the link
interfaces with the PC). This board is connected to the PC via a parallel link
and to the second part by two 50-pin connectors.
43/63
4
Page 44
4 - Emulator FeaturesST7MDTU3-EMU2B Emulator User Manual
•The ST7MDTU3-Active Probe contains the specific resources necessary to
emulate the ST72F63 MCU, and is used as a link between the ST7 HDS2
and your application.
ST7MDTU3-EMU2B
PC
Parallel Link
Emulation Memory
4.3.1 ST7 HDS2 Hardware
The hardware functions provided by this component are listed below:
•HDS2 CPU: Used to control the ST7XXX-HDS board and manage common
HDS2 features such as the parallel link with the PC.
ST7 HDS2
Control RAM
Trac e M em o ry
ST9 MCU
Flat Cabl es
Address bus
Data bus
Control bus
Socket Adapter
Generic
Probe
ST72F63-TEB
Emulation Chip
Socket
Application
Board
44/63
•RAM memory:
-64K bytes for ROM and RAM emulation.
-64K bytes as break points control and Mapping.
-1K x 32-bit as trace memor y.
•Hardware breakpoint control logic to manage breakpoints from the 16-bit
address bus.
•Logical analyser control logic to manage sophisticated recording and
break events in the trace.
•PC link: parallel interface for communication with PC.
Page 45
ST7MDTU3-EMU2B Emulator User Manu al4 - Emulator Features
•ST7MDTU3-Active Probe interface—3 buses connect the ST7 HDS2 to
the ST7MDTU3-Active Probe:
-Address bus (16-bit) of the ST7 emulation chip used for RAM addressing
and trace.
-DATA bus (8-bit) of the ST7 emulation chip.
-Control bus to manage ST7MDTU3-Active Probe hardware-like
breakpoint features.
ST7 HDS2
Power
Supply
Data
Emulation
RAM
Data
ST7 Data
Parallel link
Parallel
Interface
Data
Control
PC
HDS2
Control
ST9050
AddressAddressST7-Address
4.3.2 ST7MDTU3-Active Probe Hardware
The ST7MDTU3-Active Probe is made up of two probe components—a ST7
Generic Probe and a ST72F63 Target Emulation Board (TEB) included in the
emulator kit. Se e
Step 3: Connecting the Probe to your Application Board
page 13 for more details.
Data
RAM
Trace
RAM
Control
ST7-Address
ST7MDTU3-Active Probe
on
The hardware functions provided by the ST7MDTU3-Active Probe are:
•Probe Emulation MCU: This is an ST7 microcontroller similar to those of
the emulated target device(s), which runs in emulation mode. It acts as the
45/63
Page 46
4 - Emulator FeaturesST7MDTU3-EMU2B Emulator User Manual
ST7 core and gives access to all on-chip peripherals.
•Control logic: Control logic is provided to manage the software execution by
the user (i.e. program running and halting).
•Application V
follower: The probe emulation MCU is supplied with the
CC
same voltage as the application (i.e. must be in the range 4.0 V to 5.5 V).
•ST7 HDS2 interface: All of the communication buses connecting the active
probe to the ST7 HDS2 board are buffered:
-ST7 Address bus (16-bit) of the ST72F63 in emulation mode.
-Data bus (8-bit) of the ST72F63 in emulation mode.
-ST7 emulation chip control bus for trace recording, breakpoints and
memory mapping.
ST7-ACTIVE PROBE
DataST7-Data
ication Board
ed
Control/Status
Clock
Source
Control
Data
PLD
Automaton
Control
Decoder
Data
Emulation Signals
Data
ST7
Emulation
MCU
I/O
Periph.
Device
Adapter
I/O, Peripherals
46/63
HDS2 D
ST7-Addresses
Addresses
Addresses
Power Supply
Application Follower
ST7 Generic Probe
Application Board
ST72 F 6 3-TEB
Page 47
ST7MDTU3-EMU2B Emulator User Manu al4 - Emulator Features
4.4 Output Triggers
Your ST7 HDS2 emulator has two output triggers, OUT1 and OU T2. The OUT1
and OUT2 outlets are available via SUB-click connectors located on the front panel
of the ST7 HDS2 emulator box.
OUT1 Trigger OutputOUT2 Trigge r Outp ut
Analyser
ST7 HDS2 Emulator
Triggers
Probe
You can program the output signals to these triggers using ST7 Visual Debug:
1From the main menu in ST7 Visual Debug, select
View>Hardware Events
The Hardware Events window will open in your workspace.
.
47/63
Page 48
4 - Emulator FeaturesST7MDTU3-EMU2B Emulator User Manual
2Right-click the mouse while the mouse pointer is anywhere in the Hardware
Events window.
3C hoose
New Hardwa re Ev ent
from the contextual menu. The Hardware event
settings dialog box will open as below.
4C hoose the trigger output that you wish the signal to be sent to (i.e. OUT1 or
OUT2) and check the
Enabled
box.
5You m a y trigger output signals by setting an event on any of the following:
-a whole variable—creating an
event for synchronization
, which enables
you to preset the pulse synchronization for external equipment connected
to the output trigger.
-a single address—also creates an
-a range of addresses—creating an
event for synchronizatio n
event to measure time
(see above).
, which enables
you to measure the time elapsed during a subroutine execution.
A positive impulse is emitted on OUT1 and OUT2 when a specific condition is met.
This impulse lasts for one Clock cycle.
48/63
Page 49
ST7MDTU3-EMU2B Emulator User Manu al4 - Emulator Features
4.5 Analyser Probe Input Signals
The ST7 HDS2 allows you to use 4 external input signals (TTL level). These
signals are on pins 6,7,8,9 of the Anal yser Probe connector located on the front
panel of the emulator as shown below.
V
CC
GND
5
432
9
AL3 AL2 AL1 AL0
78
1
6
You can view these probe inputs using ST7 Visual Debug. From the main menu,
select
View>Trace
. The input signal values are listed under the Sig column
(AL3..0).
ST7 Visual Debug’s Logical Analyser allows you to use these input signals to
define trace filtering or output trigger events. From the main menu, select
Tools>Logical Analyser
to open the dialog box. A full description of how to use
this facility to control trace recording or trigger output signals is given in the ST7
Visual Debug online help.
A rainbow-colored cable will also be delivered to connect your application to these
inlets. Each red connector is to be connected to your signal. Each black connector
is to be connected to the reference ground for the signal.
Colors are attributed as follows:
•AL0 is to be taken between the RED (signal) and BROWN (ground) wires
•AL1 is to be taken between the YELLOW (signal) and ORANGE (ground)
wires.
•AL2 is to be taken between the BLUE (signal) and GREEN (ground) wires.
•AL3 is to be taken between the GREY (signal) and PURPLE (ground) wires.
49/63
Page 50
4 - Emulator FeaturesST7MDTU3-EMU2B Emulator User Manual
4.6 Front Panel LEDs
Four LEDs on the front panel of the HDS2 box indicate the state of the
development tool during emulation:
•Power (Green)— indicates that the 5 V power supply is ON.
•Run (Yellow)—indicates that the ST7 is running (not in RESET, WFI and HALT
mode).
•System (Red)—not used wi th this emulator.
•Reset (Red)—not used with this emulator.
ST7 HD S2 Em ulator
Run
System (unused)
Rese t (unused)
4.7 On-Chip Peripherals
You can configure certain on-chip peripherals in ST7 Visual Debug’s MCU
Configuration dialog box (refer to
so that the emulator accurately emulates your target device.
The on-chip peripheral options supported by the emulator are described in the
following sections.
Power
Analyser
Triggers
Probe
Section 3.6: Creating a workspace
on page 24)
50/63
Page 51
ST7MDTU3-EMU2B Emulator User Manu al4 - Emulator Features
4.7.1 Fosc
The emulator can work with three Fosc values that are generated by the emulator
clock source (max. frequency = 24 MHz, min. frequency = 6 MHz):
•24 MHz .
•12 MHz .
•6MHz .
Note:
Refer to Emulation Functional Limitations and Discrepancies on page 51 for information on
the application clock available on your emulator.
4.7.2 WATCHDOG
This option allows you to choose whether the watchdog timer is enabled by
software or by hardware.
When the Software option is c hosen, the watchdog has to be enabled by software.
When the Hardware option is chosen, the watchdog is always enabled.
Refer to the datasheet for your ST 7 MCU for more information on the wa tchdog
timer.
4.7.3 WGD+HALT
This option allows you to determine if a reset is generated when entering HALT
mode while the watchdog is active. There are two options: Reset,
generated when entering Halt mode if the watchdog is active, and No Reset,
where no reset is generated when entering Halt mode.
4.7.4 Oscillator Selection
where a reset is
This option determines the clock divider used to drive the USB interface at 6 MHz.
There are two options: 24 MHz,
where a 24 MHz oscillator is used, and 12 MHz,
where a 12 MHz oscillator is used.
4.8 Emulation Functional Limitations and Discrepancies
4.8.1 Power Supply
The application supply follower allows this emulator to run with an application V
ranging between 4.0 V to 5.5 V. If the application isn't powered, or the VDD<4.0V,
the power supply is maintained at 4.0 V. If your application is powered by a voltage
greater than 5.5 V, the emulator will limit this value internally to 5.5 V .
DD
51/63
Page 52
4 - Emulator FeaturesST7MDTU3-EMU2B Emulator User Manual
52/63
Page 53
ST7MDTU3 -EMU2B Em u lator User M anualAppendix A : Troublesh oo t in g
APPENDI X A:TROUBLESHOOTIN G
A.1 Identifying the Problem
IF YO U RECEIVE THE FOLLOWING:THEN...
Error Message (when starting the
STVD7 for HDS Emulator):
“No message received from emulator.”
Error Messages (when star ting the
STVD7 for HDS Emulator):
"Communication error with EMULA-
TOR board . ”
or
“SYSTEM ERROR DETECTED by
EMULATOR BOARD: RESET CPU.”
Ensure that:
•The parallel cable is connected between the
development board and one of the PC’s pa rallel ports
(LPT1 or LPT2). Note that the use of switch boxes
between the parallel port connector of your PC and the
development board is not recommended.
•The developm ent boa rd is powered on.
•The parall el cabl e us ed is th e one s upplied wit h the kit
by STMicroelectronics.
If none of the above items has been overlooked, this may
mean that your parallel port connection needs to be
reconfigured.
Please refer to
PC
below.
Ensure that:
•The flat cables linking the ST7MDTU3-Active Probe
and the emulator box are properly connected.
•The se lected configuration file matches the conne cted
ST7MDTU3-Active Probe configuration.
If it doesn’t, from within ST7 Visual Debug, open the
MCU Configuration dialog box by selecting
Tools>MCU Configuration
Choose the correct MCU target device in the dropdown
list, then cli c k
Changing the Parallel Port Setup on Y our
from the main menu.
OK
to save your changes.
A.2 Changing the Parallel Port Setup on Your PC
Under certain circumstances, you may receive the following error message:
"Connect i on Error (LPT1/LPT2): Interconnect ion fa il u r e. Verify y our in put/
output cable."
This may mean that the setup of the LPT1 or LPT2 port on your PC is not
compatible with the ST7MDTU3-EMU2 B.
To set up the port correctly:
1Shut down and restart your PC in order to enter the BIOS setup.
53/63
Page 54
Appendix A: Trou blesho ot ingST7MDTU3-EMU2 B E m ulator User Manual
2Follow the messages displayed on the screen and when prompted, press the
key required to enter the BIOS setup (usually a function key or the ESC key).
3Sel e ct the parallel ports menu. (This may be listed under I/O ports.)
4C hange the Mode of the LPT port that you have connected the development
board to (i.e. either LPT1 or LPT2) to one of the following compatible modes,
according to the following table:
Operating SystemCompatible Parallel Port Modes
Windows 95ECP, EPP, Bidirectional or Centronics
Windows 98EPP, Bidirectional or Centronics
Windows NT4ECP, EPP, Bidirectional or Centronics
5Save your changes and exit the BIOS setup.
A.3 Running the Hardware Test
The Hardware Test in ST7 Visual Debug lets you check that your emulator is
correctly connected, configured and working. You can test components of the
development board individually, or all at the same time.
If problems occur during debugging (such as bad debugger responses and
unexpected behavior), you should check for hardware problems using the
Hardware Test function, and if any are detected, contact your STMicroelectronics
sales representative (see
Product Support
on page 59).
You may open the Hard ware Test dialog box by:
•selecting, from the Main Menu,
Emulator>Hardware Test
•clicking on the Hardware Test icon in the Emulator toolbar.
Warning:Be c autious in perform ing a Hardware Test on the em ulator while an appl ication is
open. The o pened app lication WILL BE corrupted b y the h ardware testing pr ocess. If
you find that your application has been corrupted, simply close the application, and
reopen it.
54/63
Page 55
ST7MDTU3 -EMU2B Em u lator User M anualAppendix A : Troublesh oo t in g
The Hardware Test
dialog box shows a list
of different tests that
can be performed on
the emulator.
Check the box of each
test that you wish to
perform (they are all
checked by default)
and click Apply to start
the hardware test.
The Hardware tests
will be performed one
by one, and the results
summarized in the
dialog box as shown
on the right:
55/63
Page 56
Appendix A: Trou blesho ot ingST7MDTU3-EMU2 B E m ulator User Manual
56/63
Page 57
ST7MDTU3-EMU2B Emulator User Manu alAppendix B: Glossary
APPENDI X B:GLOSSARY
Application Board
This is the printed circuit board onto which you wish to connect the target ST7
MCU. It should include a socket or footprint so that y ou can c onnect the application
board to your emulator or development kit using the probe and the appropriate
device adapter. This allows you to emulate the behavior of the ST7 MCU in a real
application in order to debug your application program.
Device Adapter
Device adapters are included in your emulator kit to allow you to connect the
emulator to your application board. The type of device adapter depends on the
target device’s packaging. Many MCUs come in more than one different package,
and you should therefore use the device adapter that corresponds to the type of
package you have chosen for your application.
ECP
Extended capabilities port communication standard.
EPP
Enhanced parallel port communication standard.
LVD
Low Voltage Detector.
MCU
Microcontroller Unit. Otherwise referred to as the “target device” throughout this
manual. This is the core product (or family of products) for which the Development
Kit is designed to act as an emulator and programming tool. In general terms, an
MCU is a c om plete computer system, including a C PU, memory, a clock oscillator
and I/O on a single integrated circuit.
ST7MDTU3-Active Probe
A printed card having connector pins that allow you to connect the Em ulator to the
MCU socket of the user application board. Using the active probe allows the HDS2
emulator to function as if it were the target device embedded in your application.
The probe is connected to the emulator by two flat cables.
RC network
Resistor-capacitor network.
57/63
Page 58
Appendix B: GlossaryST7MDTU3-EMU2B Emulator User Manual
ST7 Visual Debug (STVD7)
A graphic debugger software package that allows you to debug applications
destined for the ST7 family of M CUs, either using a built-in simulator function, a
Development Kit or an HDS2 Emulator.
Ta rget Device
This is the ST7 MCU that you wish to use in your application, and which your
emulator or development kit will emulate for you.
TEB
Target Emulation Board. This is the interface between the emulator and the
application board. It is directly plugged into the HDS2 Generic Probe and
connected to the application board via an adapter.
USB
Univ ersal Serial Bus.
User Application Board
Designates your application board.
58/63
Page 59
ST7MDTU3-EMU2B Emulator User ManualProduct Support
PRODUCT SUPPORT
If you experience any problems with this product or if you need spare parts or
repair, contact the distributor or ST sales office where you purchased the product.
Getting prepared before you call
Collect the following information about the product before contacting ST or your
distributor:
1Name of the company where you purchased the emulator kit.
2Date of purchase.
3Order Code: Refer to the side of your emulator kit box. The order code will
depend on the region for which it was ordered (i.e. the UK, Continental Europe
or the USA).
4Ser ial Number: T he serial numbe r is located on the rear panel of the emulator
box.
Contact list
Note:
5Target Device: The sales type of the microcontroller you are using in your
development.
For Am erican and Canadian customers seeking tech nical support the US/Canad a is split
in 3 territories. According to your area, contact the following sales office and ask to be
transferred to an 8-bit microcontroller Field Applications Engineer (FAE).
Canada and East Coast
STMicroelectronics
Lexington Corporate Center
10 Maguire Road, Building 1, 3rd floor
Lexington, MA 02421
Phone: 781-402-2650
Mid West
STMicroelectronics
1300 East Woodfield Road, Suite 410
Schaumburg, IL 60173
Phone: 847-585-3000
West coast
STMicroelectronics, Inc.
28202 Cabot Road
59/63
Page 60
Produ ct Suppo rtST7 MDTU3-EMU2B Emulator User Manual
Suite 650
Laguna Niguel, CA
Phone: (949) 347-0717
Europe
France (33-1) 47407575
Germany (49-89) 460060
U.K. (44-1628) 890800
Asia/Pacific Region
Japan (81-3) 3280-4120
Hong-Kong (852) 2861 5700
Sydney (61-2) 9580 3811
Taipei (886-2) 2378-8088
Software updates
You can get software u pdates from the ST Internet web site http://mcu.st.com.
For information on firmware and hardware revisions, call your distributor or ST
using the contact list given above.
Hardware spare parts
Most of the hardware you will require is included in the emulator kit. However,
some special applications may require additional parts, such as connecting an
external clock, or you may need additional sockets for your application board.
Below is a list of manufacturers and dealers of SMB and BNC connectors that can
be used with our product.
European manufacturerRadiall
and product references:For worldwide sales locations,
The EXTERNAL clock male connector on the emulation probe has the
following commercial reference:
-In SMB range: Ref.: 114665.
Adaptable Female connectors that fit this connector are:
-SMB upright range
Ref.: 114005 for cable 2,6.
Ref.: 114003 for cable 4,2.
Ref.: 114009 for cable 3,8.
visit Radiall’s website at:
www.radiall.com
60/63
Page 61
ST7MDTU3-EMU2B Emulator User ManualProduct Support
-SMB kneed range
Ref.: 114165 for cable 2,6.
Ref.: 114163 for cable 4,2.
-SMB to BNC range
Ref.: 191214. Adapter SMB female / BNC male.
Ref.: 191215. Adapter SMB female/ BNC female.
USA manufacturerR-Tek
and product references411 Quentin Road
Palatine, IL 60067
Phone: (847) 934-7900
Fax: (847) 934-7946
Adaptable female connector part numbers:
-CCAX00168-2: cable length 2 ft, with SMB plug to BNC plug.
-CCAX00168-3: cable length 3 ft, with SMB plug to BNC plug.
Yamaichi sockets
You can order additional Yamaichi QFP sockets directly from Yamaichi at:
Produ ct Suppo rtST7 MDTU3-EMU2B Emulator User Manual
62/63
Page 63
6
4
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the
consequences of use of such inform ation nor for any infringement of patents or other rights of third part i es which ma y result from it s use.
No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in th i s
publication are subject to change without notice. This publication supersedes and replaces all information previously supplied.
STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express wr itt en
approval of S T M i croelectro ni cs.
The ST logo i s a registere d trademark of STMicroelectronic s.
®
Intel
Microsoft
Purchase of I
Australia - Brazil - China - Finland - France - Germany - Hong Kong - India - Italy - Japan - Malaysia - Malta - Morocco - Singapore - Spain
2
C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an
2
I
C system is granted p rovided that the system conf orms to the I2C Standa rd Specification as defi ned by Philips.
®
, Windows® and Windows NT® are U.S. registered trademarks of Microsoft Corporation.
is a U.S. registered trademark of Intel Corporation.