Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Contact us at:
EMail: support@pls-mc.com
info@pls-mc.com
WWW: http://www.pls-mc.com
All rights reserved. No part of this manual may be reproduced or may be transmitted in any form or by any
means without prior written permission of PLS Programmierbare Logik & Systeme GmbH. The information in
this manual is subject to change without notice, no responsibility is assumed for its use.
Universal Debug Engine is a trademark of PLS Programmierbare Logik & Systeme GmbH. Adobe is a
registered trademark of Adobe Systems Incorporated. AURIX™, TriCore™ are trademarks of Infineon AG.
ARM7™, ARM9™, ARM11™, Cortex™ are trademarks of ARM. PowerPC is a registered trademark of
IBM Corporation. Power Architecture™ is a trademark of Power.org. WindowsXP, WindowsVista,
Windows7, Windows8 are trademarks of Microsoft Corporation. Pentium and Core™ are trademarks of
Intel Corporation. XScale, Celeron are registered trademarks of Intel Corporation. Athlon™ is a
trademark of Advanced Micro Devices, Inc. SuperH™ is a trademark of Renesas Technology Corporation.
All other names and trademarks are the property of their respective owners.
Contents
Introduction 7
Overview 7
Feedback 7
Versions of UDE 8
Delivery Contents 9
System Requirements 11
Getting Started 55
Examples delivered with UDE 55
A First Example with TriCore™ 56
Precautions 56
Starting Universal Debug Engine 56
Loading a TriCore Executable 58
Running and Stepping through the Application 59
Setting Breakpoints 59
CPU Registers 60
SFR Registers 60
Viewing Variables 61
Viewing Memory Locations 62
Leaving the Project 62
A Multi-Core Debugging Example with TriCore/PCP 63
Creating a New Workspace with changed configuration 63
Running the Program 64
HelloPCP Internals 64
A Multi-Core Debugging Example with TriCore2 AURIX 65
Understanding a Multi-Core Configuration 65
Creating a New Workspace 65
Preparing the Debugger 67
Show, Hide and Group Core-Related Windows 67
Loading a Multi-Core Executable 68
FLASH programming 69
Core Selection 70
Single-Core Breakpoints 71
Multi-Core Breakpoints and Stepping 72
A Multi-Core GTM Debugging Example with PowerPC MPC5746M 73
Creating a New Workspace 73
Preparing the debugger 74
Loading a multi-core Executable 74
Core selection 75
Single-core Breakpoints 75
Multi-core Breakpoints and Stepping 76
Inspecting Multi-Channel-Sequencer (MCS) Channels 76
Using the MCDS On-Chip Trace with TriCore2 AURIX 78
Preparations 78
Recording the first Samples 78
Hints for Multi-core Trace 79
An Example with C166S V2 / XC16x via JTAG/OCDS L1 81
Starting with Universal Debug Engine 81
Loading and Starting of an Executable 81
Automatic Variables Refresh 81
Trigger Functions 82
An Example with MPC5567 via JTAG 83
Starting with Universal Debug Engine 83
Loading and Starting of an Executable 83
Automatic Variables Refresh 83
Trigger Functions 84
Hints for using the MPC55xx via JTAG 85
An Example for C166 debugging via 3Pin 86
Hardware Requirements 86
User's Guide 97
Introduction 97
Architecture of Universal Debug Engine 98
Using On-line Help 99
Project Management 100
Working with Projects 100
Creating a New Project 100
Select Target Configuration 101
Loading a Project 101
Saving Project Settings 101
Closing a Project 101
Command line options of UDE 102
Preparing a binary File 102
Compiler Support 102
Downloading the binary File 104
Examples of Debug Communication Channels 104
Selection of a Hardware Communication Channel 105
Overview about the Monitor programs 106
Preparing the Communication 106
Connect the target system 108
Download the application 108
Viewing Program Code 108
Workspace 108
Program Window 109
Running a program 111
Inline Assembler 111
Viewing and Modifying Registers 112
Kinds of Register Views 112
CPU View 112
SFR View 113
HTML View based on the UDE Object Model 114
Watching Variables 115
Watch View 115
Watch Expressions 115
Adding Variables and Expressions using Select Watch Dialog 117
Locals View 119
Automatically variable content refresh 119
Stepping and Breakpoints 119
Overview 119
Following the program flow 119
Stop the program at a specified location 120
Breakpoint dialog 121
Breakpoint identifier 122
Viewing Memory Locations 123
Writing data to target 123
Updating data from target 123
Printing of memory locations 124
Reference 173
Index 174
Overview
Thank you for choosing Universal Debug Engine (UDE) 4, one of the most powerful
development workbenches available for the 32-bit architectures AURIX™, TriCore™,
PowerArchitecture™, Cortex™, ARM7™, ARM9™, ARM11™, XScale™, RH850,
SuperH™ SH-2A and for the 16-bit architectures C166, ST10, XC166, XC2000, XE166,
C166CBC, C166S V2 derivatives.
The software which you are about to install is the UDE Standard License software.
Included with the full licensed version comes a high-speed communication hardware
which speeds up downloading your application into the target system. It offers a flexible
way of communication via various communication channels to the supported
microcontroller.
Special versions of UDE like the MemTool Flash/OTP Memory Programming Tool are
available on your request.
This Software UDE manual describes the Universal Debug Engine based on the
selective Evaluation Boards. However, the UDE is also working with other AURIX,
TriCore, PowerArchitecture, Cortex, ARM7, ARM9, ARM11, C166, ST10, XC166,
XC2000, XE166, XScale, RH850 and SuperH SH-2A based hardware and simulators.
Please see the compatibility list in appendix of this manual or the actual list on our Web
site for supported MCUs.
The Hardware Appendix UDE manual, an appendix of this manual, supplements this
manual. Please see this manual for detailed description of the hardware interfaces.
? You are invited to browse to our Web site at http://www.pls-mc.com to get the newest
information or to download the latest version of Universal Debug Engine.
Feedback
The PLS Development Tools welcomes feedback on our products and documentation's. If
you have any comments, suggestions or improvements about the products you are using,
please use the Feedback Form from our Web Site http://www.pls-mc.com, send an email
to support@pls-mc.com or call our Support Line.
The Standard version Universal Access Device 2 (UAD2) allows a flexible way of
communication and is suitable for desktop and notebook users in the same way. The
Universal Access Device 2 communicates with the host PC via the USB2.0 bus.
Target Communication is supported via ASC, SSC, CAN, DAP and JTAG.
The Standard version Universal Access Device 2pro (UAD2pro) allows a flexible
way of communication and is suitable for desktop and notebook users in the same
way. The Universal Access Device 2pro communicates with the host PC via the
USB2.0 bus. Target Communication is supported via ASC, SSC, CAN, JTAG,
cJTAG, DAP, SWD.
The Standard version fast-PC6x card allows communication to the target via a PCI
card. Target Communication is supported via ASC, SSC and CAN.
4. The Simulator version features a debugging environment about various simulators.
The simulators can be used effectively in the early stages of software development,
reducing the length of time spent later on system integration. The UDE debugger
uses the simulator interface like a real hardware platform. All advantages of HLL-
Debugging are offered with the combination of UDE and the simulator environment.
Simulator version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
for Starterkits
Demo version
compact
fast-PC6x
pro
UAD2+
UAD3+
Board
Board
UAD2
UAD2
UAD2
Software and Manuals
Software UDE Manual
1
Hardware Appendix UDE Manual
CD-ROM
Access Devices
UAD2
compact
UAD2
UAD2
pro
UAD2+
UAD2+ Trace Board (built-in) 4
UAD2+ JTAG Extender with 10-wire
(DAP), or 14-wire (JTAG/cJTAG), or 16- 3 3
wire (JTAG), 20-wire (JTAG)
UAD3+
UAD3+ JTAG Pod
UAD3+ Trace Board 2 (built-in) 4
UAD3+ Parallel Trace Pod 3
UAD3+ Aurora Trace Pod 3
fast-PC67C/PCI card or
fast-PC276C/PCI card 3
USB-to-Serial Converter 3
USB-Key
Interface Devices
UAD2 JTAG Adapter (ARM, OnCE, COP,
...) 3 3 3
UAD2+ Trace Pod (38-pin, 40-pin or 60-
pin) 4
pro
UAD2 /UAD3+ JTAG Adapter (ARM,
OnCE, ...)
3 3 3
UAD3+ Trace Adapter (16-bit ARM, ...) 4
Simulator version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
Standard version
for Starterkits
Demo version
compact
fast-PC6x
pro
UAD2+
UAD3+
Board
Board
UAD2
UAD2
UAD2
Pod Interface Cables
UAD2+ JTAG Extender Cable (40-wire
HD Flat Ribbon Cable) 3 3
UAD2+ Trace Pod Cable (80-wire HD Flat
Ribbon Cable)
UAD3+ IO Pod Cable (26-wire HD Cable)
UAD3+ Trace Pod Cable (68-wire HD
Cable)
Power Supply
Wall Transformer 220 VAC
50~ / 12V DC (6W) 5 5 5
Wall Transformer 110-220VAC
50-60~ / 12V DC or 18V DC (24W) 5 5 5
Wall Transformer 110-220VAC
50-60~ / 12V DC or 18V DC (100W)
1 2
If you did not receive a manual with your Starterkit CD-ROM, you may order one. for TARA EVA M2 only
3 4 5
optional shipped, corresponding your order with Trace Board option only depending on your country location
The UDE version 4.4 requires the installation of .NET Framework 3.5 SP1. To obtain the
installation package of .NET Framework 3.5, please see the Readme file within the UDE
installation folder for further hints.
Depending on the type of target access, you will additionally need one of the following
interface ports:
an IEEE1394-OHCI interface for the Standard version with UAD2+ or UAD3+ via
IEEE1394 or an IEEE1394b-OHCI interface for the Standard version with UAD3+ via
IEEE1394b
or an USB port interface for the Standard version with UAD2 or UAD2pro or UAD2+ or
UAD3+ or for the Demo version for Easy Kits XC166, XC2000, XE166 or for the
Simulator version with USB-Key or the Standard version with USB-JTAG-Port
or an Ethernet interface for the Standard version UAD2+ or UAD3+
or a standard serial port (COMx) interface for the Demo version for Starterkits (ASC
bootstrap loader support)
or an free PCI slot for the Standard version with fast-PC67C/PCI / fast-PC276C/PCI
The fast-PC67C/PCI and fast-PC276C/PCI are compliant with PCI r2.1.
Before you start the installation process, please ensure which version of Universal
Debug Engine (UDE) 4.4 you intend to use. Check that your package contains the
required parts and install the hardware and software according to the following
description.
Depending on your UDE version, please follow the corresponding instructions.
! Please note that you must have administrator rights for successful execution of the
installation process.
The UDE Universal Debug Engine is also available as a Demo version for various
starterkits. Please use the CD Browser utility from the UDE CD-ROM and install the UDE
demo software without hardware support as well as the hardware drivers if needed. The
demo versions will work with the host ports LPTx or COMx. For COMx a standard serial
ports or an USB-to-Serial port can be used.
The demo version is limited to 16 kByte program sizes for C16x derivatives, 32 kByte for
TriCore derivatives and is limited to program the first FLASH sector only. All other
functions are freely available for testing.
Furthermore, so-called Free Entry Tool Chain is available. This version based on a
Demo version integrated into an Eclipse environment and the HighTec C/C++ compiler.
When a new version of UDE is started the first time, a firmware update may be executed
on the access device (UAD, UAD2 ...). This may take some more time than usual for the
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
12 of 177 Installation Notes - before you install UDE Installing of Universal Debug Engine
Installing Hardware
Static Electricity Precautions
Electrostatic Discharge (ESD) can damage a sensitive electronic
component! Under several conditions static electricity and ground
potential differences between the Access Device and the user's
target hardware can build up high voltages - over 10000 Volts
(10 kV) in some cases. The electrostatic discharge of this build-up
voltage results in fast high current waveforms and fast magnetic
(H-field) or electrostatic (E-field) disturbances. The discharge into
the electronic components and circuitry can damage or destroy
hardware components, resulting in failures and reduced reliability.
Because of the non-hot-pluggable 3,3 Volts / 5 Volts -TTL properties of the JTAG and
the 3Pin/Serial connectors, these ports are endangered especially. The maximum
voltage on these pins may not exceeded 5,5 Volts against the UAD’s ground, especially
in the case that the ground planes are not connected first.
To protect your hardware against damage from static electricity and ground potential
discharge, you have to follow some basic precautions:
1. Before you change any cable connections from the Access Device, please remove
the power from the Access Device and your target system.
2. Please ensure that the static electricity and ground potentials between the Access
Device, the host PC and the target hardware are balanced. If there is a danger of
high potential differences, you must connect the Access Device, the host PC and the
target hardware to the same ground domain via a low resistance connection.
3. Establish the target connection and power on the systems.
Host Development Computer Universal Access Device Custom Specific Target Hardware
Hot-Pluggable Host
Signal line +
Signal line +
Ground line
Ground line
Hint: All Universal Access Devices are equipped with a ground socket on the front side.
Please use this ground socket for discharging the static electricity and balancing ground
potentials between the Universal Access Device, the host PC and the target hardware
An additional protection for UAD2 can be achieved by using the JTAG Protector. The
UAD2pro, UAD2+ contains the protection function already. Please note, that the JTAG
Protector DOES NOT suspend the precautions described above.
Trans-
former
Starterkit
( i.e. TriBoard, EasyUTAH, XC16)
Parallel Port
cable
Host PC with
Standard Parallel Port
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please see the appendix „Hardware Description“ for important information about the
configuration of the Starterkit board.
USB-To-Serial
Converter
USB interface
or
ASC0
COMx interface interface
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please see the appendix „Hardware Description“ for important information about the
configuration of the Starterkit board.
Easy Kit
USB-Wiggler
USB2.0 JTAG/OCDS L1
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please see the appendix „Hardware Description“ for important information about the
configuration of the Starterkit board.
Starterkit or Custom
Specific Target Hardware
Trans-
former
USB2.0 JTAG
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter "Static Electricity Precautions" containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Specific Target Hardware
Trans-
former
USB2.0
JTAG
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Specific Target Hardware
Trans-
former
USB2.0
DAP Adapter
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Specific Target Hardware
Trans-
former
USB2.0
SWD adapter
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Trans-
former
IEEE1394, ETH
USB2.0 JTAG
JTAG Extender
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Trans-
former
IEEE1394, ETH
USB2.0 DAP
JTAG Extender
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Trans-
former
IEEE1394, ETH
USB2.0
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Specific Target Hardware
Trans-
former
JTAG Adapter
IEEE1394, ETH
USB2.0 IO Pod JTAG Adapter
Cable Cable
JTAG Pod
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Trans-
former
Starterkit or Custom
Trans- Specific Target Hardware
former
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Serial / Trans-
former Specific Target Hardware
Application*
Universal Access Device 2+
ASC0 / BSL*
IEEE1394, ETH
SSC, CAN
Parallel Port
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Starterkit or Custom
Serial / Trans-
former Specific Target Hardware
Application*
Universal Access Device 2+
Serial / BSL*
IEEE1394, ETH
3Pin
USB 2.0
If you have trouble, while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
C167
fast-PC67C/ISA
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
C167
CAN
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
IEEE1394, ETH
USB 2.0
OCDS L2 or
ETM or Nexus
Trace
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
Trans-
former
Host PC Target system
JTAG Debugging Starterkit or Custom
Specific Target Hardware
Trans-
former
If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
? Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices.
! Please note, that the function of the JTAG protections can be ensured only, when the
ground and target power connections (MCU I/O voltage) are established.
Signal line +
Ground line
Target Hardware
Additional Ground
line required in case of potential differences
? If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices. Please note, that the
JTAG Protector DOES NOT suspend the precautions described in this chapter.
! Please note, that the function of the JTAG protections can be ensured only, when the
ground and target power connections (MCU I/O voltage) are established.
IEEE1394, ETH
USB2.0 JTA
G
JTAG Extender + JTAG Protector
Additional Ground Additional Ground
line required in case of potential differences line required
? If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
Please pay attention to the chapter „Static Electricity Precautions“ containing important
information about required ESD protection of the access devices. Please note, that the
JTAG Protector DOES NOT suspend the precautions described in this chapter.
? If you have trouble while installing the product, please contact the PLS Support Team at
support@pls-mc.com.
Please insert the Universal Debug Engine CD-ROM. The CD browser will start
automatically. If not, please start the SETUP.EXE from the CD-ROM root directory
manually.
The UDE CD-ROM contains following chapters:
Readme UDE 4.4 – Contains important information about the current UDE
installation and requirements. Please read it first.
Install UDE 4.4 Software – Start the installation process of the Universal Debug
Engine. You can install the full version of UDE (communication device required) or
test a demo version of UDE for Starterkit.
Install UDE Samples – Start the installation process of the Universal Debug
Engine’s Sample directory. It contains code samples for supported compilers, target
architectures and evaluation boards.
Install 3rd Party Products – Install
demo versions of software, which
enhance the UDE installation, e.g. a
CASE Tool.
Information and Manuals – Find out
more about all of the UDE products.
How to contact PLS – guides you to
the directly contact to PLS via Email,
Web and Mail.
! usual for the target connect operation. Please DO NOT power off or unplug the access
device while this time!
Before you can use the Universal Debug Engine, you must install the software
components by using the UDE CD-ROM.
To install the software, follow these steps:
1. Read the file RELEASE.HTM for the latest software changes.
2. Start SETUP.EXE from the UDE CD-ROM.
3. Click Next to continue the installing process or click Cancel for aborting.
4. Check the license terms and your customer information and click Next to continue.
5. Choose the destination location installation via the Browse button. Please advise
an empty or new directory for the UDE software. Click Next.
6. Select the Program Folder and click Next to continue.
7. Click Next to continue the installation process.
8. Select the required drivers
Communication Device Support
UAD2, UAD2pro, UAD2+, UAD3+, UAD2compact Support
UAD Parallel Port Driver – UAD Support
fast-PC6x Communication Driver – fast-PC67, fast-PC276 Support
Sentinel SuperPro USB Driver – USB-Key for Simulator support
9. Click Next to continue the installing process.
10. Check the selected components you want to install and click Next to start the
installing process.
Note: The next step depends on your selection of the target access and UDE version
respectively. The following step describes what you have to do for each target
!
communication channel. However, you have the possibility to select one or more target
access channels, which will be installed one after the other. In this case, please follow the
corresponding installing description.
When a new version of UDE is started the first time, a firmware update may be executed
on the access device (UAD2, Uad2pro, UAD3 ...). This may take some more time than
! usual for the target connect operation. Please DO NOT power off or unplug the access
device while this time!
1. Click the check box "Universal Access Device" and "Parallel Port Driver" for
installing the Standard Version with Universal Access Device and the host
communication channel via a standard parallel port interface.
2. The driver installation begins with the dialog box "Step 1: Driver Installation". Click
Next to continue the installing process.
3. Select the free parallel port for using. Possible selections are LPT1 and LPT2.
Please disconnect all devices from the selected parallel port and click Next to
continue the installing process.
5. The installation process searches for the selected port and gives information about
the port. Please connect now the Universal Access Device with the selected port
via the 25-wire parallel cable and apply power to Universal Access Device.
6. Click Next to test the communication with Universal Access Device.
7. If the test was successful, you can finish the driver installation. If the test failed,
ensure that all cables and connections are correct. Click Finish to continue.
Please note that the best transfer performance between the Host PC and the target can
only be achieved if the parallel port interrupt is usable and the port is in EPP mode. Use
! the EPPSetup.exe tool from your UDE installation to verify your parallel port installation. It
is recommended enabling the parallel port interrupt and the EPP mode.
Installing of Universal Debug Engine Driver Installation for Universal Access Device 37 of 177
UAD2+ via IEEE1394
Because of the Plug 'n Play-Capabilities of UAD and UAD2+ the IEEE1394 driver
installation is started automatically, when the Universal Access Device is connected to
the host PC the first time.
1. Power ON the Universal Access Device.
2. Connect the UAD or UAD2+ with the host adapter of your PC using the 6-wire
cable. The Windows system will find a new hardware device on your system called
"Universal Access Device" in the “pls Debugging Devices” group and you will be
prompted to install a new device driver.
3. Click Next to continue.
4. Click Search for a suitable driver and click Next.
5. Click Specify a location, click Next and browse for the driver file
\SETUP\DRIVER\UADDEVS\UADDEVS.INF driver on your
UDE CD-ROM.
6. Click Next and Finish.
In the case of problems, please verify the correct installation. Open the Device Manager,
the following entries are shown:
IEEE 1394 Bus host controllers
Your host bus controller
pls Debugging Devices
Universal Access Device/Universal Access Device 2
If one of the entries is marked with a question mark, please unplug and plug the
UAD again and repeat the installation if necessary.
? Please see the chapter „Hardware Description“ of the user’s manual for additional
information.
38 of 177 Driver Installation for Universal Access Device Installing of Universal Debug Engine
UAD3+ via IEEE1394b
Because of the Plug 'n Play-Capabilities of UAD3+ the IEEE1394b driver installation is
started automatically, when the Universal Access Device is connected to the host PC the
first time.
1. Power ON the Universal Access Device.
2. Connect the UAD3+ with the host adapter of your PC using the 9-wire IEEE1394b
cable or a 6-9-wire IEEE1394 bilingual cable. The Windows system will find a new
hardware device on your system called "Universal Access Device" in the “pls
Debugging Devices” group and you will be prompted to install a new device driver.
3. Click Next to continue.
4. Click Search for a suitable driver and click Next.
5. Click Specify a location, click Next and browse for the driver file
\SETUP\DRIVER\UADDEVS\UADDEVS.INF driver on your
UDE CD-ROM.
6. Click Next and Finish.
In the case of problems, please verify the correct installation. Open the Device Manager,
the following entries are shown:
IEEE 1394b Bus host controllers
Your host bus controller
pls Debugging Devices
Universal Access Device 3
If one of the entries is marked with a question mark, please unplug and plug the UAD
again and repeat the installation if necessary.
? Please see the chapter „Hardware Description“ of the user’s manual for additional
information.
Installing of Universal Debug Engine Driver Installation for Universal Access Device 39 of 177
UAD2, UAD2pro, UAD2+, UAD3+ via USB port
Because of the Plug 'n Play-Capabilities of UAD2, UAD2+ and UAD3+ the USB driver
installation is starting automatically, when the Universal Access Device 2 or Universal
Access Device 3 is connecting to the host PC the first time.
1. Connect the UAD2, UAD2pro, UAD2+ or UAD3+ to the PC host system using the
USB cable. The Windows system will find a new hardware device on your system
called “Universal Access Device 2” or “Universal Access Device 3” in the “pls
Debugging Devices” group and you will be prompted to install a new device driver.
3. Click Next to continue.
4. Click Search for a suitable driver and click Next.
5. Click Specify a location, click Next and browse for the driver file
\SETUP\DRIVER\UADDEVS\UADDEVS.INF driver on your UDE
CD/ROM.
6. Click Next and Finish.
In the case of problems, please verify the correct installation. Open the Device Manager,
the following entries are shown:
Universal Serial Bus controllers
Your host bus controller
pls Debugging Devices
Universal Access Device 2
If one of the entries is marked with a question mark, please unplug and plug the UAD2 or
UAD3 again and repeat the installation if necessary.
? Please see the chapter „Hardware Description“ of the user’s manual for additional
information.
40 of 177 Driver Installation for Universal Access Device Installing of Universal Debug Engine
UAD2+, UAD3+ via Ethernet TCP/IP
The UAD2+ is equipped with a 100 Mbit/s fast Ethernet interface. The UAD3+ is equipped
with a 1000 Mbit/s (1GBit/s) Ethernet interface. It can be connected to a local PC or to a
Local Network via Hubs or to Switches. The UAD2+ and UAD3+ support both, DHCP and
static IP addressing.
Connection methods
Before using UAD2+ or UAD3+ for debugging purposes, the devices must be configured
properly. It can be communicating to the UDE via TCP/IP protocol. The only thing to set is
valid IP (Internet Protocol) addresses. There are two possibilities:
1. Using DHCP, this requires a DHCP server on your network
2. Using static IP address, this requires exactly knowledge of the network structure (e.g.
knowledge of free IP addresses so that there is no IP used twice in the network).
At delivery time, the UAD2+ or UAD3+ was configured with DHCP enabled. After power on
it tries to get an IP address from a DHCP server. When there is no DHCP server
answering, the UAD2+ or UAD3+ will fall back to static IP address after 60 seconds. The
static fall back IP address is 192.168.1.100. The UAD2+/UAD3+ use the following TCP
ports for communication: 43690 (0xAAAA) and 43691 (0xAAAB)
Installing of Universal Debug Engine Driver Installation for Universal Access Device 41 of 177
In this case DHCP is enabled and the current IP address is 192.168.1.74.
In the right side new settings can be entered. The IP address will also be used when
DHCP is enabled but there is no DHCP server inside the network. After clicking 'Apply'
the new settings are stored. They will be activated after next power on of the UAD2+ or
UAD3+.
The Ethernet Configuration dialog appears where the same settings can be made.
42 of 177 Driver Installation for Universal Access Device Installing of Universal Debug Engine
Once the UAD2+ or UAD3+ are configured well a connection via UAD2+ or UAD3+ can be
established. For that create a new workspace, and select your target configuration. If
default is set as communication device and there is no other UAD2+ or UAD3+ connected,
the Ethernet device is found.
If not, open the menu Config - Target interface... inside UDE or menu Target - Setup
inside MemTool. In the Target Interface Setup dialog select and click on the Setup
button.
For using the TCP/IP communication the Select Communication Device dialog is
opened. You can select the specific access device that you want to use. These settings
are stored in the target configuration *.cfg file format.
For Ethernet connections select UAD2 device, attached to Ethernet port. A specific IP
address to connect can be entered or an UAD2+ or UAD3+ can be selected from the list
after retrieving available devices. Pressing OK stores the settings. A connection is
established now.
If multiple UAD2+ or UAD3+ are used at the same time (e.g. for automated flash
programming), then every UAD2+ or UAD3+ have its own target configuration with either
unique IP or unique serial number.
Installing of Universal Debug Engine Driver Installation for Universal Access Device 43 of 177
Driver Installation for USB-JTAG-Port
Because of the Plug 'n Play-Capabilities of the USB-JTAG-Port, the USB driver
installation is started automatically, when the USB-JTAG-Port is connected to the host
PC the first time.
In the case of problems, please verify the correct installation. Open the Device Manager;
the following entries are shown:
Universal Serial Bus controllers
Your host bus controller
UDE USB-JTAG Devices
UDE USB-JTAG-Port
If one of the entries is marked with a question mark, please unplug and plug the JTAG-
Port again and repeat the installation if necessary.
Installing of Universal Debug Engine Driver Installation for USB-Key (Sentinel USB SuperPro) 45 of 177
Driver Installation for fast-PC6x Card
fast-PC67C/PCI via PCI Bus Host PC
If you have inserted fast-PC67C/PCI in your PC in one of the 32-bit PCI slots, during the
system start-up the operating system recognizes the new hardware. The PCI
enumeration process during start-up detects the new fast-PC67C card as PCI Simple
Communications Controller in the system and requests for a new driver for the card after
system login.
1. The New Hardware Wizard will open. Click Next to start the driver installation
process.
2. Click Search for a suitable driver and click Next.
3. Click Next to continue the installing process.
4. Click Specify a location, click Next and browse for the driver file location
\SETUP\DRIVER\fastPC6x\FSPC_6XW.INF on your UDE CD/ROM
or disk.
5. The next box let you enable or disable the new hardware in the hardware profiles.
Click Next.
6. The box shows detailed information about the device driver and the firmware.
Click Next.
7. A short hardware test will be executed. If the test was successfully, click Next.
8. If the driver installation was successfully, click Finish or Close.
46 of 177 Driver Installation for fast-PC6x Card Installing of Universal Debug Engine
Driver Installation for Starterkit Version
JTAG Parallel Port via Standard Parallel port
1. Click the check box "Starterkit JTAG Parallel Port" for installing the Starterkit Version
with parallel port support (Onboard JTAG adapter) or use the prepared "Installation for
Starterkit" version of UDE. Click Next to continue the installing process.
2. The driver installation begins with the dialog box "Step 1". Click Next to continue the
installing process.
3. Select the free parallel port for using. Possible selections are LPT1 and LPT2. Please
disconnect all devices from the selected parallel port and click Next to continue the
installing process.
4. The JTAG parallel port Driver for direct communication via standard parallel port will
be installed. Finish the driver installation.
Installing of Universal Debug Engine Driver Installation for Starterkit Version 47 of 177
License Manager
When a new version of UDE is started the first time, a firmware update may be executed
on the access device (UAD, UAD2 ...). This may take some more time than usual for the
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
During the installation process, you will be asked for a license key. You got your personal
license key with consignment of Universal Debug Engine. You can also find the license
key within the UDE CD-ROM case.
Please enter the key into the left edit field and click Add. A new key entry will be added, if
the license key is valid. Pushing the Button OK applies the changes to the system.
Otherwise licenses are distributed as key file with the extension *.ukf.
Use the button Add Key File to browse and select a new key file.
If you expand your feature list of UDE, you will get further license keys. These keys will
either replace an older key or complement your key list. Please use the Help - License
Manager from the system menu of UDE to open the License Manager.
If you do not have a valid license key for a desired feature, a message box "License
check failed" will appear as soon as you request this feature.
! Please note that one license key is valid for the combination of one Universal Access
Device with one supported target architecture only.
The content of the file HostID.txt hast be send to PLS’ support mailbox (support@pls-
mc.com) with the activation key from license documents.
The script COM-object identifier of the UDE license server is version depended. The
COM-object id listed in the script code above is the COM-object id of UDE license server
of UDE version 3.0. If higher UDE version is used, the first line of code must be changed.
For UDE version 4.4 this script code line must be changed to:
set LicenseServer = CreateObject ("UDE.LicenseServer.4.4")
3. Fill all necessary fields of the license key request form, such as user name,
department, e-mail address and license activation key
Typically, the license arrives as attachment of a mail from PLS’ support team. Save this
attachment to a local hard disk path. Than execute the following steps to activate the
node-locked license by UDE license manager dialog:
1. Start UDEOpenPlatform.exe or UDEDesktop.exe
2. Open UDE main menu „Help“ and use submenu “License Manager” to open
UDE license manager dialog
3. Press Add NL License File and browse with the opened file input explorer to
your local copy of the license file.
4. After successful import, the license manger dialog will be updated and displays
the additional node-locked licenses.
Note: If you made any modifications on the examples and you want to keep these
!
changes, copy or move the example source files to another location before uninstalling or
reinstalling of UDE. However, the uninstall procedure will not delete other projects and
files.
For reinstalling the Universal Debug Engine start the Setup program SETUP.EXE
from the UDE for TriCore CD-ROM. In the first step, the previously installed components
of UDE are removed. Please follow the instructions on the screen.
Precautions
When a new version of UDE is started the first time, a firmware update may be executed
on the access device (UAD, UAD2 ...). This may take some more time than usual for the
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
C16x Example programs for C167, ST10F167, ST10276 and other derivatives
Example program lets flash the LED using the PCP. This Example is delivered
HelloPCP for TriCore derivatives with PCP on-chip available only
Sieve Example demonstration of the Simulated I/O capabilities, source code directory
TimeDemo Example demonstration of the variables auto refresh mode and using interrupts
GnuTC Example directory GNU Compiler, contains source, locater and makefiles.
Ram Example located for using in external RAM, contains binary and mapping file
iRam Example located for using in internal RAM, contains binary and mapping file
Rom Example located for using in external ROM, contains binary and mapping file
iRom Example located for using in internal ROM, contains binary and mapping file
TaskingTC Example directory Tasking Compiler, contains source, locater and makefiles
Precautions
When a new version of UDE is started the first time, a firmware update may be executed
on the access device (UAD, UAD2 ...). This may take some more time than usual for the
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
The next step is creating a new workspace. An UDE workspace saves all configurations
and settings of UDE Desktop, windows and their content, path and name of loaded files.
The file extension is *.wsx
Click New Workspace on the File menu and create
a new file, e.g. TC1796_TriBoard.wsx .
After creating the new workspace, you will be asked
to select a target hardware configuration. UDE
comes with some default target configurations of
starterkits. Click the Default button and enable "Use
a default target configuration" to select a predefined
configuration.
On a later chapter, the creation of a new target
configuration will be described as well.
Select this entry and click Finish. Set the name for the target configuration, e.g.
TriBoard_TC1796.cfg. In the "Select target Configuration" dialog click OK. When
executed successfully, the UDE for TriCore Workbench appears:
When a dialog "License Check Summary" appears, a valid license is not available. There
are some reasons for that. Your license key, you have got within the delivered UDE
package, was not published to UDE. Use the menu Help - License manager for inserting
! the key string. Alternatively, the hardware add-on is not connected or powered on. Please
use the Device Manager from the Control panel for validation.
Project management
A docked window at the left-hand side of the UDE desktop
houses the Explore Symbols tab where the application's
source files and their inside procedures are shown after
unfolding the markers.
If no workspace window is shown, you can make it visible via
the menu Window - Project Workspace.
The UDE project contains source files, C/C++ functions,
address sections and user-defined breakpoints.
By double-clicking on one of the source files, the selected file
will be brought into the Program window; by double-clicking on
one of the procedures, the selected procedure is displayed.
After loading the program code, the Program window shows
following content.
In the Program window, a yellow arrow indicates the current instruction pointer position.
! force the view of the current instruction pointer use the context menu Show Next
Statement or the main menu Show - Show IP.
Note: For debugging the C/C++ parts of the example program only, the start-up code
must be executed first. For this, make a Step over Subroutine from the Debug menu of
! UDE. After that, the IP will be shown at the main function; the start-up code has been
executed.
The application can be reloaded with Restart Program Execution. If the program is
running already, it will be started immediately after the reload terminates.
Setting Breakpoints
Now, we assumed that a loaded application is error-free and ready for running. However,
for debugging purposes single step executions and breakpoints have to be performed to
watch program behavior and processor status.
Now we want to set a
breakpoint in the
Hello program. To
do this, either click with
the mouse on the grey
column on the left or on
a line in a procedure
and then click on the
simple Hand symbol in
the tool bar. A red-filled
dot appears in the line
indicating that the
breakpoint has been
successfully set.
Alternatively, you may
also select the menu
Debug -
Breakpoints...
Note: The OCDS unit of the TriCore microcontroller supports an unlimited count of
software breakpoints, but only four hardware breakpoints. The background is that
software breakpoints are made by software code patching, which is only possible in
! writeable RAM areas. Hardware breakpoints are supported by the OCDS unit directly and
can be used in read-only ROM areas only. The possibility of patched ROM areas (e.g.
FLASH) is not realized in UDE because of the vendor-defined limited FLASH
programming cycles.
CPU Registers
The CPU Register window is opened
by the menu View - CPU Window or
the corresponding tool bar button.
Perform a few single steps to see the
CPU register values changing
according to the executed instructions.
Registers which values have been
changed compared with the previous
state are red highlighted to provide
quick overview.
While the program is stopped (e.g.
between single steps) you may alter the
content of registers. Simply click on the
register's value in the CPU registers
window and type in the new value of
the register.
SFR Registers
Special function register values are changed in the same way like in the SFR Register
window (open this window by selecting the menu View - SFR View). To add a new
register entry, select Browse Ins from the context menu of the SFR Register window and
take the SFR that you want from the list.
! Various registers are protected which means that a special unlock sequence is required
to change the register value. UDE can unlock these registers. Use the context menu of
the register name and disable the entry Write protect.
Viewing Variables
Viewing and changing global/static variables
All global and static variables from the
C/C++ source code may be observed
directly using the Watch window. Open the
Watch Window by selecting the menu View
- Watch Window or the corresponding tool
bar button.
The variables can be added by double-
clicking to <new variable> or using the
context menu of the <new variable> entry
via Browse Ins. The browser dialog shows
you all available global and static variables.
Click Add for adding a new variable to the
watch window.
The variables are sorted in following
groups:
Global Variables – shows all global variables with a global scope.
Static Variables (at file level) – shows only variables visible at a specific file.
Static Variables (at function level) – shows only static variables visible at a specific
function.
Static Variables (all) – shows all static variables, which are not global variables.
All Global/Static Variables – shows all global and static variables.
If the variable is expandable, i.e. it is a pointer or an array, clicking on the '+' sign in
front of the variable's name will expand it. This means, that the location where the
pointer points to or the content of the elements of the array will be displayed.
Expanding is possible for more than one level.
Variable values can be changed easily by double-clicking in the value area or pressing
<F2> and typing in the new value.
Watch tips
Furthermore, UDE offers so-called Watch tips, which show you the content of simple
variables in the Program Window. Highlight i.e. the morse_bit_counter variable
from the morse() function by a double-click, move the mouse pointer over and the
content will be displayed in a watch tip after a short waiting time.
Select the PCP entry as shown above, it enables the PCP debugging. Change the Target
Description to ".. TC1796B and PCP (JTAG)". Click OK.
Your workspace will be reconfigured and the workspace view shows two core debugger
entries.
All windows can be allocated to one of the cores only, except the command view. To
! differentiate the both cores each window shows the allocated core as descriptor in the
title bar, i.e. as Controller0.Core and Controller0.PCP.
To debug the PCP program, set a breakpoint in the PCP code, switch to the Core
Window and execute a Step over Subroutine. This will initialize the PCP. After that click
onto Start Program Execution of the TriCore code.
Please note, that the sequence described above must be executed exactly in this order.
The background is that the start-up code transfers the PCP code to the PCP memory and
! overwrites any software breakpoints. To give the UDE the possibility to set a breakpoint
to the PCP, UDE must have access to the PCP after the initialization. That is why the first
step must be a Step over Subroutine.
The PCP program will stop at the breakpoint. Now you may for example step through the
code, continue running the PCP program or watch the PCP registers.
HelloPCP Internals
The TriCore program initializes the GPTU0, the PCP and the port P0. At the end of the
program, the GPTU0 timer is started to provide recurrent interrupts to execute the PCP
routines.
The PCP program may be viewed like a state machine. Each interrupt causes the PCP to
start in the following state (EXIT instruction with restart at next address). Each state ends
with setting GPTU0 registers to proper values. When the timer of GPTU0 overflows,
channel 1 of the PCP is restarted. This way, the PCP program will infinitely run and
continuously send the string defined by
const char morse_string[] ...
The default target configuration contains all information about the Core0, Core1, Core2,
GTM and FLASH devices. Core0 is the master core (TriCore1.6P), Core1 and Core2 are
slave cores (TriCore1.6E) of the Core0. GTM support is disabled in this example.
The page Connect / Reset setups the connect options including the reset mode and the
initialization commands.
The pages Debug and Start / Halt defines more debug options and start/halt commands.
Please see the UDE help description for more information about the meaning of each
setting.
Leave the Target Interface Setup and click OK. When the connection is successfully
established, the following messages will appear in the message view:
Connection to TC275A_ED target established: TriCore(Core0),
ID: 201DA083h
Connection to TC275A_ED target established: TriCore(Core1)
Connection to TC275A_ED target established: TriCore(Core2)
When all debuggers are launched, UDE is ready for loading the multi-core application
Timedemo.elf.
By default, each visibility group is assigned to the appropriate core and only those
windows are visible at the same time. All open windows can be assigned to different
visibility groups. This way it is possible to show windows related to a different core than
the active at the same time. To customize the visibility groups use the context menus of
the Visibility Groups Manager and underneath items in the target browser.
UDE will load and transfer all binaries into the corresponding core and the symbols to the
debugger symbol server. After that step, you can add new windows to each core
debugger.
Click to Program All and Verify All to work on all FLASHs at once.
The FLASH/OTP Programming Tool supports Remap settings for download into
cached regions. Click to Setup ... button and select the page Mapping.
The FLASH/OTP Programming Tool supports the Safe BMI header handling, too.
Core Selection
To select the right core debugger, you can click into a core-specific window (with a
colored frame tab) and the focus will be on this core debugger. The state bar below
shows the current selected core debugger and allows the selection via right-click on it,
too. The context menu of a specific core in the Target Manager windows allows it also to
make this core active and focused.
This behavior of UDE is high configurable. Use the menu Config – Debug Server
Configuration – Framework – Switch Debugger to setup all options.
Core0 is halted and is focused, Core1 and Core2 (slave cores) are inactive and not
focused. For each core a CPU window is opened.
Single-Core Breakpoints
A simple example is to set a breakpoint to a program location of a single core. Select a
core program window and set the breakpoint via context menu in this program window. If
the source file is not available, opens the CoreX Symbols window and select the source
from the Source Files folder.
In this first example, select Core1, set a breakpoint to line 83, select Core0 (only this
core can be started in TriCore2 architecture) and run the program via Start Program
Execution. This will start the Timedemo.elf on Core0, and Timedemo.elf will
start Core1 und Core2 automatically. After a short time, Core1 stops, because the
breakpoint is reached. Core0 and Core2 are running furthermore.
After inspecting of Core1, it can be started via Start Program Execution again.
Without run control group cores are mainly independent. Go / Break / Step-Into / Step-
Over / Step-Out commands influence active core / debugger only, Reset influences all
cores.
Select the required properties of the run control group via check boxes.
Break the program via Ctrl+F5. Core0 and Core1 are stopped simultaneously; Core2 is
still running (because it is no part of a run control group). Select Core2 and stop it
manually. Remove all breakpoints. Restart Program via F7.
Set a new breakpoint in Core1 in line 51 and start the program execution. Both, Core0
(halted) and Core1 (halted by internal breakpoint) are stopped by the breakpoint
condition in Core1. Core2 is running furthermore. The same mechanism works while
stepping through the program code.
Multi-core breakpoints are useful to set in shared code. These are breakpoints in all cores
of a corresponding run-control group
72 of 177 A Multi-Core GTM Debugging Example with PowerPC MPC5746M Getting Started
A Multi-Core GTM Debugging Example with PowerPC
MPC5746M
Recent 32-bit multi-core architectures like TriCore AURIX or PowerPC MPC5746M
contain a multipurpose Timer module called Generic Timer Module (GTM). On the
TriCore platform, this timer module is designed to detach the former General Purpose
Timer Array (GPTA). Because of the complexity of the GTM, this example will only give
an introduction of the debugging possibilities. At the starting point, it will begin with the
creation of an UDE workspace. After the workspace, common elements like the start-,
stop-control and the multi-core behavior are being shown. After the common control, it
will dive into more debugging details of the GTM by debugging the Multi-Core-Sequencer
(MCS). Please note that the described multi-core features of UDE are available in the
UDE Open Platform. Please run UDE Open/Visual Platform from the Window’s start
menu.
The default target configuration contains all information about the Core2, Core0, Core1,
GTM and FLASH devices. Core2 is the master I/O core (e200z425), Core0 and Core1
are slave cores (e200z420) of the Core2. Please check that the GTM core is also
enabled (see red circle).
Click OK. When the connection is successfully established, the following messages will
appear in the message view:
Core2::UDEDebugServer, Connection to MPC5746M target
established: PowerPC Target, JTAG-ID: 0x0AF0A01D
Core0::UDEDebugServer, Connection to MPC5746M target
established: PowerPC Target, JTAG-ID: 0x0AF0A01D
Core1::UDEDebugServer, Connection to MPC5746M target
established: PowerPC Target, JTAG-ID: 0x0AF0A01D
Getting Started A Multi-Core GTM Debugging Example with PowerPC MPC5746M 73 of 177
GTM::UDEDebugServer, Connection to MPC5746M target
established:GTM, ID: 00000000h
Please note that the GTM ID is always “0h” after connect, because it is not enabled yet!
When all debuggers are launched, UDE is ready for loading the multi-core GTM
application Timedemo_GTM.elf.
74 of 177 A Multi-Core GTM Debugging Example with PowerPC MPC5746M Getting Started
UDE will load and transfer all binaries into the corresponding core and the symbols to the
debugger symbol server. After that step, you can add new windows to each core
debugger.
Core selection
To select the right core debugger, you can click into a core-specific window (with a
colored frame tab) and the focus will be on this core debugger. The state bar below
shows the current selected core debugger, too.
For example, UDE can be visible as the following screenshot shows (use the zoom
function to get a closer look):
Core2 is halted and is focused, Core0, Core1 (slave cores) and GTM are inactive and not
focused. For each core, a CPU window is opened. Questions marks indicate that the core
is not enabled yet.
Single-core Breakpoints
A simple example is to set a breakpoint to a program location of a single core. Select a
core’s program window and set the breakpoint via context menu in this program window.
If the source file is not available, opens the CoreX Symbols window and select the
source from the Source Files folder.
Getting Started A Multi-Core GTM Debugging Example with PowerPC MPC5746M 75 of 177
In this first example, select Core1, set a breakpoint to line 37, select Core2 (only this
core can be started on PowerPC architecture) and run the program via Start Program
Execution. This will start the Timedemo_GTM.elf on Core2, and
Timedemo_GTM.elf will start Core0 und Core1 automatically. After a short time,
Core1 stops, because the breakpoint is reached. Core0 and Core2 are running
furthermore. If Core0 and Core2 are also stopped, check if the they are part of a “Run-
Control-Group” (see next section “Multi-core Breakpoints and Stepping”).
After inspecting of Core1, it can be started via Start Program Execution again.
Select the required properties of the run control group via check boxes.
Break the program via Ctrl+F5. Core2 and GTM are stopped simultaneously; Core0 and
Core1 is still running (because it is no part of a run control group). Remove all
breakpoints. Restart Program via F7.
The same mechanism works while stepping through the program code.
76 of 177 A Multi-Core GTM Debugging Example with PowerPC MPC5746M Getting Started
At first, restart the Program via F7. If not yet already done, create a new “Run-Control-
Group” as mentioned above. Now select Core2 and set a breakpoint to line 71 (behind
the initGTM()- function) in main.c. Select Core2 and run the program via Start Program
Execution. After a short time, the Core2 and GTM core stop.
Click on the GTM list box to select the desired MCS channel:
Open the Code Window by selecting the colored tab corresponding to the GTM core to
look for the channel instructions as shown below:
The MCS CPU Window shows the current context register values:
After each MCS channel select, the instruction pointer inside the Code Window and the
MCS CPU Window contents are updated properly.
Getting Started A Multi-Core GTM Debugging Example with PowerPC MPC5746M 77 of 177
Using the MCDS On-Chip Trace with TriCore2 AURIX
Preparations
The further steps require AURIX target hardware containing a TC27X emulation device
(e.g. AURIX Starter Kit TC275 or AURIX Starter Kit TC277). Please check, that the board
is equipped with an emulation device chip (device type suffix ED).
The following instructions require:
that the connection to the AURIX target is established
and that the samples application TimeDemo.elf for TC27xx is loaded
(<UDE_SAMPLE_DIRECTORY>\SAMPLES\
TriCore\TriBoard_TC275A\Multicore_Timedemo\TriBoard_
TC275A_Hightec_IntRam2\Timedemo.elf).
78 of 177 Using the MCDS On-Chip Trace with TriCore2 AURIX Getting Started
As soon as MCDS trace memory is filled, the recording background task within the
“Background Task Progress” window disappears and the trace window will be filled.
The recorded samples are the instructions of program execution of core 0 of TC27XX
after call of main function.
Getting Started Using the MCDS On-Chip Trace with TriCore2 AURIX 79 of 177
The multi-core trace in a single trace window:
80 of 177 Using the MCDS On-Chip Trace with TriCore2 AURIX Getting Started
An Example with C166S V2 / XC16x via
JTAG/OCDS L1
Starting with Universal Debug Engine
In this chapter is shown, how to connect to Infineon's XC16 board using the starterkit
mode via LPTx or a high-speed connection using an UAD.
First launch UDE and create a new workspace and a target configuration as described
above. To switch between the starterkit mode and the communication via UAD you must
setup the communication protocol. Open the Edit Target Configuration dialog and
select the C166SV2 item in the tree, push the Setup button on the right panel. As 'Access
Device' the UAD, the 'Starterkit Driver' and 'DAS' can be selected. After the selection,
push Setup to configure details of the communication device. To switch this setting later,
use the main menu Config - Target Config.
To setup the target configuration to Starterkit mode, the Starterkit Driver
JIO_API_XC16x.dll, located in the UDE directory, must be used. If this file is not
available and needed, you have to modify the UDE installation including Starterkit
support.
The Universal Debug Engine will now try to connect to the target system. When the
connection is successfully established, the following message will appear in the
command window:
To recognize write access to the variable Buffer[0], we will use the Equal
Comparator. Therefore, please select the option Write Address under Event Source in
the Equal Comparator. When the trigger condition occurs, the application is stopped in
this example. Please select Break User Application in the Event Action field.
To select the address to be monitored, click on the button Equal Comparator. In this
example, we want to set the address of the variable to be displayed directly. Select Mode
I and enter the address of the variable 0xA02F into the field Value.
After closing the dialog, the target is halted automatically. In the command view, the
reason is written:
UDEDebugServer: Target execution - halted by trigger
event - program location 0xE00362
Switch the program window to mixed mode view, the instruction pointer shows 0x3C0.
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
In this chapter is shown, how to connect to Freescale's MPC5567 board using a high-
speed connection via an UAD. First launch UDE, create a new workspace and select the
default target configuration for PowerPC/MPC5567 “Freescale MPC5567EVB Evalboard
with PC5567”. When the connection is successfully established, the following message
will appear in the command window:
MSG: Controller0.Core::UDEDebugServer: Connection to
MPC5567 target monitor established: PowerPC Target,
JTAG-ID: 0x1813401D
Please note, that in the case of using of the integrated caching mechanism of the
PowerPC MCU, the view cannot be fully updated. The changed values are saved in
cache memory and are updated only, when a cache write back is executed. This is done
for example, when the program execution will be interrupted by holding.
Trigger Functions
This chapter demonstrates how the PowerArchitecture Book E defined triggers of the
MPC55xx derivatives can be used for debugging purposes. Again, the starting point is
UDE with the application TimeDemo.elf loaded. We want to create a trigger configuration
that stops program execution when a write access to the variable Buffer[0] occurs.
Open the Hardware Debug Resources dialog by menu Debug – Setup Trigger unit.
Select the rider Data Address. We want use DAC1 as trigger comparator. Enter the
address of Buffer[0] into the address box. For simplification C-style expressions can
be used, so simple enter &Buffer[0].
Enable User and SV (Supervisor) as Break Mode, select Write Access mode, Effective
address and Exact comparator.
Start the application.
Hardware Requirements
Because the 3Pin communication is not a standard communication port directly
supported by the microcontroller, the user must adapt the 3Pin port to the used hardware.
For a successful connection between the target and the used communication add-on as
the Universal Access Device at least 3 pins and the ground potential must be connected.
The following table describes the relevant signals:
Pin 1
GND GND
For the bootstrap loading sequence, an additional connection is required between the
ASC0 Target connector of the Universal Access Device and the ASC0 connector of the
miniMODUL-167 (P1). A simple 1:1 SUB-D9 (M) to SUB-D9 (F) extension cable can be
used.
Build the monitor by execution of these 6 steps offered by the Monitor Wizard. Choose
the controller derivative, the pins for the DATA, CLOCK and MODE signal and the
monitor location. For the monitor location 3F000h is a suitable value. In the last step build
the monitor with the predefined characteristic. Save the monitor as mm67_3pn.mon.
Push the button Change... to setup the target interface and follow the next steps.
If no initialization commands are given, click in the input form and enter a new init
command. To change an existing entry, click to the entry and edit the value.
Following init commands are required for successful working with the miniMODUL-167:
BUSCON0 ROM
0 3FFFF
Close the dialog and start the target interface by pushing the button Single retry. In the
target connection dialog failed dialog. When the connection is successfully established,
the following message will appear in the Command window:
UDEDebugServer: Connection to C167CR target monitor
established: monibc67 V3.42 08/00
(C) 1991/2006 pls Programmierbare Logik & Systeme GmbH.
In this example a special Target Monitor using the bootstrap loading mechanism has to
be used. The various offered standard ASC monitors differs only in the location where the
monitor is located.
For example, C167.ASCMon.BM67C0256 means a C167 ASC0 monitor is located at
3F290h – 3FFFFh, below the 256 kByte RAM memory boundary. Click the "..." button to
select another located monitor.
Select ASC as Debug Communication Channel.
Connect/Boot
In this example, the settings of Connect Option are not relevant, because the UAD
cannot cause a reset on your target via an ASC0/TTL line. Leave the Connect Option on
default.
The initialization commands are executed from the Boot Code while the system
configuration processing. The commands initialize the memories they are connected on
/CS0 and /CS1 via a demultiplexed 16-bit bus. The address range of the /CS1 memory is
mapped 0x00000 to 0xFFFFF. Finally, the EINIT instruction will be executed.
Refer to the UDE manual for a complete set of initialization commands and to the C167
architecture manual for a description of external bus unit of the C167 microcontroller
architecture.
Close the Target Interface Setup via the OK button and click Next. If changes are
necessary later, you can change these settings within UDE.
With these steps, the FLASH/OTP Memory Programming is prepared. Further steps are
required when you are using the Programming tool. Please refer to the user's manual
chapter „FLASH Programming“ for further hints of use.
!
Finish the wizard
Enter the name of the file you intend to save the configuration of target. Usually the
Target Configuration files are stored in <UDE_DIRECTORY>/TARGETS folder.
By pressing the Finish button, you apply the settings to the target configuration. The
debugger loads all necessary components and connects to the target. If the following
message is displayed in the Command View, you were successfully.
MSG: UADCommDev: Connected to UAD 70022, FW-Version: 1.1.12
MSG: UDEDebugServer: Connection to C167CR target monitor
established: bootmon167 V3.41 07/00
(c) 1991/2000 pls Programmierbare Logik & Systeme GmbH
To edit this target configuration you can select the menu Config - Target Configuration.
In the appearing dialog you can modify the target configuration.
You may now create your own applications using the GNU, the Tasking, the Keil or the
Greenhills C-Compiler and debug them with UDE. As UDE is constantly improved, please
check out our web site at http://www.pls-mc.com for the latest version of UDE.
? Additionally, if you have any questions or if you need any help regarding your
development tools we would like to encourage you to contact the PLS Support Team via
email at
support@pls-mc.com or via phone at +49 35722 384 0.
Introduction
The Universal Debug Engine (UDE) is one of the most powerful development
workbenches available for the AURIX, TriCore, PowerArchitecture, Cortex, ARM7, ARM9,
ARM11, C166, XC166, XC2000, XE166, XScale, RH850, SuperH SH-2A and further
microcontroller families.
The UDE workbench lets you edit and organize your projects, supports you while building
the applications and lets you run and test your software on the supported microcontrollers
based customer specific hardware or different evaluation boards in a very convenient and
cost-efficient way. The vast capabilities of the UDE High-End Debugger enable you to
develop fast and reliable software as well as to get short turn-around times for your
microcontroller projects.
Integrated Development
Editor Environment
R
T
O
S
universal debug engine
Target
Simulator JTAG ICE
Monitor
ViewServer
ViewServer ViewServer
Custom
Program Program2
MultiCore
Debugging
ViewServer ViewServer
Watch HTML
When a new version of UDE is started the first time a firmware update may be executed
on the access device (UAD, UAD2, ...). This may take some more time than usual for the
! target connect operation. Please DO NOT power off or unplug the access device while
this time!
Press the Default button to select a predefined configuration delivered with UDE.
Press the New button to create a new configuration and follow the Configuration wizard.
Select a predefined target configuration and press the Copy button to derive a new
configuration from the selected configuration. This is recommending for adaptation of a
similar configuration.
Select a predefined target configuration and press Edit to change an existing
configuration. Please note that the changes are saved permanently.
Loading a Project
Open the File menu and select Open Workspace. Select a valid workspace file in the
opened file selection box. Usually, workspace files are named with the file extension
*.wsx .
To load the application binary file use the Load Program from File menu and select the
binary file. If you use the multi-core debug feature, please note that momentarily only
compilers are supported they build the single core's source into only one binary file.
Closing a Project
To close the current workspace, select from File menu Close Workspace. This will save
all settings of the UDE Desktop, view windows and their contents, paths and names of
loaded files and will close your current project. The project and its workspace are also
saved when the UDE Desktop is closed.
Compiler Support
The recommended file extension for the output file are *.out (C166 derivatives) and
*.elf (all supported derivatives). If you want use the HLL source code-debugging
feature in the debugger, the corresponding debug information must be linked to the
executable file. See the compiler manual for the correct options.
Note: If you use the multi-core debugging functionality of UDE, the software for both
cores is downloaded and initialized by the debugger automatically. Momentarily UDE
supports compilers joining the parts for the multi-cores to one single binary file only. The
Attention: If the debugger is not used the user application is responsible for correct
relocation and initialization of the core programs! Otherwise, the programs will fail.
HexFile Support
In addition, the simple Intel hex file and the Motorola S record format are supported.
LPT Onboard JTAG TriCore not required Connection via onboard JTAG
adapter adapter to the OCDS L1 module
LPT Onboard JTAG XC166 not required Connection via onboard JTAG
adapter XC2000 adapter to the OCDS L1 module
XE166
Select configuration
While creating a new workspace you can choose a new configuration for your target
hardware. The Universal Debug Engine is equipped with some predefined configurations
already. With this configuration, you have a short way to the first example with the
Starterkits, and you can derive a user-defined configuration from an existing Starterkit
configuration file, i.e.
Monitor-less solutions
On principle for the JTAG/OCDS L1 communication, no monitor is required.
Note: Because of the internal architecture, the C166CBC derivatives require a monitor
still. In the page Monitor the location of monitor and vector table can be adjusted.
! However, the monitor will be loaded into the target system transparently via JTAG/OCDS
L1.
!
located in the program sections by default. For viewing of
code outside of the program location, you may use the single
program window view.
Workspace
The workspace window shows all program specific
information and makes the navigation through the parts of
the program easier. The project is shown as tree control with
source files, functions and sections. You can expand the
view to the content by left clicking on the [+| -] Symbol.
If no workspace window is visible, open it via Window -
Project Workspace.
Source files
The folder Source files lists all sources of the current
project. With double-click you can open the source or bring
the source window to the top.
Functions
In the folder Functions all C/C++ functions of the loaded
program are displayed. By double-clicking on an entry in the workspace window, the
cursor is set to the corresponding line in the source code windows.
Sections
Sections are consecutive memory areas of code or data blocks. In the folder Sections all
allocated memory areas are listed, also the non-C/C++ parts of the program as the start-
up code, vector table and so on.
The yellow pointer indicates the current location of the instruction pointer. After each step,
the position is updated.
The solid red circle shows that a breakpoint is located at this position. You can only set
breakpoints to C/C++ source line indicated with a small blue dot or to assembler lines.
The small blue dot means that the compiler has generated machine code for this C/C++
source line.
The Single program window mode can switched on/off in menu Views - Single Program
Window and with a corresponding tool bar button.
Running a program
After the successful downloading of the program into the target, the program can be
started. The instruction pointer is set to the first instruction of the code. For example in
the C166 architecture, the address 0x0000 is used.
To start your program, use the menu Debug - Start Program Execution, or the <F5>
key.
Your program will stop under following conditions:
1. A breakpoint is reached.
2. A manual user break is made via menu Debug - Break Program Execution.
Note: Usually the compiler implements code for the case that the program returns from
the main function. Often it is implemented as an infinity loop, so that the program will
! continue running after the main's return. A solution for that problem is using a breakpoint
at the last return instruction.
Inline Assembler
The integrated inline assembler allows the change
of several machine instructions. It is available in
program windows in mixed mode or disassembly
mode only.
To input a new machine instruction set the mouse
cursor to the assembler line and use the context
menu. The entry Integrated Assembler allows to
start the Inline Assembler. In the following dialog box you may input the new machine
instruction. Push the button OK and the new instruction will be written into the target's
memory.
Attention: If the new instruction does not fit in the alignment and length of the code, a
! further instruction line is inserted with non-valid instructions. Be careful that non-valid
instructions are not occurred in the code.
CPU View
The CPU window displays a selection of CSFR and GPR registers of the target
controller. It allows a fast access to the PSW, IP, Address and Data Registers. It is not
possible to configure the view of the register set for the CPU window.
SFR View
The SFR window allows a more flexible view to the registers. You can select any free
collection of CSFR, SFR and GPR registers that are displayed in the SFR window. This
way, a simple custom specific view is possible.
HTML View
Maximum customization is offered by the HTML window. It allows creating customer-
specific HTML documents where UDE ActiveX-controls, user components and access to
the UDE Object Model are embedded. This allows you to visualize and control aspects of
your target system in a more understandable and attractive way.
CPU View
To open the CPU view use the menu View - CPU window. A predefined selection of
CSFR and GPR registers of the target controller will be shown.
Color coding
The register values appear in three colors indicating the current state of the value.
Register Value Color State of the Register Value
Red Value has been modified by the program during the last step
Blue Value was changed by the user, but not yet written into the
target
Black Value was not changed
Note: For writing the user-changed value into the target, click outside the edit box, but
! inside the CPU window or push the <RETURN> key. Otherwise, the value will not be
written into the target.
It is possible to display more than one bit field per row. This is useful if the register has a
great number of fields (e.g. port registers). You can select 1, 2, 3 or 4 fields per row. To
change the layout you can use the context menu and go to Layout. In the submenu
select one of the alternatives. You can also change the order inside the SFR window.
Move the register per Drag ’n Drop from one location to that place that you want.
The layout of the SFR view content can be exported and imported via Content from the
context menu.
Note: Some registers have a lock symbol left to their name (e.g. the BIV register in the
! figure above). That means that these registers are EndInit protected. To change their
values you must first unlock them. For that registers a new option Write protect is in the
context menu. If this option is disabled the lock symbol is also in an unlocked state. Now
you can change the data. The Debugger performs a special access cycle in this case.
Color coding
The register values appear in two colors indicating the current state of the register value.
Note: All HTML views are interactive only when they are running under the UDE desktop
! control. That is why the HTML window for viewing must be used.
The online help system contains a detailed description of the UDE object model
illustrated with many examples. The documentation can be found at
<UDE_DIRECTORY>\Help\UdeObjectModel.chm
Watch View
Note: In the first line of an expandable variable the value means the base address of the
! variable. In the example above, the abyBuffer variable is an array. The first line value
entry 0x4001 points to the base address of abyBuffer in the target's memory.
Watch Expressions
In the previous section, the selection of variables to view from a list by its name was
described. Beside this, it is also possible to define watch expression, which means the
manual selection of variables and parts of its structures.
Syntax
VariableName (global)
VariableName#
The second form is for compatibility reasons to fast-view66 only.
Example
g_nCount (global)
Syntax
VariableName [source_file]
Example
nLastTime [time.c]
Syntax
VariableName [source_file]:{function}
Example
nLocalCount [time.c] : {timer_overflow}
Syntax
?(<C variable or part of it>)
Examples
?(abyBuffer[5])
?(timeStruct)
?(timeStruct.hour)
?(arrayOfTimeStructsInstance[4].hour)
Real expressions
Real expressions means expressions that value do not have a fix address. Therefore,
these expressions consist of two or more global or static program variables and may
contain constants. They can describe in common C-Syntax, as the expressions would
used in a C program.
Syntax
?(<C expression>)
fconvert("<double_scale_factor>[,<double_offset>]",<C expression>)
(<C expression>)*<double_scale_factor>-<doube_offset>
Examples
?(timeStruct.hour*60)
?(timeStruct.hour*60+timeStruct.minutes)
?(arrayInstance[i])
?(arrayOfTimeStructsInstance[i+1].hour)
?(i+3)
Syntax
?("<printf format string one format specifier>", <C expression>)
Syntax description
Every line contains one watch variable description or watch expression like explained in
chapter II and III of this document. Blank lines and comment lines are also allowed.
Comment lines start with a semicolon character (';') as the first non-whitespace-character
of the line.
Variables Tab:
This dialog page enables to add variables to the current watch window. Variables are
sorted by scope: Global variables, Module static variables, Function static variables,
All static variables and a list of all. Within lower hierarchy levels the entries are sorted
in alphabetical order.
Expressions Tab:
The expression tab is the viewer for the global debugger “Expression Clipboard”. It
shows user defined expressions from Watch and Graph window and expressions
loaded via 'Load' button from *.wat or *.wax files . An expression can added to the
Watch or Graph window from here.
This means the parallel display of multiple values for the expression, which contains
only one integer variable. This makes it possible to display the calculated value of the
expression and of the corresponding integer variable. Following additional implicit
functions are available for such expression:
Formula simplification
Recognition of such formula type
Automatic extraction of integer variable
Changing of expression and variable possible
Recalculation and changing of integer variable in target if expression value
is changed
Absolute Breakpoints
Absolute breakpoint means a program stop at a
specified target location without any conditions.
Setting of breakpoints can be done via the context
menu of the program window. Set the cursor to the
program line and open the context menu via right
clicking.
The entry Insert/Remove Breakpoint set or reset a
breakpoint to the specified program line. As a result,
a solid red circle is shown on the left side of the
program line. The entry Enable Breakpoint enables
or disables the specified Breakpoint. Disable
breakpoints are shown as red circles.
The breakpoint dialog reachable via menu Debug -
Breakpoints gives you an overview about all breakpoints.
Conditional Breakpoints
Conditional breakpoints are used to halt a program because of a predefined condition. To
setup the conditional breakpoints use the breakpoint dialog, reachable via menu Debug -
Breakpoints ...
Data Breakpoints
UDE supports the usage of data breakpoints if on-chip debug support on target MCU is
available (e.g. OCDS L1). This means that the program will break when a read or write
access to a memory location is happen. Data breakpoints can be set in Watch View and
in Memory View.
The context menu of a Watch Window
serves to set data breakpoints. This option is
available only if the connected target
supports data breakpoints. It can use at a
one or more selected main and child entries
in all columns except the <new variable
entry>. The memory range for the data
breakpoint will build up from the start
address and the length of the selected entry.
If a head entry of a complex data type (e.g.
structure or array) is selected a data
breakpoint at the length of the whole type is
set. The breakpoint can be set on Write,
Read or Read/Write accesses. All data
breakpoints can be enabled, disabled or
cleared together.
Data breakpoints can be used in the
Memory Window similarly, the same context
menu is available. These breakpoints are
shown with red mark analog code
breakpoints.
Hardware/Software Breakpoints
Corresponding to the used target controller hardware and software breakpoints can be
used.
Software breakpoints are special microcontroller instruction that will cause an interrupt or
trap. To set a software breakpoint the program code must be modified. Because of that
the program part for debugging must be located in a RAM memory area.
Hardware breakpoints are only available with the support by specialized hardware
architecture. For example, the C166CBC, the C166S and the TriCore microcontroller
feature the OCDS L1, the On-chip Debug Support module, which allows hardware
breakpoint. With using of hardware breakpoints, the program code can be located in all
kinds of memory systems.
Note: The hardware breakpoints are a limited resource. That is why, not all breakpoint
! constellations are solvable with hardware breakpoints, i.e. breakpoints in complex case
expressions.
Syntax description
'function {source_file}.line[+]';module[,module2...];line_range;
line_offset;[address_offset];
'label [+ address_offset]';module;
address
! Please note that you can also type in symbolic names of programs object into the
address field.
Note that data marked in blue color might differ from the data in the target.
Toggling between these modes is done with the context menu entry Auto Write. When
writing to the target, the values will be verified. If the read value has the expected value,
the color is changed from blue to black. When writing has failed, the color is changed to
red.
Using Expressions
The typical application of Graphical Display Window displays target data, which are
stored in target program’s data arrays. The description, which parts from target array data
is displayed, is held flexible.
Once a line is selected the default context in UDE is changed to this location and all
information in watch, locals and in the CPU window is related to the selected context.
Different semiconductor vendors have defined trace interfaces like MCDS, Nexus,
CoreSight, ETM and ETB for this purpose. These trace ports are available on the
AURIX, TriCore, PowerArchitecture and ARM derivatives. The Universal Access Device
2+ with Trace Board add-on and Universal Access Device 3+ with parallel trace pod
support NEXUS and ETM parallel trace.
MCDS and ETB are embedded trace ports including the trace buffer on-chip, which
reduces the requirements of an external trace analyzer to a minimum. AURIX processors
support MCDS trace and several Automotive Power Architecture processors support
NEXUS trace over high-speed serial Aurora trace interface. Universal Access Device 3+
supports this high-speed serial trace interface by a special trace pod.
Triggered Transfer is a feature of TriCore and XC2000/XE166 micrcontrollers for high
performance polling of target memory.
Memory Transfer means the transfer of data via debug channel.
Cortex can provide trace event messages via the Serial Wire Output SWO or
Instrumentation Trace Messages ITM.
Trace Sources
MCDS Aurora Nexus Aurora
MCDS Nexus
Trace Trace
EmulationDevice
Automotive Automotive
Processor TriCore ED, EmulationDevice
Power Power
support XC2000 ED, AURIX ED,
Architecture Architecture
AURIX ED
Event Event Event Event
Output format Messages Messages Messages Messages
Processor
Cortex
support
Event
Output format Messages
Endless
Time accuracy1 Trace
Buffered in
Trace memory UAD2, UAD3
Endless trace
Advantages possible
Non-continuous
Disadvantages trace
1)
depending from target system
View format Bar chart Bar chart Bar chart Line chart
View format Line chart Message Log Line Chart Message Log
MCDS
MCDS Memory Transfer
Nexus, ETM, ITM,
Trace source Nexus, ETM,
ETB, CoreSight,
Periodical debug
Trigger Transfer
ETB, CoreSight read by UAD FW
ITM
Displays
Displays all Displays all
recorded read- Displays values
recorded recorded
Method of and/or write of a variable or
information information
Visualization access of expression over
contained in raw contained in raw
variables over time axis
trace data trace data
time axis
Graphical display
of variable trace Raw trace, flow of
records to get a recorded IP data Endless trace, full
Raw trace, flow of
Advantages better global related to scaling of time
recorded data
overview about appropriate and value interval
time of variable source code
access
Furthermore, the local menu of the appropriate trace stream node in the Target
Browser view provides also a local menu with all global control functions of the
trace stream.
Now you can start trace (tool bar icon or menu Tools – Start trace.. or trace window local
menu start trace function). After start of program execution, the Background Task
Progress window completes the task:
Record trace stream to memory
The core related trace messages are colored in the core specific framework windows tabs
colors. These colors can be assigned by UDE configuration dialog (menu Configuration
- Debug Server Configuration - Windows Tabs Color) .
The chart displays the actual statistics of instruction pointer sampling results. The
profiling method of periodical polling of the instruction pointer generates two kinds of
results for each function or section range:
Number of hits per function or section range and
the approximated execution time of the function.
The execution time will be calculated from hits per function multiplied with the period
between two samples. The Profiling Setup page enables setup of different parameters
like the refresh period.
The profiling result table lists all details of instruction pointer profiling data set.
It is recommended to enable automatic refresh of profiling data after end of program trace
(if 1Mbyte on-chip trace memory is filled) by the Profiling Setup page, Basic Profiling
Settings group, checkbox Enable automatic refresh of trace data.
Now you can start trace (tool bar icon or menu Tools – Start trace.. tool bar). After start
of program execution, the “Background Task Progress” window displays two subsequent
tasks:
Record trace stream to memory
Decode trace data
After completion of the last task, the Profiling Views page of the Code Trace Profiling
window will be updated with the results from last run of program trace. This method
generates more detailed results than the measurement by instruction pointer polling. The
results contain additional information (in comparison to profiling using instruction pointer
polling):
Number of recorded functions calls
and the average function execution time,
The quality of measurement depends from amount of traced program addresses without
tick information and it depends therefore from type of trace channel. The summary
information of the result table contains a percent value of “Approximate time stamps”,
which allows evaluation of the result precision. For all recorded trace samples without tick
information, the appropriate ticks must be approximated based on the last and next
known tick values.
Additional pages provide detailed information about source line coverage inside of
functions. The local menu of summary chart enables to open an additional page for
each function for that purpose. If the cursor of the summary page is positioned about
the bar of the appropriate function, the local menu provides an item, which allows
opening the coverage details page of this function.
Function Trace Mode, which displays an time base line chart of the recorded
addresses of the instruction pointer,
The trace data visualization will be updated, if new trace data are decoded and if they are
available for all trace data sinks. Therefore it is not necessary to define additional settings
then program the appropriate trace source to enable trace of instruction pointer values.
Using Expressions
The main difference between the expressions for Real-time Monitoring Mode and for
the Memory Locations Display Mode of the graphical display window is:
The expression memory locations display mode shows multiple data point at the
same time because this mode displays a snapshot of different memory locations of
the target program to the same system time. Therefore, these expressions contain an
additional part that calculates the iteration counter to address the point of the curve.
The real-time monitoring mode calculates the same expression periodically the
display the changes of the expression over the time. Therefore, it does not require
the expression syntax for an iteration counter.
Typical for real-time monitoring expressions can be consisting of:
Simple basic program variables from type signed / unsigned character signed /
unsigned short, signed / unsigned long of single or double precision floating point.
Expressions, which describes member of complex variables from type signed /
unsigned character, signed / unsigned short, signed / unsigned long of single or
double precision floating point.
Expressions, which calculates results from type signed / unsigned character, signed /
unsigned short, signed / unsigned long of single or double precision floating point
from any expression of the multiple basic variables or basic member of complex
types.
The main advantage of using complex expressions is, that real physical values, which
must be calculated from multiples program variables, can be collected and displayed in
real-time. This includes the ability to access to basic members of complex types and
dynamically access to array member and to the controller special function registers. The
detailed description of the expression syntax can be found at
<UDE_DIRECTORY>\Help\UdeGraphWin.chm in chapter „Reference/Using
Expressions“.
If Cursor Mode is active, the Snap to cursor to nearest curve flag enables to snap
current cursor location to the nearest valid curve coordinates. If Double buffering is on,
the curve data are stored double buffered. Double buffering avoids flicker effects during
re-paint operations.
The trace results of the graphical display window can be stored in an XML based data set
collection. A new data set will be generated after each measurement period (depends
from selected display mode). The Result storage object path of this XML file can be
selected. If Array Mode is selected, the measurement period is closed after each update
of the curve (typically an update of an array). If time Sample Mode is selected, the
measurement period starts with the first program code run after program download. It will
be closed by termination of debug session or program reload or new program download.
A new data set, which was generated after each measurement period, can be added to
an existing data set collection or it can discard earlier generated data set via Append
data set to existing data storage.
Activating an Add-In
To activate an Add-In within your project workspace and to write your application into a
programmable memory device please follow these steps:
1. Run UDE Desktop and load your project workspace.
2. Use menu Config - Add-In Components to open the UDE Add-In Manager. The
manager dialog shows a list of all UDE Add-Ins that are available within your UDE
installation. A checkbox shows whether an Add-In Component is already loaded
into the current workspace.
Removing an Add-In
To remove an Add-In from your project workspace use menu Config - Add-In
Components to open the UDE Add-In Manager. Now uncheck the entry of the used Add-
In.
Setup
For setup the TTF recorder, use the
context menu.
Enable/disable the recording of
transferred values
Address of the memory location to be
transferred when the trigger event has
occurred. Depending on the data wide
of the transferred value, this has to be a
valid 16-bit or 32-bit address.
Trigger Setup Show the trigger setup
dialog of the underlying target interface
to define the debug event that forces
the triggered transfer to be recorded.
Supported Functions
Depending on the capabilities of the memory device (and the driver used to handle the
device), MemTool provides functions to handle the device:
a chip erase function, that deletes the contents of the whole memory device
a sector erase function, that deletes the contents of one or more sectors of the
device
a program function to write data into the memory device. This function also takes
care about certain data alignment requirements of the device
a verify function that is implemented using the read functions of the target interface
a query state Function that can read the state registers of the memory device
a protect function that can be used to install, enable and disable read and write
protection mechanisms
Basic Concept
UDE MemTool is intended to handle on-chip and external memory devices that do not
permit direct and random write accesses unlike a RAM device permits. Typically, on-chip
FLASH/OTP memory devices and external FLASH are of this type.
A target may contain several on-chip and external memory devices that can all be
handled by MemTool. At a given time, only one device is activated. For each memory
device, a Memory Device Handler inside UDE MemTool handles all accesses to the
corresponding device. These Memory Device Handlers may be activated and deactivated
individually.
Programming of the memory device is done by the Memory Device Driver which is a
small application executed by the target MCU. MemTool uses functions provided by the
UDE Target Interface to load and run this driver application.
FLASH PROGRAM
ROM CODE buried range visual range
0 0x80'0000 0x90'0000
Mapping type used when the user application is about to be programmed into the
Memory Device,
To configure this example in UDE following settings must be done: The FLASH memory
must be defined in the target configuration as memory device with a visible address
range: 0x80'0000-0x8F'FFFF. To allow the remapping of the program code sections the
MemTool must be setup with a different start address: 0x00'0000 (via Setup of
FLASH/OTP Device dialog).
! Please see the next chapter for more detailed information about the configuring of FLASH
memory devices.
Please note: For programming on-chip FLASH modules of C16x and ST10Fx derivatives,
the on-chip FLASH module must be activated (SYSCON.ROMEN=1) and mapped to
! The detailed description about Add-Ins is contained in the chapter 'Activating and Using
Add-Ins'.
When the UDE FLASH/OTP Memory Programming Tool is enable, a new menu entry is
created in UDE menu Tools - FLASH programming. Open this dialog and the main
front-end of MemTool will be opened. Choose the FLASH device and try to enable it. If all
settings were correct, a list of FLASH sectors will displayed as shown below.
If not, please check carefully all FLASH device settings, the target hardware and the
content of the SYSTEM and BUSCONFIG registers again. The FLASH device must be
visible in full size. Use the memory window to verify your assumption about the hardware
in terms of the address ranges of RAM and FLASH.
As shown above a list of FLASH sectors is displayed. These sectors are located on the
FLASH addresses adjusted to the corresponding physical address ranges defined in the
target configuration. Because the program code is mostly located at 0x0, the 'Program
Time Mapping' must be activated.
Push the button Setup button to set the Use different Start Address to 0x0. Now the
'Program Time Mapping' is selected within UDE and the code range filter will be activated
from physical address 0x0 with the size of the FLASH device.
The Erase ... button allows the erasing of single FLASH sectors or complete FLASH
devices. Because of the FLASH architecture, a FLASH sector has to erased before new
FLASH programming. Before starting the Erase Function, the Select FLASH Sectors for
Erase dialog is shown. One or more sectors to be erased are selected here. If the current
Memory Device supports a Chip Erase Function, you may choose Erase whole FLASH
Module to execute this function. Otherwise, Sector Erase Function is used.
Program immediately starts to write all sections loaded into the current Memory Device
Handler. It presents the Execute Command Box showing the function progress.
Canceling the operation is also provided.
Program
The options Automatic Chip Erase Before Program and Automatic Sector Erase
Before Program allows the automatic erasing of sectors or devices before programming
with new data's.
With Simulate Random Access Mode, all sectors to be programmed with new data are
completely read out into buffers. Then, these sectors are erased. Now the buffered data
is merged with the new data to be programmed and the result is written back to the
memory device.
The verify function is started after programming has finished when Automatic Verify
after Program is enabled.
Depending on the functions enabled in the RTOS configuration file the RTX viewer
window immediately shows a snapshot of the current system state:
The green line inside the RTX viewer marks the task which was active/running before the
system was halted by the debugger. Please note, because the RTOS creates the tasks at
runtime, maybe not all tasks are displayed if the system was broken immediately after
first go/step.
After the UDE rcX Viewer was enabled, a new menu entry is created in UDE menu Views
- rcX Support. Open the rcX Viewer by clicking on this menu entry. Depending on the
functions enabled in the RTOS configuration file the rcX viewer window immediately
shows a snapshot of the current system state:
The green line inside the rcX viewer marks the task which was active/running before the
system was halted by the debugger. Please note, because the RTOS creates the tasks at
runtime, maybe not all tasks are displayed if the system was broken immediately after
first go/step.
Last
Eclipse 3.x version
released
with
Eclipse Juno
Tasking VX- Based on CDT 5.0 UDEEclipseIntegration.zip
toolset 3.x
Manual installation of
Based on standard CDT plug-ins
Eclipse Ganymede required*
* Detailed installation description provides the appropriate help topic ** UDE 4.05.01 or higher
Please note, that the Windows 32bit installation package of the appropriate Eclipse
version must be used for UDE Eclipse Integration plug-in.
On the next wizard page use browse button to select UDE sample directory (e.g.
C:\Program
Files\pls\UDESamples\TriCore\Triboard_TC1796\TimeDem
o\GNUTC)
Add an appropriate project name
Check the Languages checkbox C only
Select <none> as tool chain
? Please contact support@pls-mc.com for more samples of using the UDE object model.
<script language="VBScript">
dim PllCl
dim S0Clc
dim S0Con
dim S0Fdv
dim S0Bg
sub ReadFromTarget ()
set debugger = external
PllCl = cdbl (debugger.Register("PLLCL"))
S0Clc = cdbl (debugger.Register("S0CLC"))
if ((S0Clc and 2) <> 2) then
S0Con = cdbl (debugger.Register("S0CON"))
S0Fdv = cdbl (debugger.Register("S0FDV"))
else
S0Con = 0
S0Fdv = 0
end if
end sub
</script>
This HTML view based on the UDE object model provides a user-friendly view of the ASC
module.
? Please contact support@pls-mc.com for more information and examples about the UDE
extensions.
The Reference of the Universal Debug Engine (UDE) is available via the Window's Help
system. To use the help, please open UDE and press <F1> or browse to the UDE
installation menu and select UDE Help.
H O
Help Object Model 114
On-line Help 99 OCDS L1 8, 14, 16, 18, 21, 24, 31
Hex File 103 Trigger 82
HighTec 102 OCDS L2 8, 30
Host ID 49 OHCI 38
on-chip FLASH 155
I Overvoltage 13
IEEE1394 11, 21, 22, 23, 26, 27, 30, 38
IEEE1394b 24, 31, 39 P
ImageCraft 103 Parallel Port 14, 37
Inline Assembler 111 PCI 11, 28, 46
Installing PowerArchitecture 55
fast-PC6x 46 PowerPC 55, 83
Hardware 13 Trigger 84
Software 35 Printing
Starterkit 47 Memory Locations 124
UAD 37 Program Code 111
UAD2 37 Profiling
W
Watch Expressions 115
Watch View 115, 117
Advanced Expression Resolution 118
Expression 117
Expression Clipboard 118
Variable 117
Website 53
Workspace 100, 108
X
XC166 55, 81
XC2000 55, 81
XE166 81