SPC5-UDESTK Getting Started
SPC5-UDESTK Getting Started
SPC5-UDESTK
Debugging with UDE
Integrated Development Environment for 32bit PowerArchitecture derivatives
PLS 1991-2017 V 4.07.08.00
This manual contains 23 pages.
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. PowerPC is a registered trademark of IBM
Corporation. Power Architecture™ is a trademark of Power.org. Windows7, Windows8, Windows10 are
trademarks of Microsoft Corporation. Pentium and Core™ are trademarks of Intel Corporation.
All other names and trademarks are the property of their respective owners.
Contents
Introduction 5
Overview 5
Feedback 5
Getting Started 7
Before you start 7
System Requirements 9
Downloading the latest SPC5-UDESTK version 9
Installing SPC5-UDESTK 9
License registering and activation of SPC5-UDESTK 9
Installing Hardware 10
Static electricity precautions 10
Driver Installation of PLS USB/JTAG Adapter for SPC5xxx 10
Trouble shooting 11
Installing PLS USB/JTAG Adapter for SPC5xxx 11
Technical details of PLS USB/JTAG Adapter for SPC5xxx 12
LED status indication 12
User Manual 13
SPC5-STUDIO and SPC5-UDESTK (UDE) Integration 13
A First Example with SPC56L-Discovery 13
Starting with SPC5-UDESTK (UDE) 13
Loading an executable 14
Running and Stepping through the Application 16
Setting Breakpoints 16
CPU Registers 17
SFR Registers 17
Viewing Variables 18
Trigger Functions 19
Leaving the project 19
Programming FLASH memories 20
Basic concept 20
Enabling the FLASH programming 20
FLASH Programming 20
FLASH Driver Selection 21
Help and Support 21
Index 23
Introduction Overview 3 of 23
Introduction
Overview
This Getting Started document will help you to configure and install the Hardware and
Software tools necessary to operate the SPC5-UDESTK starterkit version for SPC5
starterkit boards. At the end of the instructions described in this document, you will have a
running environment that could be used as a starting point for further development or
evaluation work.
This tutorial goes step-by-step through the necessary procedures in order to:
Install the SPC5-UDESTK starterkit version.
Configure the starterkit board and connect it to the host PC.
Set up a project.
Debug a sample application.
If you need more information about the SPC5-UDESTK, please contact your nearest
STMicroelectronics sale’s office. Contact information is available on STMicroelectronics
website: http://www.st.com/web/en/support/online_tech_support.html.
Feedback
The SPC5-UDESTK is a product of STM which is based on PLS’ technology. The SPC5-
UDESTK starterkit version is part of the SPC5-STUDIO. Regarding any comments about
SPC5-UDESTK please use the website
http://www.st.com/web/en/support/online_tech_support.html
You are invited to browse to the PLS Development Tools’ website at http://www.pls-
mc.com to get the latest information about the professional and full version of Universal
Debug Engine (UDE).
PLS Development Tools welcomes feedback on products and documentations. If you
have any comments, suggestions or improvements about our products you are using,
please use the Feedback Form from website http://www.pls-mc.com, send an email to
info@pls-mc.com.
Introduction Overview 5 of 23
Getting Started
Installing SPC5-UDESTK
Run setup.exe and follow in the installing instructions. The SPC5-UDESTK starterkit
version will be installed into the diectory
C:\Program Files (x86)\pls\UDE Starterkit 4.8\
Workspaces, target configurations and samples are saved in
C:\Users\<USER>\Documents\pls\UDESTK 4.8\
1
3
Picture: Starterkit SPC56L-Discovery Kit with installed PLS USB/JTAG Adapter for
SPC5xxx
1
JTAG socket
connector to
1 3 5 7 9 11 13
target with 2 4 6 8 10 12 14
anti-inversion
notch
Push OK.
The SPC5-UDESTK (UDE) will now try to connect to the target system. When the
connection is successfully established, the following message will appear in the
command window:
Core::UDEDebugServer: Connection to SPC56EL70 target monitor
established: PowerPC Target, JTAG-ID: 0x0AEA9041
When launching SPC5-UDESTK (UDE) for the second time, you may use either File -
Open Workspace or File - Recent Workspaces to select the workspace and start a new
session with settings from the saved workspace.
If you get an error message, return to the section Software Installation and make sure
that all settings are correct. Refer also to the Troubleshooting section to get further
information. If the problem persists ask the STMicroelectronics Support Team at
http://www.st.com/web/en/support/online_tech_support.html
for qualified help.
Loading an executable
After having SPC5-UDESTK (UDE) for
PowerArchitecture SPC56L started, we want to load a
program that can be executed on the SPC56L starterkit
board.
First, the GNU compiler variant of the TimeDemo
example located for using in the internal sRAM should
be used. This example is a basic demonstration and
toggles the LED on the TriBoard only.
The example is located to the internal sRAM of the
SPC56L at memory address 0x4000’0000.
Select from the SPC5-UDESTK menu Load Program in
the File menu bar, browse to
Project management
A docked window at the left-hand side of the SPC5-UDESTK (UDE) desktop houses the
Core Symbols tab where the application's source files and their inside procedures are
shown after unfolding the markers.
The SPC5-UDESTK (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.
When clicking with the right-hand mouse button into the Program window, a context menu
appears to switch between Source code only and Source/Assembly code display via the
Mixed Mode entry.
Please note: After downloading a program executable, the instruction pointer is set to the
entry point of the program. Usually the entry point is located at the start-up code. That is
why the default C/C++ Program window above does not show an instruction pointer. To
! 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.
We want to set a
breakpoint in the
timedemo program.
To do this, click with the
mouse 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... or the Hand symbol in the tool bar marked
with 'D' to open the Breakpoints dialog.
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 in the SFR Register
window (open this window by selecting the menu View - SFR Window). 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.
Tooltips show the address, the reset value of the current SFR and further information
about the focused register. Expand a SFR for viewing all available fields composing this
register. With a right click on the values you can change them.
! Various registers are protected which means that a special unlock sequence is required
to change the register value. SPC5-UDESTK (UDE) can unlock these registers. Use the
context menu of the register name and disable the entry Write protect.
Watch tips
Furthermore, SPC5-UDESTK (UDE) offers so-called Watch tips, which show you the
content of simple variables in the Program Window. Highlight i.e. the Buffer[]
variable from the main 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.
Trigger Functions
This chapter demonstrates how the PowerArchitecture Book E defined triggers of the
SP56x derivatives can be used for debugging purposes. Again, the starting point is
SPC5-UDESTK (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
could 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. The application stops when the fist write to Buffer[0] occurs.
You will find the message
Core::UDEDebugServer: Core halted by internal breakpoint
inside of the command view.
Basic concept
UDE MemTool, a part of SPC5-UDESTK (UDE), 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 on the target MCU. MemTool uses functions provided by the
SPC5-UDESTK (UDE) Target Interface to load and run this driver application.
SPC5-UDESTK (UDE) observes the download channel and activates the FLASH
programming handling when it detects write accesses to the FLASH memory range. The
FLASH memory settings are done already, when you use the default target configuration.
FLASH Programming
If the UDE FLASH/OTP Memory Programming Tool is enabled, all registered FLASH
devices are installed with special filters. These filters watch the download stream for
address ranges met with a registered FLASH device. If the filters detect, that a code
section is loaded, which is destined for the FLASH device, the code section will be
marked for FLASH programming.
For the practical work it means, that you have to load the FLASH/ROM version of your
program code via File - Load Program only.