Emudiag
Emudiag
series
User
Manual
COPYRIGHT NOTICE
Copyright (c) 2007 by Signum Systems Corporation. All rights are reserved worldwide. No part of this
publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into
any language or computer language, in any form or by any means, electronic, mechanical, magnetic,
optical, chemical, manual, or otherwise, without the prior written permission of Signum Systems.
DISCLAIMER
Signum Systems makes no representations or warranties with respect to the contents hereof and
specifically disclaims any implied warranties of merchantability or fitness for any particular purpose.
Also, Signum Systems reserves the right to revise this publication and to make changes from time to
time in the content hereof without obligation of Signum Systems to notify any person or organization
of such revision or changes.
WARRANTY
Signum Systems warrants to the original purchaser that this product is free of defects in material and
workmanship and performs to applicable published Signum Systems specifications for a period of SIX
MONTHS from the date of shipment. If defective, the product must be returned to Signum Systems,
prepaid, within the warranty period, and it will be repaired or replaced (at our option) at no charge.
Equipment or parts which have been subject to misuse, abuse, alteration, neglect, accident,
unauthorized installation or repair are not covered by warranty. This warranty is in lieu of any other
warranty expressed or implied. IN NO EVENT SHALL SIGNUM SYSTEMS BE LIABLE FOR
CONSEQUENTIAL DAMAGES OF ANY KIND. It is up to the purchaser to determine the
reliability and suitability of this product for his particular application.
series
Introduction
EmuDiag allows you to test the connection between your computer and the
emulator as well as update the emulator firmware. Additionally, the program can
diagnose and test the JTAG connection to your target board. Even though this
document refers mainly to Signum JTAGjet emulators, it is also applicable to
the ADM-51 emulator. A rudimentary JTAG design guidelines and
troubleshooting section is included to help you solve problems when connecting
to the CPU and determining a malfunction of the emulator.
Installation
Almost all Signum software products — debugger drivers, flashers etc. —
include EmuDiag.exe. So does Chameleon Debugger. A shortcut to EmuDiag is
installed in the Windows Start menu for a particular program or driver. For
example, EmuDiag that comes with the Code Composer Studio drivers for
JTAGjet can be started from the Start menu entry as shown in Figure 1
1
SI GNUM S YS TE MS
If EmuDig is not automatically installed, the user can install the utility from the
Signum Systems Development Tools for MS Windows CD. Insert the disk into your
CD-ROM drive, and from the Master Setup screen, select JTAGjet Utilities.
Double-click EmuDiag (FIGURE 2FIGURE 2FIGURE 2).
2
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
The EmuDiag package includes the latest version of system-level USB drivers
for the JTAGjet and ADM51 emulators. Drivers older than those in the package
are updated during the installation process.
3
SI GNUM S YS TE MS
Select the emulator and click the Next button to establish the connection. If
the emulator with the selected serial number is not connected to the USB
port, EmuDiag will attempt to connect to another emulator of the same
type. If there are multiple emulators of the same kind to choose from, user
intervention becomes necessary.
4
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
5
SI GNUM S YS TE MS
EmuDiag Buttons
After connecting to the emulator, the following fields appear in the right side of
the EmuDiag window (Figure 7).
6
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
FIELD DESCRIPTION
Help Displays the EmuDiag PDF help file.
JTAGjet/ADM51/ Selects the emulator you would like to connect to.
Connect Displays the connection dialog box and version
summary.
Get Info More detailed description of modules.
Update Firmware Browse for the UPG file and update the JTAGjet
firmware.
All Determines which connection tests will be executed.
Tests/Selecti
on
Test Connection Executes the connection tests.
Test JTAG Setup and test the JTAG connection to the target.
Clear Log Clears the messages in the log window.
Save Log Saves a log with messages to a text file.
Copy Log to Copies the current log window to the clipboard.
the Clipboard
Done Terminates EmuDiag.
The Test Connection, Test JTAG, and Update Firmware functionality (see the
Field column in the table above) is described further in the text.
7
SI GNUM S YS TE MS
tests to run. The reliability test executes a series of patterns on the USB channel
and checks the responses from the JTAGjet. The performance test measures the
packet transfer speed to and from the emulator.
Provided that the emulator hardware functions normally, reliability tests on the
USB port will never show errors. This is because the USB protocol includes
check-sum and will re-transmit corrupted packets and silently recover from any
hardware related data errors.
The performance test evaluates most of the settings affecting the performance
of the debug process and and overall experience. These settings, displayed in the
EmuDiag window, are explained below. Note that higher values correspond to
better performance.
8
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
When using USB 2.0 ports, you should see similar values on your system. These
values usually do not depend on the type or speed of the CPU, but on the type
and model of the USB controller in your computer. Some brand-name add-on
PCI USB 2.0 cards provide excellent performance.
If Selection is used instead All Tests (above the button), it is possible to select
individual tests to be run. To select individual tests, choose Select form the
drop-down list located above the Test Connection button.
The USB transfer time histogram test runs for 20 seconds, during which it
captures the USB response time and displays a histogram of individual packet
transfer time (Figure 9).
9
SI GNUM S YS TE MS
EmuDiag process off. A large number of packets that travel long indicate an
overloaded CPU or physical memory running out.
10
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
Select the header that matches your adapter. Illustrations and detailed
description of all available JTAGjet adapters can be found in the JTAG Probes for
Signum Emulators document available in PDF format at www.signum.com.
Table 1 matches Signum adapters with the corresponding JTAG header
SIGNUM ADAPTER J TA G H E A D E R S E L E C T I O N
PAR T N U M B E R
11
SI GNUM S YS TE MS
SIGNUM ADAPTER J TA G H E A D E R S E L E C T I O N
PAR T N U M B E R
JTAG tests will work even if a wrong header is selected, because the standard
JTAG signals (TCK, TMS, TDI, TDO and nTRST) are always available.
However, the selected header defines which additional signals can be used,
system reset being the most important. If you have selected a wrong type of the
header, the debugger may report that CPU is being held in reset, while in reality
there is no reset on the header. The software may also try to drive pins that
either do not exist or have unexpected assignments.
After selecting the clock frequency, press the Test button, deciding how many
passes of the test should be run. Specific bit patterns are scanned on the TDI
12
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
pin (to the device). The output on the TDO pin (from the device) are captured
and compared with the TDI input. If the two patterns do not match, an error is
displayed (Figure 13).
The error in Figure 13 occurs when the device responds, but the JTAG
scanning process is not stable. To fix the problem, select a slower clock, or use
the Adaptive/RTCK option, and re-run the test.
13
SI GNUM S YS TE MS
The highest JTAG clock frequency allowed is determined and set. In our
example, it is 1.875 MHz (Figure 16).
In the target used during our test, the PLL was not initialized. The CPU was
running with a slow clock, which was the reason why the faster JTAG clock
settings failed.
As the message in Figure 15 indicates, that automatic detection will try neither
clock frequencies higher than 10MHz (15, 20 or 30MHz) nor Adaptive/RTCK.
You must select these frequencies manually, after which you should test their
validity.
14
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
ADAPTIVE CLOCK
The Adaptive/RTCK JTAG Clock should be selected for all synthesized cores
denoted by the –S suffix after the core’s name, such as the ARM7TDMI-S or
ARM926EJ-S. This is the most optimal setting for these cores that allows them
to lower the CPU speed and conserve battery power without losing the
communication link to the emulator. You should make sure that the RTCK
signal on the JTAG probe is connected to the device.
For tips covering a number of JTAG-related tips, please refer to the section
titled Basic JTAG Debugging Guidelines on p. 24.
Auto-detection is based on JTAG scans and JEDEC JTAG IDs read from the
JTAG. IR values show the length of the JTAG instruction register for that
device.
15
SI GNUM S YS TE MS
Above image shows OMAP161x, but in reality the processor is the OMAP5912.
Simply, OMAP161x and OMAP5912 use the same devices with the same JTAG
IDs. Please note that the leftmost device (IR=8) does not have an ID. Only the
device in the center (the ARM926EJ-S) has one: 02F denoting Texas
Instruments as the manufacturer.
In general, most of Texas Instruments DSP processors do not implement JTAG
IDs, and very often you may see pictures as follows:
16
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
The devices in Figure 20 do not have JTAG IDs. Only one of them is detected,
thus its IR is known. When there are multiple devices on the JTAG, the
following may occur (Figure 21):
EmuDiag is unable to determine the IR for each device. Consult the CPU
documentation to determine the order of the devices. Note that EmuDiag
categorizes an unknown device as BYPASS.
Table 2 lists the IR length of several common devices and cores.
J TA G D E V I C E O R C O R E IR
BITS
ARM7, ARM9, OMAP, TMS470 4
ARM11, OMAP2, MPCore 5
Cortex, OMAP3 4
ETB (Embedded Trace Buffer) 4
XScale (Intel) 4 or 5
Older TI’s TMS320 DSP: C24x, C54x, C620x, C670x 8
17
SI GNUM S YS TE MS
J TA G D E V I C E O R C O R E IR
BITS
Newer TI’s TMS320 DSP: C621x, C671x, C672x 46
Newest TI’s TM320 DSP: C28x, C55x, C64x, C64x+ 38
ICEPICK (Texas Instruments) 2 or 6
TABLE 2 The IR length of selected processors.
The OMAP and DaVinci processors comprise a few JTAG devices and cores,
often in various combinations. Some of these CPUs, such as DaVinci DM6446,
have alternative boot modes. The list of the devices visible on the JTAG chain
may vary, depending on the mode selected using the board switches.
18
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
19
SI GNUM S YS TE MS
FIGURE 22 Auto-detecting the DaVinci DM6446 processor. Note the use of Adaptive/RTCK clock.
In both cases, the ICEPICK_C device appears as the first one on the JTAG
chain. Unfortunately, the ICEPICK reverts the JTAG geometry to the default
state after every JTAG reset or power-cycle of the board. (The default state is
selectable with the EMU0/EMU1 pins, as described in the processor’s
documentation.) To ensure that regardless of the initial state of the
EMU0/EMU1 pins, the driver or debugger will always “see” the same
geometry, select one of the pre-defined JTAG initialization schemes (Figure 23).
20
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
FIGURE 24 JTAG chain auto-detected when a predefined DM64x (ARM only) configuration.
The first one is ICEPICK and the other one is ARM. Their JTAG IDs are not
available, because they are read after the standard JTAG reset. Nonstandard
standard initialization results in unavailability of the IDs.
The “Custom (from disk file)” option allows you to browse for a file with low-
level JTAG initialization commands. Please contact Signum Technical Support if
you require special scans of your JTAG chain.
21
SI GNUM S YS TE MS
The dialog box displays the pin-out of the selected JTAG header. The black
circles symbolize pins with logical value 1 on them. White circles symbolize pins
with logical value 0. Recently changed pins are denoted with gray circles. You
can modify individual pin values by double-clicking the corresponding circles
and observing values on your target. The feature is useful for basic validation of
the JTAG signals, especially when the JTAG appears not working at all. Keep in
mind that on some CPUs, changes on such pins as EMU0 or EMU1, may re-
define the CPU boot mode.
The interface also allows you to re-assign the functions of TRST, EMU0, and
other JTAG pins. Press the Defaults button to reset all settings to their default
values.
22
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
23
SI GNUM S YS TE MS
24
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
Here are some hints and tips based on the Signum Technical Support
engineers’ experience with JTAG-related issues on a wide variety of target
boards.
• Always power the JTAGjet emulator first by attaching a USB cable to it;
power-up the target board afterwards. This allows the JTAGjet to take
control of all the JTAG lines right from the power-up moment and prevents
placing an unnecessary load on the target.
25
SI GNUM S YS TE MS
• Do not short-circuit the nSRST and nTRST lines. Otherwise, you may not
be able to stop the CPU at the reset vector since the nTRST line resets the
JTAG logic.
• As the system reset line (nSRST) is bi-directional, connect it directly to the
CPU pin rather than to the RESET switch on the board before the reset
circuit. This will allow the debugger to monitor the status of the RESET
button on the board and detect the moment the CPU is released from reset.
• Do not tie hard the EMU0/EMU1 lines on the 14-pin TI-style connector to
VCC or GND. These bidirectional lines control the CPU boot mode and
are driven high by the JTAGjet. Provide appropriate pull-up and pull-down
resistors on the board as needed.
• Certain processors have JTAG lines available on more then one pin assigned
during power-up. Make sure that the correct CPU boot mode has been
selected.
• If your target drives large currents, as often is the case with the motor-
control C2000 DSP. Use the JTAG isolator probe ADA-ISO-TI14 to
minimize the risk of emulator damage due to ground loops and excessive
noise on the GND and power lines.
• Connect the RTCK pin on the JTAG connector to the RTCK pin on the
device, if the latter is available. It will allow the emulator to work with
Adaptive/RTCK clock. The JTAG clock will adapt to the changing CPU
frequency.
• Do not use fixed clocks if the processor, such as the ARM7TDMI-S,
features a synchronized ARM core. A CPU application slowing down the
clock or going to sleep may cause debugging problems.
• Do not use the Adaptive clock on boards with the lines TCK and RTCK
shorted, as often occurs on the TMS470 and DSP boards. Use a fixed clock
instead.
• Avoid using fast clocks when connecting to a new board for the first time.
26
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
• Use clocks faster than 10MHz only if you are confident that the board and
the device will allow fast JTAG clocks.
• If you are connecting the JTAGjet emulator to a CPU simulated in FPGA
or to another hardware simulator, select a slower JTAG clock. Processors
simulated in FPGAs tend to run slow.
• In multi-processor systems, one processor is often designated as a master
that may hold the other processors in reset. Make sure that such a master
CPU releases the slave processors from reset when debugging one or more
of the slave processors.
27
SI GNUM S YS TE MS
The .upg emulator upgrade files are not part of the EmuDiag installation. They
are delivered from Signum to the user via email. Uncompressing the upgrade
package into the same folder where EmuDiag.exe is located will facilitate file
browsing.
EmuDiag starts loading the new firmware in steps. The updated process lasts 30
to 60 seconds. Do not disconnect the emulator and do not close EmuDiag
before the process ends. An update log of an update is shown in Figure 30.
28
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
To make verify that the newly updated firmware runs, turn the emulator power
off by disconnecting the USB cable when prompted. Reattach the USB cable
and click the Connect button to re-connect. The updated firmware version—9
in our example—is displayed (Figure 31).
FIGURE 31 Reconnecting the emulator to verify the presence of the updated firmware.
29
SI GNUM S YS TE MS
3. Click on TEST JTAG and click on Test JTAG Clock (JTAG clock should
be set at 10MHz). If the test fails, test it at 1MHz. If the emulator still fails it
needs repair.
30
EMU L ATO R D I AG N OS TI C U T I L I TY
U S E R M A N U A L
4. Make sure that the JTAG Header shows 14 pin TI DSP/OMAP. Click the
More button.
5. Test the CPU Reset and TRST by pressing the Detect button. If the test
fails, the emulator needs repair.
6. In the JTAG activity header picture set the checkbox Read every 0.5 sec
and double click on EMU0 pin. It should turn from black to white. Double
click EMU0 again to make it black again. If this test fails, the emulator needs
repair.
31