Debugger User
Debugger User
Debugger User
Warning ....................................................................................................................................
Basics .......................................................................................................................................
Restrictions ..............................................................................................................................
Configuration ...........................................................................................................................
Configuration Overview
10
11
Expanded Configurations
13
Installation ...............................................................................................................................
14
Software Installation
14
15
20
21
22
22
Multicore Debugging
23
General Information
23
23
24
25
Multicore Licenses
30
31
32
General
32
41
42
1989-2016 Lauterbach GmbH
Multiplex Settings
45
46
Settings
46
49
51
52
Multiprocessor Debugging
53
54
55
Software Installation
55
58
59
59
60
61
Break
63
eXception
64
eXception.NMIBREAK
65
eXception.NMIPOL
65
eXception.RESetPOL
65
RESet
66
SYStem
67
67
SYStem.Mode
68
SYStem.Option
69
Trigger
70
70
70
71
72
72
74
SNOOPer
75
75
76
77
80
83
85
87
Operation Modes
88
88
1989-2016 Lauterbach GmbH
89
90
91
95
98
99
Background
99
100
101
102
106
Background
106
106
107
Extended Command Line Arguments for Starting TRACE32 with a fourth example showing
how to handle white spaces and quotation marks.
Warning
NOTE:
Warning
Basics
ROM Monitor and JTAG/BDM Debuggers are low cost microprocessor development systems working for
numerous CPUs. A number of devices is available which can be combined very flexible to the developer's
needs.
ICD State Analyzer Module with Performance and Code Coverage functions
Stimuli-Generator
Clock-Generator
Evaluation Boards
These devices are connected to the PC via the PODBUS Interface Card, USB2.0/1.1 or Ethernet. The
corresponding software on PC runs with Windows-95/98/ME/NT/2000/XP or Linux and is compatible to the
TRACE32-ICE in-circuit emulator system.
In addition to the high speed interface the PODBUS Interface Card contains a universal counter system and
a trigger input/output.
You can also use the ICD Debugger as an extension for the TRACE32-ICE system e. g. to control additional
CPUs on the target system. The devices are connected to the PODBUS connector of the emulation
controller unit. In this configuration the software is available for the same operating systems as the
TRACE32-ICE system.
Restrictions
If the stimuli generator is used, it must be the first device connected to the PODBUS interface.
Basics
Debugger Licenses
For debugging it is necessary to obtain the licenses for the particular processors. The license is saved within
debug cable. For some processors, it is possible to save more than one license into the same cable. Those
licenses are available as so-called extension licenses (X-licenses, in case of processors belonging to the
same family) or additional licenses (A-licenses).
The licenses are dropped within debug cable into a so-called license matrix, consisting of 3 rows and 4
columns (example):
ARM Family
ARM7
LA-7746
ARM9
LA-7742X
ARM11
LA-7765X
C55x Family
TMS320C55x
LA-7830A
TMS320C54x
LA-7831X
TI DSP Trace
Support
LA-3802X
C6400 Family
TMS320C6400
LA-7838A
The entries in each row within the table shown above are associated to
Debugger Licenses
The licenses located in the currently used debug cable can be viewed by typing the VERSION command at
the TRACE32 command line or by choosing Help menu > About TRACE32:
X-Licenses are possible for processors of the same family as the base license or associated A-License. To
learn which license combinations are possible please contact LAUTERBACH sales department or
distributor.
Debugger Licenses
Configuration
Configuration Overview
Regarding the PODBUS interface there are three possible configurations:
Interface Cable
for PODBUS 1.5m
PODBUS
Interface
Card
Addr.
Select
Jumper
Dev.1
Dev.2
Trigger In/Out
MESS Out
Basic configuration
The PODBUS Interface Card requires no extra power supply. The counter system on the PODPC card
provides measurement functions as described in the Count command group. The BNC connector is used
to in- or output the triggers from the debug module.
Configuration
PC
Direct connection or
extension cable for PODBus
Dev. 1
Direct connection or
extension cable for PODBus
Dev. 2
PODPAR
Power
7-9V
Trigger
In/Out
Please use only the standard power supply unit, which you will receive together with the PODPAR interface
box. The trigger connector is used to in- or output the triggers from the debug module.
Configuration
(Power)
Debug
Module
EPROM
Simulator
(optional)
...
or direct
connection if
PODPAR
Target
Cable
CPU CLK
JTAG/BDM Connector
EPROM
Target
Together with the debug module you receive a single cable to connect the CPU clock to the target cable
plug. This way you can use the divided CPU clock as BDM clock. This option is not available at all ICD
Debuggers.
Optionally an EPROM simulator can be used to load and debug programs in the ROM area. One EPROM
simulator is used to simulate two 8 bit or one 16 bit EPROM. For that you get 3 adapters together with the
EPROM simulator, one for 16 bit EPROMs, one for 8 bit high and one for 8 bit low. To simulate EPROMs with
a wider bus size, two or more EPROM simulators can be put together.
10
Configuration
EPROM
Simulator
(ROM Monitor
Interface)
or direct
connection if
PODPAR
Other
Device
(optional)
...
Target
11
Configuration
On each adapter there are three extra pins for GND, NMI and RES. NMI and RES are outputs from a HTC
Schmitt trigger.
1
Male connector to EPROM Simulator
GND
NMI
RES
12
Configuration
Expanded Configurations
The base systems can be expanded very flexible. The following examples should give you an impression of
possible configurations.
32 Bit ROM Monitor
with Evaluation Board
PODPC
ESI
ESI
BDM Debugger
with I/O Test System
PODPC
STG
BDM
PODPAR
ESI
ESI
EVAL-166
BDM
EVAL-505
13
Configuration
Installation
In this section the installation for the ICD Debugger connected to the PC is described. The configuration of
the ICD debug system is done in the file CONFIG.T32 which must reside in the TRACE32 system directory.
Software Installation
See TRACE32 Installation Guide (installation.pdf).
14
Installation
Format:
<x>
Optional for Windows and Linux, but not for Unix: file name extension of the
executable.
<arch>
-c <configfile>
<c_args>
15
Installation
-s <startup_
script>
<s_args>
Sequence of white-space separated arguments passed to the PRACTICE startup script (*.cmm).
Next:
16
Installation
TRACE32 side
E
D
A
C
A
17
Installation
<c_arg2>: A network folder path containing the pdf files of the TRACE32 online help
The values passed as command line arguments to the user-defined configuration file are now used by
TRACE32:
Value of argument ${1}
NOTE:
The help.t32 file of the online help must reside in the TRACE32 system
directory (by default C:\t32).
18
Installation
<s_args>: These hex values - 0x1 and 0x2 - are passed to the PRACTICE start-up script
-c config3_usb.t32
<start_up_script> <s_args>
-s start3.cmm
0x1 0x2
AREA.view
;Open an AREA.view window
PRINT "Arguments passed to the start-up script: " OS.PPF()
PRINT "Value 1: &arg1"
PRINT "Value 2: &arg2"
The values passed as command line arguments to the PRACTICE start-up script are printed to the
AREA.view window.
The caret sign ^ serves as a line continuation character in Windows batch files (*.bat). White space
characters after ^ are NOT permissible.
19
Installation
JP1
JP2
Address (hex)
Address (dec)
on
on
on
350
848
off
on
on
250
592
on
off
on
260
608
off
off
on
280
640
on
on
off
300
768
off
on
off
330
816
on
off
off
340
832
off
off
off
390
912
20
Installation
; or optional LPT2
NOTE: The relation between the LPTx names in the config.t32 file and port addresses is fixed. LPT1 is at
378, LPT2 at 278 and LPT3 at 3BC. This may not be the same as the names used in Windows. If you have
a parallel port on your motherboard or graphics card it may be address 3BC, Windows may call it LPT1, but
in the config file you must specfiy LPT3.
If the PC supports EPP mode the following CONFIG.T32 file is required:
PBI=
LPT1
EPP
; or optional LPT2
EPP mode is the fastest operation mode for the PODBUS interface. It should be used wherever possible.
At common PCs the parallel port mode can be selected in the BIOS. The BIOS must be switched to EPP,
EPP V1.7 or EPP V1.9. Some PCs require special tools to modify the parallel port mode. Please ask your
PC manufacturer.
21
Installation
The bitmask defines which devices (PowerDebug, PowerTrace, PowerProbe, ... ) are controlled by the host
application program. A '1' means control the device, a '0' means skip the device. The leftmost bit controls the
first device on the bus i.e. the device with the host connection (USB, ETH).
Normally a use mask will contain a single set bit e.g. 1000, indicating that only one of the devices in the
PODBUS is used by the respective program (e.g. PowerView ARM frontend software uses a PowerTrace
device to access the target).
When using PowerView to control two devices the use mask will contain two 1 bits. An example for this is a
PowerDebug device and a PowerProbe device which are used to record signals corresponding to a debug
session of PowerDebug. Using this mechanism it is possible to combine a debugger and a PowerProbe
device, independently of their position in the PODBUS chain.
NOTE: PowerDebug modules without USB or with USB 1.1 only are special in the sense that it must be
considered as TWO devices (internally it combines multiple functions that were historically located in
separate boxes). Therefore the PowerDebug device is represented by either 00 or 11 in the use mask.
22
Installation
Multicore Debugging
General Information
Multicore debugging in general means that there are multiple cores on one chip which use the same JTAG
interface. In contrary, if there is more than one chip with different JTAG interfaces to be debugged
simultaneously, we use the term multiprocessor debugging.
The following chapters describe which hardware and licenses are needed and how to set up the TRACE32
software for multicore debugging. For detailed core specific settings, please refer to the particular Processor
Architecture Manuals. In addition, there is a number of PRACTICE sample scripts for different multicore
systems available on the software CD or can be received from LAUTERBACH support (for contact
possibilities, see www.lauterbach.com).
There are two general ways for multicore debugging:
single device solution: one debug module (debug box) for several cores
multi device solution: several debug modules (debug boxes), one for each core
In any case, each core has its own application software on the host PC, but those applications use different
ways to access the LAUTERBACH Debug Hardware, and, in the end, their particular core.
USB
or
Ethernet
Interface
Power
Debug
Module
JTAG
Handler
Target
Joint
JTAG
Interface
Core A
Core B
When using single device solution, the applications do not care about availability of the joint JTAG interface,
the different accesses are arranged by a JTAG handler. The application executables (t32marm and t32m320
in the diagram above) register themselves at the JTAG handler of the common Power Debug Module.
Therefore, the configuration files (default file name: config.t32) of the applications have to contain core=
settings (as specified below).
The master application (those belonging to the base license of the debug cable) has
to be started first to install the proper JTAG handler. Nevertheless, the setting to
define which core is addressed actually is done later on.
23
Installation
Host PC
Application 1
(e.g. t32marm)
Application 2
(e.g. t32m320)
USB
or
Ethernet
Interface
JTAG Handler
Podbus
Power Debug
Module
Target
Joint
JTAG
Interface
Core A
Core B
JTAG Handler
The multi device alternative demands self-administration of the access to the joint JTAG interface for each
application. The application reserves the JTAG port for usage, and releases it afterwards transferring its
Debug Module into tristate mode. The applications (t32marm and t32m320 in diagram above) have to be
configured to use their own separate debug box. Therefore, the configuration files (default file name:
config.t32) of the applications have to contain use= settings (as specified below).
In this case it does not matter which application is started first.
As well as in single device solution, the setting to define which core is
addressed at the end is done later on.
24
Installation
Target with
Multicore-IC
Joint JTAG Interface
clock
cable
Multicore
Debug Interface Cable
PC
trigger
in/out
DEBUG
MODULE
PODBUS
USB
interface
power
supply
AC/DC-adapter
Description: The TRACE32 debugging software running on the Host-PC uses a joint JTAG interface to
communicate with the cores on the multicore-IC. With Power Debug Ethernet Module the configuration looks
likewise, except of interposed hub and ethernet connection at the host PC.
25
Installation
Multicore
Target
Ethernet 100 BaseT,
Twisted Pair Ethernet
HUB
Preprocessor
to Trace Connector
Joint JTAG
Interface
Multicore
Debug Interface
Cable
PC or
Workstation
POWER
TRACE
ETHERNET
USB connector
AC/DC-adapter
Description: The TRACE32 debugging software running on the Host-PC uses a joint JTAG interface to
communicate with the cores on the multicore-IC. If several cores on the target provide trace information it is
possible to select which core is accessed by the Trace Preprocessor. If there are several trace ports on the
target, refer to configuration 5.
Using the USB connector of the Power Trace Ethernet module, the configuration looks likewise (without the
Ethenet hub of course).
26
Installation
Multicore Target
Processor
Core 1
Core 2
...
Core n
Joint JTAG
Interface
Y-Adapter
JTAG Connectors
PC
POWER
DEBUG
MODULE
POWER
DEBUG
MODULE
USB
interface
AC/DC-adapter
Description: The TRACE32 debugging software running on the host-PC uses separate debug boxes to
communicate with the cores on the multicore-IC. To do this, one debug cable for each core is necessary.
Some target boards already provide several JTAG connectors that represent a single one actually, in that
case the y-adapter is not needed.
The number of Power Debug Modules needed depends on the number of cores to be debugged.
27
Installation
Multicore Target
Joint JTAG
Interface
Processor
Core 1
Core 2
JTAG Y-Adapter
Preprocessor
to Trace Connector
PC
POWER
TRACE
ETHERNET
POWER
DEBUG
MODULE
up to 3 Power Debug Modules
possible
USB
interface
AC/DC-adapter
Description: The TRACE32 debugging software running on the Host-PC uses separate JTAG interfaces to
communicate with the cores on the multicore-IC. To do this, one debug cable for each core is necessary. If
several cores on the target provide trace information it is possible to select which core is accessed by the
Trace Preprocessor. If there are several trace ports on the target, refer to configuration 5.
Some target boards already provide several JTAG connectors that represent a single one actually, in that
case the y-adapter is not needed.
The number of Power Debug Modules needed depends on the number of cores to be debugged.
28
Installation
Configuration 5: Two PowerTrace- and optionally one or more Power Debug Modules
Multicore Target
Processor
Joint JTAG
Interface
JTAG Y-Adapter
Preprocessor
to Trace Connector
PC
Core 1
Core 2
...
Core n
POWER
POWER
TRACE
TRACE
ETHERNET ETHERNET
up to 2 additional
Power Debug Modules
possbible
USB
interface
AC/DC-adapter
Description: The TRACE32 debugging software running on the Host-PC uses separate debug boxes to
communicate with the cores on the multicore-IC. To do this, one debug cable for each core is necessary.
Some target boards already provide several JTAG connectors that represent a single one actually, in that
case the y-adapter is not necessary.
The number of additional Power Debug Modules needed depends on the number of cores to be debugged.
29
Installation
Multicore Licenses
For multicore debugging, it is necessary to obtain the licenses for the particular cores. In case of
configurations 3,4 and 5 (see chapter Hardware Configuration for Multicore Debugging), the licenses
are present in the respective debug cables (e.g. base licenses for each core). In contrast, the configurations
1 and 2 require all necessary licenses to be present in one debug cable. Those multicore debug cables
always consist of the so-called base license and additional A- or X-license(s) according to the further
core(s). In case there are only several equal cores of the same type on the chip, the so-called multicore
license has to be added to the base license. If there are already several different core license within one
cable, this namely permits multicore debugging (if supported by software).
The on-chip-trace licenses like ARM-ETB license do not count as a core license,
to debug several same ARM cores the multicore license LA-7960X is required.
To learn which license combinations are possible please contact LAUTERBACH sales department or
distributor.
30
Installation
31
Installation
At multicore debugging, each core belongs to one instance of the TRACE32 software, i.e., there are as
many TRACE32 instances resp. executables running as cores are to be debugged simutaneously.The
appropriate executable to be started is titled according to the name of the core family, and can be checked in
the properties of the installed debugger shortcuts.
t32m<corefamily>.exe
; on Windows
t32m<corefamily>
; on Linux or workstations
After installation, the particular predefined config files (config.t32) are for single core debugging only.
Therefore it is necessary to add certain settings as described in the following. It is recommended to copy the
existing config.t32 into a new file, the filename is freely choseable, and can be provided when starting the
executable.
Config file settings for single device solution
At single device solution, all TRACE32 applications use the same debug box:
Host PC
Application 1
(e.g. t32marm)
Application 2
(e.g. t32m320)
USB
or
Ethernet
Interface
Power
Debug
Module
Target
Joint
JTAG
Interface
JTAG
Handler
Core A
Core B
PBI=
CORE=2
32
Installation
At multi device solution, each TRACE32 application uses its own debug box:
Power Debug
Module
Host PC
Application 1
(e.g. t32marm)
Application 2
(e.g. t32m320)
USB
or
Ethernet
Interface
Target
JTAG Handler
Podbus
Power Debug
Module
Joint
JTAG
Interface
Core A
Core B
JTAG Handler
PBI=
USE=01
(see also chapter Using Multiple Devices on one PODBUS). In addition, it is necessary to specify the ID=
setting within OS section (the ID is used to store PRACTICE command history and associated source code
files within TMP directory, therefore it is alternatively possible to use same ID and assign separate TMP
directories to each TRACE32 instance):
OS=
ID=T32_CORE1
OS=
ID=T32_CORE2
33
Installation
Config file settings for both single and multi device solutions
To use the start/stop synchronization between the different core debuggers, the intercom port settings are
necessary (PORT= setting within IC section, see also chapter Start Stop Synchronisation):
IC=NETASSIST
PORT=20001
IC=NETASSIST
PORT=20002
In the example above the call syntax would be (assuming the config filename is config_core1.t32:
t32marm -c config_core1.t32
34
Installation
In the example above, the call syntax would be (assuming the config filename is config_core2.t32:
t32m320 -c config_core2.t32
35
Installation
Besides, there is the possibility to use just one generic template config file for all cores. The particular
settings are passed as parameter. Example for generic config file:
IC=NETASSIST
PORT=${1}
; Environment variables
OS=
ID=T32${1}
TMP=C:\temp
SYS=.\
HELP=h:\t32new\pdf
PBI=
${3}
${4}
${5}
${6}
; Printer settings
PRINTER=WINDOWS
; Screen fonts
SCREEN=
FONT=SMALL
HEADER=TRACE32 ${2} Multicore @${3} ${4} ${5}
${6}
The template variables ${1} to ${6} are replaced textually by corresponding calling parameters. In that way, it
is possible to select even the connection method (Parallel, USB or Ethernet) by parameters.
In this generic example the call syntax could be (assuming the config filename is config_mc.t32:
; Start ARM executable as 1st core via USB and intercom port 20001
t32marm -c config_mc.t32 20001 ARM USB CORE=1
; Start TMS320 executable as 2nd core via USB and intercom port 20002
t32m320 -c config_mc.t32 20002 C55x USB CORE=2
36
Installation
37
Installation
Example: start of further TRACE32 instances by first instance (with generic config file)
Using the OS command of TRACE32 PRACTICE language, it its possible to start further instances of
TRACE32 (see also IDE Reference Guide). This way offers the possibility to start multiple core debuggers
from one PRACTICE script file. In combination with a generic config file, this is a very smart way to set up
multicore debugging.
; start tpu executable as 2nd core via USB and intercom port 20002
os t32mtpu -c config_mc.t32 20002 eTPU_A USB CORE=2
For a description of the parameters refer to chapter Generic config file for each TRACE32 instance, see
above.
The very first instance, however, has to be started in common way (by batch file or shortcut), as described in
chapter Generic config file for each TRACE32 instance, see above:
; start PPC executable as 1st core via USB and intercom port 20001
t32mppc -c config_mc.t32 20001 PowerPC USB CORE=1
; start PPC executable as 1st core via ETH and intercom port 20001
t32mppc -c config_mc.t32 20001 PowerPC NET NODE=10.2.2.234 CORE=1
38
Installation
Complete example PRACTICE script for generic starting of multiple instances on Windows, using MPC5554
(with E200 and two eTPU cores), in which it is dynamically selectable to use USB or Ethernet connection:
; Sample eTPU setup script
; start eTPU debugger software and check intercom
=============================
&nodename=NODENAME()
&etpu1="intercom localhost:20002"
&etpu2="intercom localhost:20003"
; Test is etpu software is already running or not
if !intercom.ping(localhost:20003)
(
if "&nodename"==""
(
print "assuming connection is USB"
os t32mtpu -c config_mc.t32 20002 eTPU_A USB CORE=2
; wait until software is started
intercom.wait localhost:20002
os t32mtpu -c config_mc.t32 20003 eTPU_B USB CORE=3
)
else
(
print "connection is ETH"
os t32mtpu -c config_mc.t32 20002 eTPU_A NET NODE=&nodename
PACKLEN=1024 CORE=2
; wait until software is started
intercom.wait localhost:20002
os t32mtpu -c config_mc.t32 20003 eTPU_B NET NODE=&nodename
PACKLEN=1024 CORE=3
)
; wait some time until the software finished booting
; if you get and intercom timeout error on the following framepos
; commands
; increase time
wait 3.s
; multicore settings
==========================================================
intercom.wait localhost:20002
intercom.wait localhost:20003
&etpu1 SYStem.CONFIG.CORE 2.
&etpu2 SYStem.CONFIG.CORE 3.
)
39
Installation
25.
26.
20.
In the example above, the other TRACE32 instances are accessed from first instance by
intercom localhost:<port no>
command, which is stored into local PRACTICE variables (&etpu1 and &etpu2).
Automatic setup of config files
40
Installation
USB
or
Ethernet
Interface
Application 2
(e.g. t32m320)
JTAG
Handler
Target
Joint
JTAG
Interface
Power Debug
Module
Host PC
Application 1
(e.g. t32marm)
Power
Debug
Module
USB
or
Ethernet
Interface
JTAG Handler
Podbus
Power Debug
Module
Core A
Core B
Target
Joint
JTAG
Interface
Core A
Core B
JTAG Handler
The communication to the specified core is done not until the SYStem.Up command, and for preparation
(besides the proper processor selection) there might be some additional multicore settings to be done.
There is a number of PRACTICE sample scripts for different processors available on LAUTERBACH
software CD or directly from LAUTERBACH support (for contact possibilities, see www.lauterbach.com),
which may assist you in setting up multicore debugging.
Basically, there are two different ways to address the particular core:
daisy chaining
multiplexing
41
Installation
For those processors that have multiple so-called TAP (=Test Access Port) controllers, eg. one for each core,
it is necessary to provide the TRACE32 applications with daisy chain settings.
The JTAG port of the individual cores are arranged serially (daisy chained). The TAP controller controls the
scanning of data in the instruction register and the data register of the JTAG architecture.
The width of the data register depends on the instruction used (always 1 bit if the instruction
register contains the BYPASS instruction)
According to the JTAG convention there is an option to generate sequences for the scan chain, that ensure,
that individual TAP controllers behave neutrally (BYPASS). To address a specific core the debugger must
therefore be configured in such a way that, when generating the scan chain, BYPASS sequences are
created for all TAP controllers before and after this core. The associated settings are either determined by
selection of the processor (if fixed) and/or can be modified in the SYStem.CONFIG.state window.
To access the SYStem.CONFIG.state window, do one of the following:
Choose CPU menu > System Settings, and then click the CONFIG button.
42
Installation
IRPRE
<number> of instruction register bits of all cores in the JTAG chain between the
current core and the TDO signal.
IRPOST
<number> of instruction register bits of all cores in the JTAG chain between TDI
signal and the current core.
DRPRE
<number> of cores resp. TAP controllers in the JTAG chain between the current
core and the TDO signal (one data register bit per TAP controller which is in
BYPASS mode).
DRPOST
<number> of cores resp. TAP controllers in the JTAG chain between the TDI signal
and the current core (one data register bit per TAP controller which is in BYPASS
mode).
Slave
All debuggers except one must have this option active. Only one debugger - the
master - is allowed to control the signals nTRST and nSRST (nRESET).
43
Installation
In case of multi device solution, the following additional settings have to be made:
TriState
If more than one debug box shares the same JTAG port, this option is required.
The debugger switches after each JTAG access to tristate mode. Then other
debuggers can access the port.
TAPState
(default: 7 = Select-DR-Scan). This is the state of the TAP controller when the
debugger switches to tristate mode. All states of the JTAG TAP controller are
selectable. The default value is recommended.
TCKLevel
Level of TCK signal when all debuggers are tristated (0 in case of pull-down on
target, 1 if pull-up).
In case the daisy chain settings are preconfigured by processor selection, they are displayed within
SYStem.CONFIG.state window:
The example above shows both core and ARM-ETB daisy chain settings, at which they both are located
within same daisy chain sequentially. If there are additional TAP controllers beyond the selected multicore
processor located on the target board (e.g. several daisy-chained multicore chips together on one target
board), the necessary values have to be entered into edit controls.
44
Installation
Multiplex Settings
For some processors (like STARCORE or NIOS-II) it is necessary to specify individually which core the
current TRACE32 instance should debug.
SYStem.CPU <multicore processor>
SYStem.CONFIG.CORE 1
45
Installation
To use the Start/Stop Synchronisation, the intercom port settings within config file(s) are required (refer to
chapter Setup and Start of TRACE32 Software.
The synchronisation itself is done by SYnch commands, according to the following steps:
1.
SYnch Settings
Connect
MasterGo ON
If the program execution is started, the program execution for all other
processors which have SlaveGo ON is also started.
MasterBrk ON
MasterStep ON
46
Installation
It is optionally possible to set both master and slave settings ON, to let this core react on other core
events, too.
The PORT= value within IC section of the config file of the current core has
to match the value(s) of the SYnch.Connect command(s) of the
coressponding debugger(s), while the SYnch.Connect value(s) of the
current core has(have) to match those values from the config files of the
other core debugger(s).
In other words, the PORT= value(s) within config file(s) are server port
numbers, while the SYnch.Connect values are client port numbers (see
also chapter Setup and Start of TRACE32 Software).
2.
SYnch Settings
Connect
SlaveGo ON
SlaveBrk ON
SlaveStep ON
It is optionally possible to set both master and slave settings ON, to let other cores react on current
core events, too.
47
Installation
Summary (Example with one master and two slave core debuggers):
; Complete script has to be run on TRACE32 instance of first core
; SYNCH commands for 1st core
SYNCH.RESet
SYNCH.Connect Localhost:20001 Localhost:20002
SYNCH.MasterGo ON
SYNCH.MasterBRK ON
SYNCH.MasterStep ON
; SYNCH commands
INTERCOM.execute
INTERCOM.execute
Localhost:20002
INTERCOM.execute
INTERCOM.execute
INTERCOM.execute
; SYNCH commands
INTERCOM.execute
INTERCOM.execute
Localhost:20001
INTERCOM.execute
INTERCOM.execute
INTERCOM.execute
Localhost:20001 SYNCH.SlaveGo ON
Localhost:20001 SYNCH.SlaveBRK ON
Localhost:20001 SYNCH.SlaveStep ON
Localhost:20002 SYNCH.SlaveGo ON
Localhost:20002 SYNCH.SlaveBRK ON
Localhost:20002 SYNCH.SlaveStep ON
ENDDO
48
Installation
49
Installation
50
Installation
There is a time delay between reaction of different cores. The reaction time of the appended slave core(s)
depends on the technical realization of the synchronization. In worst case, this is done by software, i.e. the
master debugger informs the slave debugger(s) via socket communication on the host about specified
events. In best case, the synchronization takes place directly on the processor, and the in between solutions
are PODBUS trigger signal or to connect certain PINs, if available, on the JTAG connector or the board.
Which solution is offered by the particular multicore debugging environment is depending on the chip and/or
board hardware. The LAUTERBACH Debuggers always use the fastest available possibility. The software
synch mechanism starts all cores simultaneously by TRACE32 software, either by socked communication
(slow) or internal synchronized within TRACE32 (fast). The fast method is only implemented for some
processors, while the software method by socket is always available.
Special on STEP-Signal: By selecting MasterStep/SlaveStep ON, only the asm single steps are
synchronized. The HLL steps are published by master debugger as a sequence of (asm)step-go-break (or
just go-break), which means the slave debugger(s) do(es) not really perform an own HLL single step.
Solution:
Software
(slow)
Software
(fast)
PODBUS
Trigger
Hardware (JTAG
or Board)
Chip
Hardware
Delay time:
1-5 ms
~10 s
100-300 ns
~10 ns
0-10 ns
51
Installation
Install suitable debugger software (see Install Debugger Software for Multicore Debugging).
Start executables with particular config files (see Setup and Start of TRACE32 Software)
52
Installation
Multiprocessor Debugging
Multiple ICD Debuggers can be started and stopped synchronously. The time delay depends on the
implementation of the debug port. On a 68332 the start time delay is about 10us and the stop delay about
5us. The coupling of the different systems is made by the SYnch command.
NOTE:
This command requires that the InterCom system is configured in the host. The
synchronous break can be made with the Trigger command. The following
example shows the configuration files and commands required for a system where
one master controls two slaves:
53
Installation
Click the Windows Start button, and then select TRACE32 ... .
54
Installation
Software Installation
To install the ICD Debugger together with the TRACE32-ICE see the Installation Guide of the TRACE32
System. In addition to the normal TRACE32 emulator software the following files may be required.:
mccm<CPU type>.t32
mcpm<CPU type>.t32
mccesi.t32
mcpesi.t32
mccitim.t32
mcpitim.t32
mccstg.t32
mcpstg.t32
mcctim.t32
mcptim.t32
A configuration file software.t32 must be created for special configurations (e.g. when multiple BDMs and
ESIs are connected). This file is not required for standard configurations.
Format:
<driver>=<cpu_type> [<usemask>]
<driver>:
GROUP
SIM
<cpu_type>
Description
08
for 68HC0x
11
for M68HC11
12
for M68HC12
166
for C166
16
for M68HC16
186
for I86
M32R
for M32R
51
for i8051
1989-2016 Lauterbach GmbH
55
<cpu_type>
Description
56
for DSP56k
68
78K
for 78K
96
for i196
2000
for TMS320C2xxx
5000
for TMS320C5xxx
6000
for TMS320C6xxx
ADRO
for Adreno
ANDE
for AndeStar
APEX
for APEX
APS
for APS3
ARC
for ARC
ARM64
ARM
AVR
for AVR32
BA
for Beyond
BF
for Blackfin
CEVA
for CEVA-X
CORE
for M.CORE
GTM
for GTM
H83
for Renesas-H8
MIPS64
MIPS
MB
for MicroBlaze
MDSP
for MMDSP+
NDSP
for NanoDSP
NIOS
for Nios-II
PPC64
PPC
QDSP6
for Hexagon
RX
for Renesas-RX
1989-2016 Lauterbach GmbH
56
<cpu_type>
Description
SC
for StarCore
SH
for SH
M430
for MSP430
SPT
for SPT
TC
for TriCore
TEAK
for CEVA-Teak
TPU
for eTPU
UBI
for Ubicom32
V800
for V850/RH850
VSPA
for VSPA
X86
X64
XA
for XA51
XTEN
for Xtensa
Z80
for Z80
ZSP
for ZSP
57
In this example the first debug module connected to the PODBUS is controlled by prompt b:, the second
device by prompt b2: and so on. The prompt name can be changed after boot with the SETUP.DEVNAME
command. The command MENU.AUTODEV can be used to automatically change the main menu and
toolbar device dependend on the currently selected prompt or active window.
58
JTAG/BDM Debugger or ROM Monitor. This is the prompt which will typically be used for
debugging. Please note that if you use the ESI as ROM Monitor or as emulation memory
together with an ICD module, all mapping must be done on the B: prompt.
ESI:
This prompt is only required if you want to use the ESI as pure EPROM simulator, without
any debug capabilities.
PP:
STG:
T:
59
60
2.
Map the EPROM simulator within the specified range (MAP.ROM command).
3.
Set the EPROM bus size (MAP.BUSXX command). The default bus size is 8 bit.
4.
5.
61
0x00000--0x03fff
0x04000--0x07fff
0x08000--0x0bfff
0x0c000--0x0ffff
0
1
2
3
0x00000--0x03fff
0x04000--0x07fff
0x08000--0x0bfff
0x0c000--0x0ffff
62
Break
The ICD Debugger uses software breakpoints. For that reason only Program, HLL and Spot Breakpoints are
available.
If the CPU provides hardware breakpoints, read and write breakpoints can be used. For more information
see the CPU specific section.
If the CPU provides hardware execution breakpoints, they will be used when a breakpoint is set in an area
marked with MAP.ReadOnly.
Manual break for ROM Monitors can be accomplished in different ways:
See the Processor Architecture Manual and monitor source code for your target for more details.
63
eXception
The eXeption commands are used to adapt and connect the RES and NMI signals generated by the ROM
Monitor software to the target CPU.
On each adapter for the EPROM simulator there are three extra pins for GND, NMI and RES. NMI and RES
are outputs from a HTC Schmitt trigger.
1
Male connector to EPROM Simulator
GND
NMI
RES
No connection for the RES and NMI pins of the EPROM simulator are needed, if a LAUTERBACH
evaluation board is used. On these boards the target CPU gets this signals from the PODBUS interface.
64
eXception.NMIBREAK
Format:
eXception.NMIBREAK ON | OFF
The connection of the NMI signal to the target CPU is enabled or disabled.
eXception.NMIPOL
Format:
eXception.NMIPOL <polarity>
<polarity>:
+|-
eXception.RESetPOL
Format:
eXception.RESetPOL <polarity>
<polarity>:
+|-
65
RESet
Format:
RESet
(ROM Monitor) Switches off the EPROM simulator and resets the mapping system to its default state.
The target CPU is reset only if the RES pin of one adapter is connected and adapted to the target CPU.
66
SYStem
SYStem.BdmClock (BDM only)
Format:
SYStem.BdmClock
<rate>:
2 | 4 | 8 | 16 | <fixed>
<fixed>:
1000. .. 5000000.
<rate>
Either the divided CPU frequency is used as the BDM clock or a fixed clock rate. The fixed clock rate must
be used when the operation frequency is very slow clock line is not available.
The default is a fixed rate of 1 MHz.
67
SYStem.Mode
Format:
SYStem.Mode <mode>
<mode>:
Down
NoDebug
Go
Up
Down (BDM)
Disables the debug mode. The state of the CPU remains unchanged.
Down (ROM
Monitor)
Go (BDM)
Resets the system with debug mode enabled. The system runs until any
break condition occurs.
Go (Serial)
ATTACH
(BDM)
ATTACH
(Serial)
NoDebug
(BDM only)
Up (BDM)
Resets the system with debug mode enabled and breaks before the first
Op-Fetch.
Up (ROM
Monitor)
Up (Serial)
Removes the RESET lines (if attached) and waits the for monitor entry.
68
SYStem.Option
Format:
SYStem.Option <option>
<option>:
BASE
BASE
Defines the base address of the internal peripherals. This value is used by the
PER command to display the internal registers.
69
Trigger
Trigger.Set (BDM only)
Format:
Trigger.Set
<source>:
BUSA
Enables the external Trigger input. The emulation is breaked when a high pulse is active for more then
300 ns.
b:
Trigger.Set BUSA ON
The TRACE32-ICE system can generate the trigger pulse to break the emulation using the trigger bus line
A. The trigger pulse is controlled by an analyzer program.
bus.a if ab
Format:
Trigger.Out
70
Trace Methods
This section describes which methods are provided by TRACE32 to record run-time information even if only
a debugger is used.
Debugging is handled mostly via on-chip debugging interfaces e.g. JTAG, BDM, OCDS. The main tasks of a
debugger are: to start the program and to stop it at a more or less complex breakpoint. With a halted
program the current state of the CPU/target can be read out and modified respectively.
Debugging comes to its limits when run-time errors occur. Run-time errors are errors whose causes, either
time-related or in the program hierarchy, are so far apart that the correlation between cause and effect can
no longer be detected by a debugger. Moreover no analysis of the runtime behavior is possible by using
debugger.
In the following ancillary trace methods are presented. These trace methods allow to record run-time
information even with a debugger.
ART:
LOGGER:
Snooper: Snooping allows a periodic sampling of up to 16 data items or the program counter.
FDX: FDX (Fast Data eXchange) allows to transfer arbitrary data between the target and the host. It is
implemented by using a specialized communication protocol, supplied by LAUTERBACH.
OnChip:
71
Trace Methods
Assembler steps that only changed the contents of CPU registers can be undone by pushing the Undo
button.
Mode.Mix
ART.List
Frame.UNDO
Frame.REDO
Reverse Frame.UNDO
ART shows which program steps were performed by the CPU to get into the specified state of the system.
72
Trace Methods
The default size of the ART is 256 single steps (records). The max. size is 65536.
ART.state
ART.SIZE <records>
73
Trace Methods
In order to realize a fast debugging a hllstep is realized by starting the program execution and stop it at the
next hll line. Due to this proceeding ART cant log the CPU registers for each instruction executed. As a
result part of the assembler program flow is lost for ART.
In many cases TRACE32 can reconstruct the assembler program flow (hllseq).
74
Trace Methods
SNOOPer
Applications for the SNOOPer
Basic concept: The debugger reads out information from the target in a pre-defined time interval. This
information is written to a trace buffer. The trace memory for the SNOOPer trace is allocated on the host.
Snooping can only be used, if the on-chip debugging interface provides specific characteristics. Depending
on the characteristics the SNOOPer can monitor either data items or the program counter.
Characteristic required by the
On-chip Debugging Interface
Monitoring of
Up to 16 data items
Program counter
TriCore, TMS320C55x
Program counter
ARM11, V850
The SNOOPer can be configured and controlled by the command group SNOOPer:
SNOOPer.state
Another way to configure and control the SNOOPer is the generic Trace command group:
Trace.METHOD SNOOPer
Trace.state
75
Trace Methods
Real-time
Memory
Access
DCC
Memorymapped
PC
Check PC
while Program runs
20 s
50 s
50 s
50 s
Up to 16
32 bit value
No
Yes
No
No
Using the SNOOPer doesnt require any changes in the application (beside of the mode DCC). Therefore
the whole setup process is easy.
76
Trace Methods
Via the real-time memory access the SNOOPer can monitor the contents of up to 16 memory address. For
this reason the SNOOPer.Mode Memory has to be configured. Here a full example:
SNOOPer.RESet
SNOOPer.Mode Memory
SNOOPer.SIZE 10000.
SNOOPer.Rate 200.
77
Trace Methods
It is also possible to define the addresses monitored by the SNOOPer as hll language expression. Please be
aware that no composite variable can be used.
SNOOPer.SELect V.RANGE(flags[3])
SNOOPer.SELect V.RANGE(ast.count)
78
Trace Methods
The monitored data items can be displayed with the command SNOOPer.List.
Shortest sampling
rate for the SNOOPer
The shortest sampling rate for the SNOOPer is approx. 20 s. If more the one data item is sampled, then the
time distance between the first data item (sampled in the SNOOPer.Rate) and the second data item shows
the shortest sampling rate possible for your CPU.
Since the shortest sampling rate is approx. 20 s data losses are inevitable if the
monitored data items are changed at a higher rate by the application program.
Since neither the host nor the debugger are real-time systems the defined
snooping rate is not guaranteed. The longest snooping interval for the current
trace contents is displayed in the max field of the SNOOPer.state window.
The influence on the real-time behavior caused by the SNOOPer depends on
the realization of the real-time memory access by the CPU. It is very small for
nearly all CPUs.
79
Trace Methods
The application program on the target writes a 32 bit information to the corresponding registers of
the DCC.
The debugger on the other side checks the DCC registers in a defined sampling rate and enters
the recieved information into the SNOOPer trace buffer.
Application
Debugger
DCC
Read periodically
information from DCC
In order to check, whether your CPU provides a DCC enter the following command:
SNOOPer.Mode DCC
The application program has to provide the data of interest. This requires that special code is added to the
application program.The low level code to handle the DCC is provided by Lauterbach. Please send an email
to [email protected] to get this code.
The interface to the low level code has to be written by the user. Here an example:
80
Trace Methods
If you plan to use the SNOOPer via DCC, you have to be aware of the following:
1.
New information can only be passed by the application program to the DCC, if the debugger has
already read the previous written information. The function T32_TsMon_SendStatus() in the
above example checks the status of the DCC. This behavior allows the user to select one of the
following strategies:
If DCC is not ready for the next 32 bit information, the application program can wait until DCC is
ready and pass the information then. This way no information is lost, but waiting will consume
CPU time.
If DCC is not ready for the next 32 bit information, the application program can ignore the current
32 bit information and continue the program execution. This way information might be lost, but
the CPU doesnt spend CPU time to wait until DCC is ready.
The fastest possible sampling rate by the debugger is approx. 50 s.
2.
The application program sends a 32 bit information to the debugger, but no information about the
meaning of this 32 bit information is exchanged between the application program and the
debugger. For this reason the debugger has to define the meaning of the 32 bit information
independent of the application program.
If the contents of a memory address or primitive variable is send by the application, the debugger
can specify this address/variable as the meaning of the 32 bit information.
For all other information the application has to declare an extra variable that can be used by the
debugger to specify the meaning of the 32 bit information.
SNOOPer.Mode DCC
SNOOPer.SIZE 12000.
SNOOPer.Rate 1000.
SNOOPer.SELECT V.RANGE(vint)
;
;
;
;
81
Trace Methods
If the application program passes e.g. the contents of a register via DCC, the application program has to
declare an extra variable.
volatile int Snoop;
This variable can the be used by the debugger to display the information passed via the DCC.
SNOOPer.SELECT V.RANGE(Snoop)
82
Trace Methods
The program counter is memory-mapped and the on-chip debugging interface provides real-time
memory access (e.g. TriCore, TMS320C5x).
The on-chip debugging interface provides the possibility to check the program counter (e.g.
Program Counter Sample Register for the ARM11, Quick Access for V850).
To check if your CPU can monitor the program counter enter the following command:
SNOOPer.Mode PC
SNOOPer.Mode PC
SNOOPer.SIZE 10000.
SNOOPer.Rate 5000.
83
Trace Methods
Complementary commands:
SNOOPer.Chart.sYmbol
PERF.state
84
Trace Methods
Software Trace
Problem description: A TRACE32-ICD debugger is used to test and integrate an application program on
the target. Now a problem occurs, that could easily be solved if more information about the program history
would be available.
Usually a TRACE32-ICD hardware trace extension can be used to get more information about the program
history. But not all targets allow the operation of such a hardware trace.
For these targets Lauterbach is offering a software trace. The software trace however needs RAM from the
target and is influencing the real-time behavior.
To operate a software trace, Lauterbach provides:
A general trace format for a software trace located in the target RAM
Configuration and display commands for the software trace in the TRACE32 software
(command: LOGGER)
Predefined algorithms to operate the software trace from the target program
To use the software trace basic knowledge of the target hardware and the processor architecture is required.
I
85
Software Trace
Implementation of the
trace memory
The user reserves a part of the target RAM, that can be used by
TRACE32 as trace memory.
Any desired.
Sampling
Selective tracing
86
Software Trace
16-bit
flags
48-bit
time stamp
32-bit
address
32-bit
data
Start address
Size
Index
Trigger counter
Flags from the host
Flags to the host
(currently not used)
(currently not used)
TRACE32Software
Target RAM
Size (32-bit)
Index (32-bit)
87
Software Trace
Operation Modes
The software trace can work in 2 operation modes:
Address/data trace
Address and data information is sampled.
Flow trace
A flow trace is available on architectures which provide a branch trace capability like all
PowerPC families and the SuperH SH4. For a flow trace all changes in the program flow are
sampled. The TRACE32 software reconstructs and displays the complete program flow out of
this information.
Fetch (0x10)
Data Read (0x20)
Data Write (0x30)
Address (32-bit)
32-bit address
Data (32-bit)
32-bit data
If a normal software trace is used, the software trace listing displays the address and data, the cycle type
and a time stamp.
88
Software Trace
Address (32-bit)
Address 1
Address (32-bit)
Address 2
If the software trace is used to sample the program flow, the software trace listing reconstructs the program
flow based on the sampled information about the changes in the program flow.
Reconstructed
program flow
Sampled change in
the program flow
89
Software Trace
TRACE32 Software
LOGGER configuration commands
Predefined algorithm
in debug monitor (not visible) e.g SH4
in code linked to the application e.g. PPC
User-defined algorithm
90
Software Trace
*/
long size;
*/
*/
long tindex;
long iflags;
long oflags;
*/
/*
/*
/*
/*
/*
*/
*/
*/
*/
Break */
long reserved1;
long reserved2;
T32_loggerData buffer[T32_LOGGER_SIZE];
}
T32_LoggerStruct;
91
Software Trace
2.
An example for a T32_LoggerWrite algorithm can be found on the TRACE32 software CD:
\Dos\Demo\Powerpc\etc\Logger\logdemo.c
92
Software Trace
3.
LOGGER.state
LOGGER address
Define the usage of the software trace
LOGGER address
93
Software Trace
4.
Push the Init button in the commands field to initialize the software trace. Prior to the initialization the
chip selects have to be configured in order to get access to the target RAM.
After the initialization the SIZE field contains the size of the software trace.
5.
LOGGER ON:
Use software trace
94
Software Trace
LOGGER.state
Size
95
Software Trace
An example for a T32_LoggerWrite algorithm can be found on the TRACE32 software CD:
\Dos\Demo\Powerpc\etc\Logger\logdemo.c
For the SH4 family a hidden monitor is provided by the TRACE32 software to fill the software trace.
So if a software trace is used to sample the program flow for the SH4, no instrumentation of the code
is necessary.
96
Software Trace
3.
Push the Init button in the commands field to initialize the software trace. Prior to the initialization the
chip selects have to be configured in order to get access to the target RAM.
After the initialization the hidden monitor for the SH4 family is automatically activated.
4.
LOGGER ON:
Use software trace
97
Software Trace
TRACE32 Software
LOGGER display commands
Click here to
get a trace
listing
98
Software Trace
Background
The SH4 core includes a 8-stage on-chip branch trace. This trace holds the source and destination address
of the last eight changes in the program flow. Sampling to the on-chip branch trace in non-intrusive.
3 classes of branch operations can be traced by the on-chip branch trace of the SH4:
Exception branches
All exceptions other than ASE exception, as well as all interrupt operation and RTE instruction
Subroutine branches
BSR, BSRF, JSR and RTS instructions
General branches
BF, BT, BF/S, BT/S, BRA, BRAF, and JMP instructions
The user program can be stopped by a TRACE exception, when the buffer contains 1 or 6 records.
This on-chip trace buffer is used as the basis for the software trace. At the moment only General branches
are supported for the use in the software trace.
99
Software Trace
Command: FIFO
Branch source
Branch destination
FIFO Modes
OFF
eXception
Subroutine
ALL
The on-chip branch trace samples all changes in the program flow.
100
Software Trace
0xF00n: 1st flow trace record that was copied from the on-chip
branch trace, n records with the same time stamp will follow
0xF00E: following flow trace record
0xF00F: last flow trace record in memory, all records until record
SIZE-1 are empty, next valid entry starts at record number 1.
This flag is used, if there are not enough empty records left in the
software trace to store the next 6 entries from the on-chip branch
trace.
Address (32-bit)
Address (32-bit)
101
Software Trace
Allocate memory space for the logger description block and the software trace.
Command: LOGGER
SIZE field
Enter the number of records used for the Software Trace to the SIZE field.
Select ALL in the Flow Trace field. Then all changes in the program flow are sampled into the
software trace.
TRACE32 now allocates the memory for the software trace subsequently to the logger description
block.
102
Software Trace
2.
AllCycles ON
If the check box AllCycles is switched ON, a TRACE exception is generated after each valid entry to
the on-chip branch trace.
103
Software Trace
3.
104
Software Trace
4.
Push the Init button in the commands field to initialize the software trace. Prior to the initialization the
chip selects have to be configured in order to get access to the target RAM.
After the initialization the hidden monitor for the SH4 family is automatically activated.
5.
Start the user program by Go and stop it again. Display the software trace.
105
Software Trace
Background
The MPC860 has a Trace Exception. The Trace Exception occurs:
If the Trace Exception causes the processor to enter into the debug mode or if the Trace Exception is
handled by an interrupt service routine, can be decided by setting the TRE (Trace interrupt enable bit) bit in
the DER (Debug Enable Register).
To configure the MPC860 to support a software trace as flow trace:
In consequence of this single stepping is not possible while a software trace as flow trace is used.
The time base facility (TB) of the MPC860 can be used as source for the time stamp unit.
Address (32-bit)
Address (32-bit)
0x0000
106
Software Trace
Add a definition for the LOGGER Description Block and the Software Trace to your application.
2.
Add a interrupt service routine for the Trace Exception to your application.
The main tasks of the interrupt service routine are:
-
3.
4.
107
Software Trace
5.
LOGGER address
Define the usage of the software trace
6.
LOGGER address
Push the Init button in the commands field to initialize the software trace. Prior to the initialization the
chip selects have to be configured in order to get access to the target RAM.
108
Software Trace
7.
LOGGER ON:
Use software trace
8.
Start the user program by Go and stop it again. Display the software trace.
109
Software Trace