Renesas R0E00008AKCE00 datasheet: pdf

User’s Manual
E8a Emulator
User's Manual
Supported Devices:
R8C Family
M16C Family
H8S Family
H8 Family
740 Family
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corporation without notice. Please review the latest information published
by Renesas Electronics Corporation through various means, including the Renesas Electronics
Corporation website (http://www.renesas.com).
www.renesas.com
Rev.5.00 Mar 2011
Notice
1.
2.
3.
4.
5.
6.
7.
All information included in this document is current as of the date this document is issued. Such information, however, is
subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please
confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to
additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website.
Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights
of third parties by or arising from the use of Renesas Electronics products or technical information described in this document.
No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights
of Renesas Electronics or others.
You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part.
Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of
semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software,
and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by
you or third parties arising from the use of these circuits, software, or information.
When exporting the products or technology described in this document, you should comply with the applicable export control
laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas
Electronics products or the technology described in this document for any purpose relating to military applications or use by
the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and
technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited
under any applicable domestic or foreign laws or regulations.
Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics
does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages
incurred by you resulting from errors in or omissions from the information included herein.
Renesas Electronics products are classified according to the following three quality grades: “Standard”, “High Quality”, and
“Specific”. The recommended applications for each Renesas Electronics product depends on the product’s quality grade, as
indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular
application. You may not use any Renesas Electronics product for any application categorized as “Specific” without the prior
written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for
which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way
liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an
application categorized as “Specific” or for which the product is not intended where you have failed to obtain the prior written
consent of Renesas Electronics. The quality grade of each Renesas Electronics product is “Standard” unless otherwise
expressly specified in a Renesas Electronics data sheets or data books, etc.
“Standard”:
8.
9.
10.
11.
12.
Computers; office equipment; communications equipment; test and measurement equipment; audio and visual
equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots.
“High Quality”: Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anticrime systems; safety equipment; and medical equipment not specifically designed for life support.
“Specific”:
Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or
systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare
intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life.
You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics,
especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation
characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or
damages arising out of the use of Renesas Electronics products beyond such specified ranges.
Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have
specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further,
Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to
guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a
Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire
control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because
the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system
manufactured by you.
Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental
compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable
laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS
Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with
applicable laws and regulations.
This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas
Electronics.
Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this
document or Renesas Electronics products, or if you have any other inquiries.
(Note 1) “Renesas Electronics” as used in this document means Renesas Electronics Corporation and also includes its majorityowned subsidiaries.
(Note 2) “Renesas Electronics product(s)” means any product developed or manufactured by or for Renesas Electronics.
E8a Emulator User's Manual
Introduction
Introduction
This manual describes the followings
- E8a Emulator functions
- Preparation before use
- Debugger functions
- Tutorial
- Appendix: (Components of the E8a Emulator, Notes on High-performance Embedded Workshop, and Diagnostic
Test Procedure)
This manual does not intend to explain how to write C/C++ or assembly language programs, how to use any particular
operating system or how best to tailor code for the individual devices. These issues are left to the respective manuals.
Microsoft®, Windows® and Windows Vista® are registered trademarks of Microsoft Corporation.
IBM is a registered trademark of International Business Machines Corporation.
All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or
organizations.
Document Conventions
This manual uses the following typographic conventions:
Table 1
Typographic Conventions
Convention
Meaning
[Menu->Menu Option]
Bold text with ‘->’ is used to indicate menu options
(for example, [File->Save As...]).
FILENAME.C
Uppercase names are used to indicate filenames.
“enter this string”
Used to indicate text that must be entered (excluding the “” quotes).
Key + Key
Used to indicate required key presses. For example, CTRL+N means press the CTRL key
and then, whilst holding the CTRL key down, press the N key.
(The “how to” symbol)
When this symbol is used, it is always located in the left hand margin. It indicates that the text
to its immediate right is describing “how to” do something.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 3 of 124
E8a Emulator User's Manual
IMPORTANT
IMPORTANT
Before using this product, be sure to read the user’s manual (this user's manual) carefully.
Keep this user’s manual, and refer to this when you have questions about this product.
Emulator:
The emulator in this document refers to the following products that are manufactured by Renesas Electronics Corporation:
(1) Emulator
(2) User system interface cable
The emulator herein does not include the customer’s user system and host machine.
Purpose of use of this product:
This emulator is a device to support the development of a system that uses the Renesas MCUs. It provides support for system
development in both software and hardware.
Be sure to use this emulator correctly according to said purpose of use. Please avoid using this emulator for other than its intended
purpose of use.
For those who use this product:
This emulator can only be used by those who have carefully read the user’s manual and know how to use it.
Use of this emulator requires the basic knowledge of electric circuits, logical circuits, and MCUs.
When using this product:
(1) This product is a development-support unit for use in your program development and evaluation stages. When a program you have
finished developing is to be incorporated in a mass-produced product, the judgment as to whether it can be put to practical use is
entirely your own responsibility, and should be based on evaluation of the device on which it is installed and other experiments.
(2) In no event shall Renesas Electronics Corporation be liable for any consequence arising from the use of this product.
(3) Renesas Electronics Corporation strives to provide workarounds for and correct trouble with products malfunctions, with some
free and some incurring charges. However, this does not necessarily mean that Renesas Electronics Corporation guarantees the
provision of a workaround or correction under any circumstances.
(4) This product covered by this document has been developed on the assumption that it will be used for program development and
evaluation in laboratories. Therefore, it does not fall within the scope of applicability of the Electrical Appliance and Material
Safety Law and protection against electromagnetic interference when used in Japan.
(5) Renesas Electronics Corporation cannot predict all possible situations and possible cases of misuse that carry a potential for
danger. Therefore, the warnings in this user's manual and the warning labels attached to this product do not necessarily cover all
such possible situations and cases. The customer is responsible for correctly and safely using this product.
(6) The product covered by this document has not been through the process of checking conformance with UL or other safety
standards and IEC or other industry standards. This fact must be taken into account when the product is taken from Japan to some
other country.
(7) Renesas Electronics Corporation will not assume responsibility of direct or indirect damage caused by an accidental failure or
malfunction in this product.
When disposing of this product:
Penalties may be applicable for incorrect disposal of this waste, in accordance with your national legislation.
Usage restrictions:
This emulator has been developed as a means of supporting system development by users. Therefore, do not use it as a device used for
equipment-embedded applications. Also, do not use it for developing the systems or equipment used for the following purposes either:
(1) Transportation and vehicular
(2) Medical (equipment where human life is concerned)
(3) Aerospace
(4) Nuclear power control
(5) Undersea repeater
If you are considering the use of this emulator for one of the above purposes, please be sure to consult your local distributor.
About product changes:
We are constantly making efforts to improve the design and performance of this emulator. Therefore, the specification or design of this
emulator or its user’s manual may be changed without prior notice.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 4 of 124
E8a Emulator User's Manual
IMPORTANT
About the rights:
We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the use of any
information, products or circuits presented in this user’s manual.
(1) We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the use of any
information, products or circuits presented in this user’s manual.
(2) The information or data in this user’s manual does not implicitly or otherwise grant a license for patent rights or any other rights
belonging to us or third parties.
(3) This user’s manual and this emulator are copyrighted, with all rights reserved by us. This user’s manual may not be copied,
duplicated or reproduced, in whole or part, without prior written consent of us.
About diagrams:
The diagrams in this user’s manual may not all represent exactly the actual object.
Device names:
Sections 1 through 6 in this user’s manual use R8C Family as an example of the device names.
Guarantee:
If your product becomes faulty within one year after its purchase while being used under good conditions by observing "IMPORTANT"
and "Precautions for Safety" described in this user's manual, we will repair or replace your faulty product free of charge. Note, however,
that if your product's fault is raised by any one of the following causes, we will repair it or replace it with new one with extra-charge:
Misuse, abuse, or use under extraordinary conditions
Unauthorized repair, remodeling, maintenance, and so on
Inadequate user's system or misuse of it
Fires, earthquakes, and other unexpected disasters
In the above cases, contact your local distributor.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 5 of 124
E8a Emulator User's Manual
Precautions for Safety
Precautions for Safety
This chapter describes the precautions which should be taken in order to use this product safely and properly. Be sure to
read and understand this chapter before using this product.
Contact us if you have any questions about the precautions described here.
This chapter describes the precautions which should be taken in order to use this product safely and properly. Be sure to
read this chapter before using this product.
In addition to the two above, the following are also used as appropriate.
WARNING
WARNING indicates a potentially dangerous situation that will cause death or heavy
wound unless it is avoided.
CAUTION
CAUTION indicates a potentially dangerous situation that will cause a slight injury or a
medium-degree injury or property damage unless it is avoided.
means WARNING or CAUTION.
Example:
CAUTION AGAINST AN ELECTRIC SHOCK
means PROHIBITION.
Example:
DISASSEMBLY PROHIBITED
means A FORCIBLE ACTION.
Example:
UNPLUG THE POWER CABLE FROM THE RECEPTACLE.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 6 of 124
E8a Emulator User's Manual
Precautions for Safety
WARNING
Warnings for Power Supply:
If you smell a strange odor, hear an unusual sound, or see smoke coming from this product, then
disconnect power immediately by unplugging the AC power cable from the outlet.
Do not use this as it is because of the danger of electric shock and/or fire. In this case, contact your
local distributor.
Before setting up this product and connecting it to other devices, turn off power or remove a power
cable to prevent injury or product damage.
Always switch off the host computer and user system before connecting or disconnecting any
cables or parts. Failure to do so will result in a fire hazard and will damage the user system and the
emulator product. The user program will be lost.
Warnings to Be Taken for Handling:
Do not modify this product. Personal injury due to electric shock may occur if this product is
modified. Modifying the product will void your warranty.
For repairing this product, contact your local distributor.
Warning for Installation:
Do not set this product in water or areas of high humidity. Make sure that the product does not get
wet. Spilling water or some other liquid into the product may cause un-repairable damage.
Warning for Use temperature:
This equipment is to be used in an environment with a maximum ambient temperature of 35°C.
Care should be taken that this temperature is not exceeded.
Warning for Connecting Cables:
Connect the connectors in the user system and in the user interface cable by confirming the correct
direction. Failure to do so will result in a fire hazard and will damage the user system and the
emulator product.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 7 of 124
E8a Emulator User's Manual
Precautions for Safety
CAUTION
Cautions to Be Taken for Turning On the Power:
Turn ON/OFF the power of the emulator and the user system as simultaneously as possible. If you
cannot turn on the powers simultaneously, turn on the emulator first and then the user system.
When turning on the power again after shutting off the power, wait about 10 seconds.
Cautions to Be Taken for Handling This Product:
Use caution when handling the product. Be careful not to apply a mechanical shock.
Do not touch the connector pins of the emulator and the target MCU connector pins directly. Static
electricity may damage the internal circuits.
When attaching and removing the cable, hold the plug of the cable and do not touch the cable. Do
not pull the emulator by the communications interface cable or the flexible cable. And, excessive
flexing or force may break conductors.
Do not flex the flexible cable excessively. The cable may cause a break.
Place the host computer and user system so that no cable is bent or twisted. A bent or twisted
cable will impose stress on the user interface leading to connection or contact failure. Make sure
that the host computer and the user system are placed in a secure position so that they do not
move during use nor impose stress on the user interface.
Note on Transporting the Product:
When sending your product for repair, use the packing box and cushioning material supplied with
the product when it was delivered to you and specify caution in handling (handling as precision
equipment). If packing of your product is not complete, it may be damaged during transportation.
When you pack your product in a bag, make sure to use the conductive plastic bag supplied with
the product (usually a blue bag). If you use a different bag, it may lead to further trouble with your
product due to static electricity.
Caution to Be Taken for System Malfunctions:
If the emulator malfunctions because of interference like external noise, do the following to remedy
the trouble.
(1) Exit the emulator debugger, and shut OFF the emulator and the user system.
(2) After a lapse of 10 seconds, turn ON the power of the emulator and the user system again,
then launch the emulator debugger.
Caution to Be Taken for Disposal:
Penalties may be applicable for incorrect disposal of this waste, in accordance with your national
legislation.
European Union regulatory notices:
Renesas development tools and products are directly covered by the European Union's Waste
Electrical and Electronic Equipment, (WEEE), Directive 2002/96/EC. As a result, this equipment,
including all accessories, must not be disposed of as household waste but through your locally
recognized recycling or disposal schemes. As part of our commitment to environmental
responsibility Renesas also offers to take back the equipment and has implemented a Tools
Product Recycling Program for customers in Europe. This allows you to return equipment to
Renesas for disposal through our approved Producer Compliance Scheme. To register for the
program, click here “http://www.renesas.com/weee".
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 8 of 124
E8a Emulator User's Manual
Contents
Contents
Introduction......................................................................................................................................... 3
IMPORTANT ..................................................................................................................................... 4
Precautions for Safety ......................................................................................................................... 6
Contents .............................................................................................................................................. 9
1. Overview...................................................................................................................................... 12
1.1
1.2
1.3
Warnings ............................................................................................................................................................... 14
Environmental Conditions .................................................................................................................................... 15
Components .......................................................................................................................................................... 16
2. E8a Emulator Functions............................................................................................................... 17
2.1
2.2
2.3
2.4
2.5
2.6
2.7
Overview............................................................................................................................................................... 17
Trace Functions..................................................................................................................................................... 18
Break Functions .................................................................................................................................................... 18
Memory Access Functions.................................................................................................................................... 18
Stack Trace Function ............................................................................................................................................ 20
Start/Stop Function ............................................................................................................................................... 20
Online Help........................................................................................................................................................... 20
3. Preparation before Use................................................................................................................. 22
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
Emulator Preparation ............................................................................................................................................ 22
Emulator Hardware Configuration........................................................................................................................ 23
Emulator Software Configuration ......................................................................................................................... 29
3.3.1 CD............................................................................................................................................................ 29
Installing Emulator’s Debugger ............................................................................................................................ 29
Connecting the Emulator to the Host Computer ................................................................................................... 30
Connecting the Emulator to the User System ....................................................................................................... 31
Connecting System Ground .................................................................................................................................. 32
System Check........................................................................................................................................................ 33
4. Preparations for Debugging ......................................................................................................... 41
4.1
4.2
Method for Activating High-performance Embedded Workshop ......................................................................... 41
4.1.1 Creating the New Workspace (Toolchain Not Used)............................................................................... 42
4.1.2 Creating the New Workspace (Toolchain Used)...................................................................................... 46
4.1.3 Selecting an Existing Workspace............................................................................................................. 52
Setting at E8a Emulator Activation....................................................................................................................... 53
4.2.1 Setting at Emulator Activation................................................................................................................. 53
4.2.2 Downloading a Program .......................................................................................................................... 55
4.2.3 Setting the [Program Flash] Mode ........................................................................................................... 56
5. Debugging.................................................................................................................................... 62
5.1
5.2
Setting the Environment for Emulation ................................................................................................................ 62
5.1.1 Opening the [Configuration] Dialog Box................................................................................................. 62
5.1.2 [General] Page ......................................................................................................................................... 62
Downloading a Program ....................................................................................................................................... 64
5.2.1 Downloading a Program .......................................................................................................................... 64
5.2.2 Viewing the Source Code ........................................................................................................................ 64
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 9 of 124
E8a Emulator User's Manual
5.3
5.4
5.5
5.6
Contents
Stopping Your Program ........................................................................................................................................ 67
5.3.1 Address Match Breakpoints ..................................................................................................................... 67
Using the Event Points .......................................................................................................................................... 68
5.4.1 PC Breakpoints ........................................................................................................................................ 68
5.4.2 Break Conditions ..................................................................................................................................... 68
5.4.3 Opening the [Event] Window .................................................................................................................. 68
5.4.4 Setting PC Breakpoints ............................................................................................................................ 69
5.4.5 Add .......................................................................................................................................................... 69
5.4.6 Edit........................................................................................................................................................... 69
5.4.7 Enable ...................................................................................................................................................... 69
5.4.8 Disable ..................................................................................................................................................... 69
5.4.9 Delete ....................................................................................................................................................... 69
5.4.10 Delete All................................................................................................................................................. 70
5.4.11 Go to Source ............................................................................................................................................ 70
5.4.12 [Set Break] Dialog Box............................................................................................................................ 71
5.4.13 Setting Break Conditions ......................................................................................................................... 72
5.4.14 Edit........................................................................................................................................................... 73
5.4.15 Enable ...................................................................................................................................................... 73
5.4.16 Disable ..................................................................................................................................................... 73
5.4.17 Delete ....................................................................................................................................................... 73
5.4.18 Delete All................................................................................................................................................. 73
5.4.19 Go to Source ............................................................................................................................................ 73
5.4.20 Sequential Conditions .............................................................................................................................. 73
5.4.21 Editing Break Conditions......................................................................................................................... 73
5.4.22 Modifying Break Conditions ................................................................................................................... 73
5.4.23 Enabling Break Conditions ...................................................................................................................... 73
5.4.24 Disabling Break Conditions ..................................................................................................................... 73
5.4.25 Deleting Break Conditions....................................................................................................................... 74
5.4.26 Deleting All Break Conditions................................................................................................................. 74
5.4.27 Viewing the Source Line for Break Conditions ....................................................................................... 74
5.4.28 [Break condition x] Dialog Box............................................................................................................... 74
Viewing the Trace Information ............................................................................................................................. 76
5.5.1 Opening the [Trace] Window .................................................................................................................. 76
5.5.2 Acquiring Trace Information ................................................................................................................... 76
5.5.3 Clearing the Trace Information................................................................................................................ 76
5.5.4 Saving the Trace Information in a File .................................................................................................... 76
5.5.5 Viewing the [Source] Window................................................................................................................. 77
5.5.6 Trimming the Source ............................................................................................................................... 77
Using the Start/Stop Function ............................................................................................................................... 78
5.6.1 Opening the [Start/Stop Function Setting] Dialog Box............................................................................ 78
5.6.2 Specifying the Routine to be Executed .................................................................................................... 78
5.6.3 Restrictions on the Start/Stop Function.................................................................................................... 79
6. Tutorial......................................................................................................................................... 80
6.1
6.2
6.3
6.4
6.5
6.6
6.7
Introduction........................................................................................................................................................... 80
Running the High-performance Embedded Workshop ......................................................................................... 80
Setting up the E8a Emulator ................................................................................................................................. 80
Setting the [Configuration] Dialog Box ................................................................................................................ 81
Checking the Operation of RAM .......................................................................................................................... 82
Downloading the Tutorial Program....................................................................................................................... 83
6.6.1 Downloading the Tutorial Program ......................................................................................................... 83
6.6.2 Displaying the Source Program ............................................................................................................... 84
Setting a PC Breakpoint ........................................................................................................................................ 85
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 10 of 124
E8a Emulator User's Manual
6.8
6.9
6.10
6.11
6.12
6.13
6.14
6.15
6.16
6.17
6.18
6.19
6.20
Contents
Setting Registers ................................................................................................................................................... 86
Executing the Program.......................................................................................................................................... 87
Reviewing Breakpoints ......................................................................................................................................... 89
Viewing Memory .................................................................................................................................................. 90
Watching Variables............................................................................................................................................... 91
Stepping Through a Program ................................................................................................................................ 93
6.13.1 Executing [Step In] Command................................................................................................................. 93
6.13.2 Executing [Step Out] Command .............................................................................................................. 94
6.13.3 Executing [Step Over] Command ............................................................................................................ 95
Forced Breaking of Program Executions .............................................................................................................. 96
Displaying Local Variables................................................................................................................................... 96
Break Function...................................................................................................................................................... 97
6.16.1 PC Break Function................................................................................................................................... 97
Hardware Break Function ................................................................................................................................... 100
Trace Functions................................................................................................................................................... 103
6.18.1 Displaying the Trace Window ............................................................................................................... 103
Stack Trace Function .......................................................................................................................................... 104
What Next? ......................................................................................................................................................... 105
7. Appendix A: Components of the E8a Emulator ........................................................................ 106
8. Appendix B: Window Functions ............................................................................................... 107
9. Appendix C: Command-Line Functions.................................................................................... 110
10. Appendix D: Notes on High-performance Embedded Workshop ........................................... 111
11. Appendix E: E8aSCP (E8a Self-Check Program) ................................................................... 115
11.1 Flowchart of the Procedure to Execute the Self-Check Program........................................................................ 115
11.2 System Setup to Execute the E8aSCP................................................................................................................. 116
11.3 Executing the Self-Check Program ..................................................................................................................... 118
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 11 of 124
E8a Emulator User's Manual
1. Overview
1. Overview
The High-performance Embedded Workshop is a Graphical User Interface intended to ease the development and
debugging of applications written in C/C++ programming language and assembly language for Renesas microcomputers.
Its aim is to provide a powerful yet intuitive way of accessing, observing and modifying the debugging platform in which
the application is running.
The E8a emulator (hereafter referred to as the emulator) is a software and hardware development support tool for
application systems using the Renesas microcomputer. For applicable MCUs, refer to the web site.
The main unit of the emulator is connected through the dedicated debugging interface to the user system. The user system
can be debugged under the conditions similar to the actual application conditions. The emulator enables debugging
anywhere indoors or out. The host computer for controlling the emulator must be an IBM PC compatible machine with
USB.
This manual describes the contents that comply with versions of the High-performance Embedded Workshop 4.0 or later.
Figure 1.1 System Configuration with the Emulator
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 12 of 124
E8a Emulator User's Manual
1. Overview
The emulator has three activation modes:
(1) Erase Flash and Connect
This mode is used to erase data of the MCU flash memory and activate the debugger. A program for the emulator is
also written to at the same time.
(2) Keep Flash and Connect
This mode is used to activate the debugger while retaining data of the MCU flash memory. However, areas for the
emulator program and vector areas used by the emulator will be changed.
(3) Program Flash
This mode is used to activate the emulator as a simple programmer. Only the user program is written to when the flash
memory is downloaded (the emulator program is not written to). Accordingly, in this mode, program debugging is not
available.
The emulator provides the following features:
(1) Support for programming of Renesas’ 8- to 32-bit microcomputers
The emulator supports Renesas’ 8- to 32-bit microcomputers as the programming tool for the flash memory.
(2) Support for low voltage
The lower limit of the operating voltage is reduced to 1.8 V. The emulator also supports the microcomputer even if its
programming voltage for the flash memory is low (reprogramming of the flash memory depends on the voltage to
reprogram the flash memory in the microcomputer).
(3) Excellent cost-performance card emulator
Compactness and USB connection are obtained.
(4) Realtime emulation
Realtime emulation of the user system is enabled at the maximum operating frequency of the MCU.
(5) Excellent operability
Using the High-performance Embedded Workshop on the Windows® XP (32-bit edition), Windows Vista® (32-bit
edition) or Windows® 7 (32-bit or 64-bit edition) operating system enables user program debugging using a pointing
device such as a mouse.
(6) Various debugging functions
Various break and trace functions enable efficient debugging. Breakpoints and break conditions can be set by the
specific window, trace information can be displayed on a window, and command-line functions can be used.
(7) Debugging of the user system in the final development stage
The user system can be debugged under conditions similar to the actual application conditions.
(8) Compact debugging environment
A laptop computer can be used as a host computer, creating a debugging environment in any place.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 13 of 124
E8a Emulator User's Manual
1.1
1. Overview
Warnings
CAUTION
Caution to be taken when using this product:
Read the following warnings before using the emulator product. Incorrect operation will damage the
user system and the emulator product. The user program will be lost.
(1) Check all components against the component list provided at the rear side of the component box after unpacking the
emulator.
(2) Never place heavy objects on the casing.
(3) Protect the emulator from excessive impacts and stresses. For details, refer to section 1.2, Environmental Conditions.
(4) When moving the host computer or user system, take care not to vibrate or damage it.
(5) After connecting the cable, check that it is connected correctly. For details, refer to section 3, Preparation before Use.
(6) Supply power to the connected equipment after connecting all cables. Cables must not be connected or removed while
the power is on.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 14 of 124
E8a Emulator User's Manual
1.2
1. Overview
Environmental Conditions
CAUTION
Caution to be taken when using this product:
Observe the conditions listed in Tables 1.1 to 1.3 when using the emulator. Failure to do so will
cause illegal operation in the user system, the emulator product, and the user program.
Table 1.1 Environmental Conditions
Item
Specifications
Temperature
Operating: +10°C to +35°C
Storage: –10°C to +50°C
Humidity
Operating: 35% RH to 80% RH, no condensation
Storage: 35% RH to 80% RH, no condensation
Vibration
Operating:
2.45 m/s2 max.
Storage:
4.9 m/s2 max.
2
Transportation: 14.7 m/s max.
Ambient gases
No corrosive gases may be present
Table 1.2 Operating Environments (Windows® XP)
Item
Description
Host computer
IBM PC or compatible
OS
Windows® XP 32-bit edition (64-bit edition not supported)
CPU
Pentium 4 running at 1.6 GHz or more recommended.
Host machine interface
USB (USB1.1, full-speed), also USB 2.0 interface supported
Operation with all combinations of host machine, USB device and USB hub is not guaranteed
for the USB interface.
Memory
1 Gbyte plus 10 times the file size of the load module or larger recommended.
Pointing device such
as mouse
Mouse or any other pointing device usable with the above OS that can be connected to the
host machine.
CD drive
Needed to install the emulator debugger or refer to the user’s manual.
Hard-disk
Emulator debugger installation needs 600 MB or more free space. (In view of swap area, keep
another free space which is more than twice the memory capacity. (More than four times the
memory capacity recommended.))
Display resolution
1024 × 768 or greater recommended.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 15 of 124
E8a Emulator User's Manual
1. Overview
Table 1.3 Operating Environments (Windows Vista® and Windows® 7)
Item
Description
Host computer
IBM PC or compatible
OS
Windows® 7 32/64-bit editions
Windows Vista® 32-bit edition (64-bit edition not supported)
CPU
Pentium 4 running at 3 GHz or Core 2 Duo running at 1 GHz or more recommended.
Host machine interface
USB (USB1.1, full-speed), also USB 2.0 interface supported
Operation with all combinations of host machine, USB device and USB hub is not guaranteed
for the USB interface.
Memory
2 Gbytes plus 10 times the file size of the load module or larger recommended (32-bit edition).
3 Gbytes plus 10 times the file size of the load module or larger recommended (64-bit edition).
Pointing device such
as mouse
Mouse or any other pointing device usable with the above OS that can be connected to the
host machine.
CD drive
Needed to install the emulator debugger or refer to the user’s manual.
Hard-disk
Emulator debugger installation needs 600 MB or more free space. (In view of swap area, keep
another free space which is more than twice the memory capacity. (More than four times the
memory capacity recommended.))
Display resolution
1024 × 768 or greater recommended.
1.3
Components
Check that all of the components are present when unpacking the product. For details on the E8a emulator components,
refer to the component list provided at the rear side of the component box. If all of the components are not present, contact
your nearest Renesas sales office.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 16 of 124
E8a Emulator User's Manual
2. E8a Emulator Functions
2. E8a Emulator Functions
This section describes the emulator functions. They differ according to the device supported by the emulator.
2.1
Overview
Table 2.1 gives a functional overview of the emulator.
Table 2.1 Emulator Functions
Item
User program execution
function
Function
•
•
•
Reset function
•
Trace function
•
Break functions
•
Memory access function
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Executes a program with the operating frequency within a range guaranteed by
devices.
Reset emulation
Step functions:
Single step (one step: one instruction)
Source-level step (one step: one source)
Step over (a break did not occur in a subroutine)
Step out (when the PC points to a location within a subroutine, execution continues
until it returns to the calling function)
Issues a reset from the High-performance Embedded Workshop to the device during
break.
Branch trace function incorporated in the device (four branches)
The support of this function depends on a device.
Hardware break condition (one condition)
The support of this function depends on a device.
PC break condition (255 points)
Forced break function
Address match break function
Downloading to RAM
Downloading to flash memory
Single-line assembly
Reverse assembly (disassembly)
Reading of memory
Writing to memory
Automatic updating of a display of selected variables during user program execution
FILL
Search
Move
Copy
General/control register
access function
Reads or writes the general/control register.
Internal I/O register access
function
Reads or writes the internal I/O register.
Source-level debugging
function
Various source-level debugging functions.
Command line function
Supports command input.
Batch processing is enabled when a file is created by arranging commands in input order.
Executes the specified routine of the user program immediately before starting and
immediately after halting program execution.
Describes the usage of each function or command syntax input from the command line
window.
Start/Stop function
Help function
The specific functions of the emulator are described in the next section.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 17 of 124
E8a Emulator User's Manual
2.2
2. E8a Emulator Functions
Trace Functions
The branch source addresses, mnemonics, operands, and source lines are displayed. Since this function uses the trace
buffer built into the device, a realtime trace can be acquired.
Note: The MCUs which have no trace function cannot use this function.
2.3
Break Functions
The E8a emulator has the following four break functions.
(1) Hardware break function
Uses a break controller incorporated in the device.
The access address, instruction fetch address, data, or bus cycle condition can be set.
This function can also be set from the [Event] column in the [Source] window. For the setting, refer to section 5.3.1
Address Interrupt Breakpoints.
Note: The MCUs which have no hardware break function cannot use this function.
(2) PC break function (BREAKPOINT)
Breaks when the dedicated instruction at the specified address that has been replaced is executed.
This function can be set on the [Breakpoint] page in the [Eventpoint] dialog box. It can also be set when the [S/W
Breakpoints] column for the line to be set is double-clicked in the [Source] or [Disassembly] window.
(3) Forced break function
Forcibly breaks the user program.
(4) Address match break function
Stops the target program immediately before a specified address instruction is executed. This function is featured by
the address match interrupt of the MCU. This function can be set from the [Event] column in the Source window. For
the setting, refer to section 5.2.2, Viewing the Source Code.
Note: The address match break points vary depending on the device. And, user program operation when device's address
match interrupts are used is not guaranteed.
2.4
Memory Access Functions
The emulator has the following memory access functions.
(1) Memory read/write function
[Memory] window: The memory contents are displayed in the window. Only the amount specified when the
[Memory] window is opened can be read. If the memory is written in the [Memory] window, a
read in the range displayed in the [Memory] window will occur for updating the window. When
the [Memory] window is not to be updated, change the setting in [Lock Refresh] from the popup
menu.
me command:
A command line function that reads or writes the specified amount of memory at the specified
address.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 18 of 124
E8a Emulator User's Manual
2. E8a Emulator Functions
(2) User program downloading function
A load module registered in the workspace can be downloaded. Such module can be selected from [Download
Modules] in the [Debug] menu. Downloading is also possible by a popup menu that is opened by right-clicking on the
mouse at the load module in the workspace. The user program is downloaded to the RAM or flash memory.
This function can download debugging information required for source-level debugging with the Elf/Dwarf2 or
IEEE695 file having the debugging information.
(3) Memory data uploading function
The specified amount of memory from the specified address can be saved in an S-format file.
(4) Memory data downloading function
The memory contents saved in the S-type-formatted file can be downloaded. Select [Load] from the popup menu in the
[Memory] window.
(5) Displaying the variable contents
The variable contents specified in the user program are displayed. For the usage of the function for displaying the
variable contents, refer to the High-performance Embedded Workshop User’s Manual.
(6) Other memory operation functions
Other functions are as follows:
•
•
•
•
•
•
•
Memory fill
Memory copy
Memory save
Memory verify
Memory search
Internal I/O display
Displaying label and variable names and their contents
Notes: 1. Memory access during user program execution:
When memory is accessed from the memory window, etc. during execution of the user program, execution
stops for the memory access and is then resumed. Therefore, realtime emulation cannot be performed.
2. Memory access during user program break:
The program can also be downloaded and the BREAKPOINT can be set for the flash memory area by the
emulator.
3. For the MCUs listed below, memory copy and memory search functions are only available from the addresses
described in Table 2.2.
<Applicable MCUs>
740 Family
M32C Series
Table 2.2 Restrictions on the Memory Operation Functions
Access Condition
1-byte access
Specifiable Start Address
No restrictions
2-byte access
xxxx0h, xxxx2h, xxxx4h, xxxx6h, xxxx8h, xxxxAh, xxxxCh, xxxxEh
4-byte access
xxxx0h, xxxx4h, xxxx8h, xxxxCh
8-byte access
xxxx0h, xxxx8h
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 19 of 124
E8a Emulator User's Manual
2.5
2. E8a Emulator Functions
Stack Trace Function
The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the
function to which the program counter is currently pointing. This function can be used only when the load modules that
have the following formats are loaded:
- M32C family C complier (M3T-NC308WA): IEEE695
- M16C family C compiler (M3T-NC30WA): IEEE695
- R8C family C compiler (M3T-NC8C): IEEE695
- H8, H8S, H8SX family C/C++ compiler (such as [R0C40008XSW06R]): Elf/Dwarf2
For the usage of this function, refer to section 6.19, Stack Trace Function.
2.6
Start/Stop Function
The emulator executes the specified routine of the user program immediately before starting and immediately after halting
program execution. This function is used to control the user system in synchronization with execution and halting of the
user program.
For the usage of this function, refer to section 5.6, Using the Start/Stop Function.
Note: The start/stop function is not supported in the H8/Tiny or H8/Super Low Power series, the 740 family, or the
R8C/10, R8C/11, R8C/12, or R8C/13 group.
2.7
Online Help
An online help explains the usage of each function or the command syntax that can be entered from the command line
window.
Select [Emulator Help] from the [Help] menu to view the emulator help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 20 of 124
E8a Emulator User's Manual
2. E8a Emulator Functions
Regulatory Compliance Notices
European Union regulatory notices
This product complies with the following EU Directives. (These directives are only valid in the European Union.)
CE Certifications:
・Electromagnetic Compatibility (EMC) Directive 2004/108/EC
EN 55022 Class A
WARNING: This is a Class A product. In a domestic environment this product may cause radio interference in
which case the user may be required to take adequate measures.
EN 55024
・Information for traceability
・Authorised representative
Name:
Renesas Electronics Corporation
Address:
1753, Shimonumabe, Nakahara-ku, Kawasaki, Kanagawa, 211-8668, Japan
・Manufacturer
Name:
Renesas Solutions Corp.
Address:
Nippon Bldg., 2-6-2, Ote-machi, Chiyoda-ku, Tokyo 100-0004, Japan
・Person responsible for placing on the market
Name:
Renesas Electronics Europe Limited
Address:
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K.
・Trademark and Type name
Trademark: Renesas
Product name: E8a Emulator
Type name: R0E00008AKCE00
Environmental Compliance and Certifications:
・Restriction of the Use of Certain Hazardous Substances in Electrical and Electronic Equipment (RoHS)
Directive 2002/95/EC
・Waste Electrical and Electronic Equipment (WEEE) Directive 2002/96/EC
WEEE Marking Notice (European Union Only)
Renesas development tools and products are directly covered by the European Union's Waste
Electrical and Electronic Equipment, (WEEE), Directive 2002/96/EC. As a result, this equipment,
including all accessories, must not be disposed of as household waste but through your locally
recognized recycling or disposal schemes. As part of our commitment to environmental responsibility
Renesas also offers to take back the equipment and has implemented a Tools Product Recycling
Program for customers in Europe. This allows you to return equipment to Renesas for disposal
through our approved Producer Compliance Scheme. To register for the program, click here
“http://www.renesas.com/weee".
United States Regulatory notices on Electromagnetic compatibility
FCC Certifications (United States Only):
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part
15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference when
the equipment is operated in a commercial environment. This equipment generates, uses, and can radiate radio
frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful
interference to radio communications. Operation of this equipment in a residential area is likely to cause harmful
interference in which case the user will be required to correct the interference at his own expense.
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this
device may not cause harmful interference, and (2) this device must accept any interference received, including
interference that may cause undesired operation.
CAUTION: Changes or modifications not expressly approved by the party responsible for
compliance could void the user's authority to operate the equipment.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 21 of 124
E8a Emulator User's Manual
3. Preparation before Use
3. Preparation before Use
3.1
Emulator Preparation
Unpack the emulator and prepare it for use as follows:
CAUTION
Caution to be taken when using this product:
Read the reference sections shaded in Figure 3.1 before using the emulator product. Incorrect
operation will damage the user system and the emulator product. The user program will be lost.
Reference
Check the components against the component list
provided at the rear side of the component box
Set up the emulator
- Install the High-performance Embedded Workshop
- Connect the host computer to the emulator
- Connect the emulator to the user system
Section 3
Start the High-performance Embedded Workshop
Section 4
Turn on the user system
When the emulator
is used first.
When the emulator
is used for second
time or later.
Figure 3.1 Emulator Preparation Flow Chart
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 22 of 124
E8a Emulator User's Manual
3.2
3. Preparation before Use
Emulator Hardware Configuration
As shown in Figure 3.2, the emulator consists of an emulator, a USB cable, and a user system interface cable. The
emulator is connected to the host computer via USB 1.1, and also to the USB port conforming to USB 2.0.
Figure 3.2 Emulator Hardware Configuration
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 23 of 124
E8a Emulator User's Manual
3. Preparation before Use
The names of each section of the emulator are explained next.
Emulator Upper-side Panel:
Figure 3.3 Emulator Upper-side Panel
(a) ACT LED:
(b) VCC LED:
An LED to show the operating state of the emulator software.
When this LED is lit (yellow-green), the E8a control software is in operation.
An LED to show the power state of the user system.
When power is supplied from the emulator to the user system, this LED is lit as orange.
When power is supplied from the user system to the emulator, this LED is lit as yellow-green.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 24 of 124
E8a Emulator User's Manual
3. Preparation before Use
Emulator Host-Computer-Side Panel:
Figure 3.4 Emulator Host-Computer-Side Panel
(a)
Host-side connector:
A USB cable connector to connect the emulator to the host computer. Be sure to connect the
provided USB cable.
(b)
Portable strap hole:
A hole for the strap (No strap is provided for this product).
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 25 of 124
E8a Emulator User's Manual
3. Preparation before Use
Emulator User-System-Side Panel:
Figure 3.5 Emulator User-System-Side Panel
(a)
User-system-side connector:
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
A user system interface cable is connected.
Page 26 of 124
E8a Emulator User's Manual
3. Preparation before Use
Emulator Bottom Panel:
Figure 3.6 Emulator Bottom Panel
(a) Seal for product management: The serial number and a description of the emulator are written on the seal. The
actual written content will depend on when you purchased the product.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 27 of 124
E8a Emulator User's Manual
3. Preparation before Use
Emulator Left-Side Panel:
Figure 3.7 Emulator Left-Side Panel
(a) Self-check connector:
A connector for the user system interface cable when the E8aSCP (self-check
program) is run.
(b) Cover for self-check connector:
A cover for the self-check connector. Close this cover when the E8aSCP is not
run.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 28 of 124
E8a Emulator User's Manual
3.3
3. Preparation before Use
Emulator Software Configuration
The following item is included with the emulator debugger when it is purchased:
• E8a Emulator Software: R0E00008AKCE00SR (CD)
3.3.1
CD
Install the software as instructed by the displayed messages by inserting the included CD into the CD-ROM drive. The
folders contain the files and programs listed below.
Table 3.1 Contents of the CD Directories
Directory Name
Contents
®
Description
Dlls
Microsoft runtime library
A runtime library for the High-performance Embedded Workshop.
The version is checked at installation and this library is copied to the
hard disk as part of the installation process.
Drivers
E8a emulator driver
The E8a emulator drivers.
Help
Online help for the E8a
emulator
An online help file
Manuals
E8a emulator manual
E8a emulator user’s manual. This is provided as a PDF file.
3.4
Installing Emulator’s Debugger
When the CD is inserted in the host computer’s CD drive, execute HewInstMan.exe from the root directory of the CD.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 29 of 124
E8a Emulator User's Manual
3.5
3. Preparation before Use
Connecting the Emulator to the Host Computer
This section describes how to connect the emulator to the host computer. For the position of each connector of the
emulator, refer to section 3.2, Emulator Hardware Configuration.
Notes: 1. When [Add New Hardware Wizard] is displayed, select the [Search for the best driver for your device.
(Recommended)] radio button and then the [Specify a location] check box to select the path to be searched for
drivers. The location must be specified as <Drive>:\DRIVERS. (<Drive> is the CD drive name.)
2. Be sure to install the emulator’s debugger before putting the emulator in place.
WARNING
Warnings for Power Activation:
Always switch OFF the emulator product and the user system before connecting or disconnecting
any cables except for the USB interface cable. Failure to do so will result in a fire hazard and will
damage the user system and the emulator product or will result in personal injury. The user program
will be lost.
The emulator is connected to the host computer via the USB 1.1, and also to the USB port conforming to USB 2.0. Figure
3.8 shows the system configuration.
Figure 3.8 System Configuration when Connecting the Emulator to the Host Computer
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 30 of 124
E8a Emulator User's Manual
3.6
3. Preparation before Use
Connecting the Emulator to the User System
Use the procedure below to connect the emulator to the user system with the user system interface cable, or to disconnect
them when moving the emulator or the user system.
1. Check that the host computer is turned off or the emulator is not connected to the host computer with the USB cable.
2. Connect the user system interface cable to the user-side connector of the emulator.
3. Connect the USB cable to the host-computer-side connector of the emulator.
(1) The connector must be installed on the user system. Table 3.2 shows the recommended connector for the emulator.
Table 3.2 Recommended Connector
Type Number
Manufacturer
Specifications
2514-6002
3M Limited
14-pin straight type
Note: When the connector is installed on the user system, do not install any components within 3 mm of the connector.
(2) The pin assignments of the connector are shown in the section of ‘Pin Assignments of the E8/E8a Connector’ in the
additional documents for the E8a emulator user’s manual.
User system interface cable
Connector
User system
Pin 2
Pin 1
Figure 3.9 Connecting the User System Interface Cable to the User System
Notes:
1.
2.
3.
4.
To connect the signals output from the E8a connector, refer to the MCU pin alignment.
To remove the user system interface cable from the user system, pull the connector upward.
The range of frequencies that the emulator operates at is different according to the MCUs used.
Connect the signals from the E8a connector as shown in section 3 or section 4 in the additional documents
for the E8a emulator user’s manual.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 31 of 124
E8a Emulator User's Manual
3.7
3. Preparation before Use
Connecting System Ground
WARNING
Warnings for Connecting Ground:
Separate the frame ground from the signal ground at the user system. Failure to do so will result in a
fire hazard and will damage the user system and the emulator product or will result in personal injury.
The emulator's signal ground is connected to the user system's signal ground. In the emulator, the signal ground and frame
ground are connected. In the user system, connect the frame ground only; do not connect the signal ground to the frame
ground (Figure 3.10).
Signal ground
E8a emulator
Signal
Signal
Host
computer
User system
Logic
Logic
USB
Signal ground
Signal ground
Power
supply
Frame ground
Figure 3.10 Connecting System Ground
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 32 of 124
E8a Emulator User's Manual
3.8
3. Preparation before Use
System Check
When the software is executed, use the procedure below to check that the emulator is connected correctly. Here, use the
workspace for a tutorial provided on the product.
Refer to section 4, Preparations for Debugging, for the other activating method to create a new project or use a workspace
for the High-performance Embedded Workshop of the old version.
1.
2.
3.
4.
Connect the emulator to the host computer.
Connect the user system interface cable to the connector of the emulator.
Connect the user system interface cable to the connector in the user system.
Select [Renesas] -> [High-performance Embedded Workshop] -> [High-performance Embedded Workshop] from
[Programs] in the [Start] menu of Windows®
5. The [Welcome!] dialog box is displayed.
Figure 3.11 [Welcome!] dialog box
[Create a new project workspace] radio button:
Creates a new workspace.
[Open a recent project workspace] radio button:
Uses the current workspace and displays the history of the opened
workspace.
[Browse to another project workspace] radio button:
Uses the current workspace; this radio button is used when the
history of the opened workspace does not remain
To use a workspace for the tutorial, select the [Browse to another project workspace] radio button and click the [OK]
button.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 33 of 124
E8a Emulator User's Manual
3. Preparation before Use
6. When the [Open workspace] dialog box is opened, specify the following directory:
<OS installation directory>
\WorkSpace\Tutorial\E8a\xxxx\Tutorial
After the directory has been specified, select the following file and click the [Open] button.
Figure 3.12 [Open Workspace] Dialog Box
Note:
The directory for a tutorial differs depending on the device.
z M32C
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\M32C\Tutorial
z M16C
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\M16C\Tutorial
z R8C
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\R8C\Tutorial
z 740
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\740\Tutorial
z H8/Tiny normal mode
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\H8\Tutorial
z H8/Tiny advanced mode
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\H8\TutorialADV
z H8/Super Low Power
Drive where the OS has been installed: \WorkSpace\Tutorial\E8a\H8\TutorialSLP
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 34 of 124
E8a Emulator User's Manual
3. Preparation before Use
7. The [Emulator Setting] dialog box is displayed.
Figure 3.13 [Emulator Setting] Dialog Box
Select the device name in use from the [MCU Group] drop-down list box.
Note: The [MCU Group] drop-down list box is not displayed in the H8/Tiny or H8/Super Low Power series.
Select the device name in use from the [Device] drop-down list box.
The following items are selected in the [Mode] group box.
⎯ Erase Flash and Connect
This mode is used to erase data of the MCU flash memory and activate the debugger. A program for the emulator is
also written to at the same time.
Note: The emulator occupies the user’s flash memory area according to the target MCUs. For details, refer to the
additional document, Notes on Connecting the xxxxx.
⎯ Keep Flash and Connect
This mode is used to activate the debugger while retaining data of the MCU flash memory. However, areas for the
emulator program and vector areas used by the emulator will be changed.
⎯ Program Flash
This mode is used when the emulator is used as a flash memory programmer. It cannot be used for debugging
programs.
Register the load module in the workspace to download it.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 35 of 124
E8a Emulator User's Manual
3. Preparation before Use
Note: It is necessary to input the ID code of the flash memory by the target device. For details, refer to the additional
document, Notes on Connecting the xxxxx.
⎯ Debugging of CPU rewrite mode
This mode is used to debug the program that rewrites the CPU. In this mode, the following debug operations,
which require reprogramming of the flash memory, are not available:
- Setting the PC breakpoint
- Changing the memory contents in the flash memory area
The debugger is activated by erasing data of the MCU flash memory. A program for the emulator program is also
written to at the same time.
Note: This mode is not supported in the H8/Tiny or H8/Super Low Power series.
When the [Execute the user program after ending the debugger.] check box is selected, the user program is executed at the
same time as the debugger operation is ended with the emulator connected to the user system. This check box is only
available when the [Program Flash] mode has been selected.
When the [Power Target from Emulator. (MAX 300mA)] check box is selected, power will be supplied to the user system
up to 300 mA. Then select 3.3 V or 5.0 V according to the power voltage of the user system.
CAUTION
Cautions to Be Taken for Power Supply:
Before carrying out the power supply, check the power specification of the user system and there is
no short circuit in the user system. Incorrect operation will damage the user system and the emulator
product. The user program will be lost.
8. The [Connecting] dialog box is displayed and the emulator connection is started.
Figure 3.14 [Connecting] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 36 of 124
E8a Emulator User's Manual
3. Preparation before Use
9. When the version of the E8a firmware downloaded into the emulator is old, the message box shown in Figure 3.15 will
be displayed.
Figure 3.15 Dialog Box for confirming the E8a firmware download
Note: When [OK] button is clicked, it starts downloading the E8a firmware. Do not connect/disconnect the USB cable
until the download status dialog box closes.
10. When [Power Target from Emulator. (MAX 300mA)] is not checked, the dialog box shown in Figure 3.16 will be
displayed.
Figure 3.16 Dialog Box of the Power-on Request Message
11. If no power is supplied to the user system, the dialog box for confirming the power supply status of the user system
will be displayed.
Figure 3.17 [Power Supply] Dialog Box
When no power is supplied from the emulator, click the [OK] button without selecting the [Power Target from Emulator.
(MAX 300mA)] check box.
When power is supplied from the emulator, select the [Power Target from Emulator. (MAX 300mA)] check box and select
3.3 V or 5.0 V according to the power voltage of the user system.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 37 of 124
E8a Emulator User's Manual
3. Preparation before Use
CAUTION
Cautions to Be Taken for Power Supply:
Before carrying out the power supply, check the power specification of the user system and there is
no short circuit in the user system. Incorrect operation will damage the user system and the emulator
product. The user program will be lost.
12. When "Connected" is displayed in the [Output] window of the High-performance Embedded Workshop, the emulator
initiation is completed
Figure 3.18 High-performance Embedded Workshop Window
Note: When the user program has already been downloaded to the flash memory, source-level debugging cannot be
executed because there is no debugging information on the user program after the emulator has been activated. Be
sure to load the debugging information file. For details, refer to section 4.2.1, Setting at Emulator Activation.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 38 of 124
E8a Emulator User's Manual
3. Preparation before Use
Notes: 1. If the user system interface cable is disconnected from the connector on the user system, the following dialog
box will appear.
Figure 3.19 [Connector disconnected] Dialog Box
2. If the emulator is not properly initialized, one of the dialog boxes shown in Figures 3.20 through 3.24 will
appear.
(a) The following dialog box is displayed when the flash memory cannot be erased. Exchange the MCU since the
flash memory has been programmed more times than the limitation.
Figure 3.20 [Flash memory erase error!] Dialog Box
(b) The following dialog box is displayed when the flash memory cannot be programmed. An incorrect system
clock value has been input or the flash memory has been programmed more times than the limitation.
Figure 3.21 [Error sending Flash memory write program] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 39 of 124
E8a Emulator User's Manual
3. Preparation before Use
(c) The following dialog box is displayed when an incorrect ID code has been input. For the H8/Tiny, H8/Super
Low Power, R8C/10, 11, 12 and 13, if an ID code does not match, the flash memory will be completely
erased.
Figure 3.22 [ID code error!] Dialog Box
(d) The following dialog box is displayed when the MCU cannot communicate with the emulator. Check the
MCU settings.
Figure 3.23 [Boot Failed!] Dialog Box
3. If an incorrect driver has been selected, the following dialog box will appear.
Figure 3.24 [Unable to restore the previous driver settings] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 40 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
4. Preparations for Debugging
4.1
Method for Activating High-performance Embedded Workshop
To activate the High-performance Embedded Workshop, follow the procedure listed below.
1.
2.
3.
Connect the emulator to the host computer and the user system, then turn on the user system.
Select [Renesas] -> [High-performance Embedded Workshop] -> [High-performance Embedded Workshop] from
[Programs] in the [Start] menu of Windows®
The [Welcome!] dialog box is displayed.
Figure 4.1 [Welcome!] Dialog Box
[Create a new project workspace] radio button:
Creates a new workspace.
[Open a recent project workspace] radio button:
Uses the current workspace and displays the history of the opened
workspace.
[Browse to another project workspace] radio button:
Uses the current workspace; this radio button is used when the
history of the opened workspace does not remain.
In this section, we describe the following three ways to start up the High-performance Embedded Workshop:
•
•
•
[Create a new project workspace] - a toolchain is not in use
[Create a new project workspace] - a toolchain is in use
[Browse to another project workspace]
The [Open a recent project workspace] radio button is used to omit the operation for specifying the workspace file when
[Browse to another project workspace] is selected.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 41 of 124
E8a Emulator User's Manual
4.1.1
4. Preparations for Debugging
Creating the New Workspace (Toolchain Not Used)
1. In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select
[Create a new project workspace] radio button and click the [OK] button.
Figure 4.2 [Welcome!] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 42 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
2. The Project Generator is started. This section omits the description on the setting for the toolchain.
If you have not purchased the toolchain, the following dialog box is displayed.
Figure 4.3 [New Project Workspace] Dialog Box
[Workspace Name] edit box: Enter the new workspace name. Here, enter ‘test’.
[Project Name] edit box:
Enter the project name. When the project name is the same as the workspace name, it
needs not be entered.
[CPU family] drop-down list box: Select the target CPU family.
M32C: Select [M16C/80, M32C]
R8C, M16C: Select [M16C].
740: Select [740 Family].
H8S Tiny/H8 Tiny/Super Low Power: Select [H8S,H8/300].
[Tool chain] drop-down list box: Here, select [None].
Other list boxes are used for setting the toolchain; the fixed information is displayed when the toolchain has not been
installed.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 43 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
3. The following dialog box is displayed.
Figure 4.4 [Setting the Target System for Debugging] Dialog Box
Select the target system for debugging and click the [Next] button.
[Target system for debugging]
M32C E8a SYSTEM:
M16C E8a SYSTEM:
R8C E8a SYSTEM:
740 E8a SYSTEM:
H8S Tiny:
H8 Tiny/Super Low Power E8a SYSTEM 300H:
H8 Tiny/Super Low Power E8a SYSTEM 300L:
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
[Target MCU]
M32C
M16C
R8C/Tiny
740
H8S/Tiny E8a SYSTEM
H8/300H Tiny, H8/300H Super Low Power
H8/300 Super Low Power
Page 44 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
4. Set the configuration file name. The configuration file saves the setting of the High-performance Embedded Workshop
except the emulator.
Figure 4.5 [Setting the Debugger Options] Dialog Box
This is the end of the emulator setting.
Click the [Finish] button to exit the Project Generator. The High-performance Embedded Workshop is activated.
5. After the High-performance Embedded Workshop has been activated, the emulator is automatically connected. For
operation during connection, refer to section 3.8, System Check.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 45 of 124
E8a Emulator User's Manual
4.1.2
1.
4. Preparations for Debugging
Creating the New Workspace (Toolchain Used)
In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select
[Create a new project workspace] radio button and click the [OK] button.
Figure 4.6 [Welcome!] Dialog Box
2.
The Project Generator is started.
If you have purchased the toolchain, the following dialog box is displayed.
Figure 4.7 [New Project Workspace] Dialog Box
[Workspace Name] edit box:
[Project Name] edit box:
Enter the new workspace name. Here, enter ‘test’.
Enter the project name. When the project name is the same as the workspace
name, it needs not be entered.
[CPU family] drop-down list box: Select the target CPU family.
[Tool chain] drop-down list box: Select the target toolchain name when using the toolchain. Otherwise, select
[None].
[Project type] list box:
Select the project type to be used.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 46 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
3. Make the required setting for the toolchain.
Figure 4.8 [New Project-1/6-Select Target CPU. Toolchain version] Dialog Box
Select your toolchain version, CPU series and click the [Next] button.
4. Make the required settings for the RTOS.
Figure 4.9 [New Project-2/6-Select RTOS] Dialog Box
Select the RTOS you use, type of startup file and click the [Next] button.
Note: In the H8/Tiny, H8/Super Low Power series, and 740 family, this dialog box will not be displayed.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 47 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
5. Make the required settings for the heap area etc.
Figure 4.10 [New Project-3/6-Setting the Contents of Files to be Generated] Dialog Box
Set the heap size etc. and click the [Next] button.
Note: In the H8/Tiny, H8/Super Low Power series, and 740 family, the content of the dialog box will differ.
6. Make the required setting for the stack area.
Figure 4.11 [New Project-4/6-Setting the Stack Area] Dialog Box
Set the stack size and click the [Next] button.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 48 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
7. When the tool chain settings have been completed, the following dialog box is displayed.
Figure 4.12 [New Project-5/6-Setting the Target System for Debugging] Dialog Box
Select the target system for debugging and click the [Next] button.
[Target system for debugging]
M32C E8a SYSTEM:
M16C E8a SYSTEM:
R8C E8a SYSTEM:
740 E8a SYSTEM:
H8S Tiny:
H8 Tiny/Super Low Power E8a SYSTEM 300H:
H8 Tiny/Super Low Power E8a SYSTEM 300L:
[Target MCU]
M32C
M16C
R8C/Tiny
740
H8S/Tiny E8a SYSTEM
H8/300H Tiny, H8/300H Super Low Power
H8/300 Super Low Power
Select another product, if necessary.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 49 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
8. Set a configuration file name. The configuration file saves the settings of the High-performance Embedded Workshop
except for the emulator.
Figure 4.13 [New Project-6/7-Setting the Debugger Options] Dialog Box
9. Finally, confirm the file name you create.
Figure 4.14 [New Project-7/7-Changing the File Names to be Created] Dialog Box
The files which will be generated by the High-performance Embedded Workshop are displayed
If you want to change the file name, select and click it then enter the new name.
This is the end of the emulator settings.
Exit the Project Generator following the instructions on the screen. The High-performance Embedded Workshop is
activated.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 50 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
10. After the High-performance Embedded Workshop has been activated, connect the emulator. However, it is not needed
to connect the emulator immediately after the High-performance Embedded Workshop has been activated.
To connect the emulator, use one of the methods (a) and (b) below. For operation during connection, refer to section
3.8, System Check.
(a) Connecting the emulator after the setting at emulator activation
Select [Debug settings…] from the [Debug] menu to open the [Debug Settings] dialog box. It is possible to register
the download module or the command chain that is automatically executed at activation. For details on the [Debug
Settings] dialog box, refer to section 4.2, Setting at E8a Emulator Activation.
After the [Debug Settings] dialog box has been set, when the dialog box is closed, the emulator is connected.
(b) Connecting the emulator without the setting at emulator activation
The emulator can be easily connected by switching the session file that the setting for the emulator use has been
registered.
Figure 4.15 Selecting the Session File
In the list box that is circled in Figure 4.15, select the session file name including the character string that has been set in
the [Target name] text box in Figure 4.13, [New Project-6/7-Setting the Debugger Options] dialog box. The setting for
using the emulator has been registered in this session file.
After selected, the emulator is automatically connected.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 51 of 124
E8a Emulator User's Manual
4.1.3
4. Preparations for Debugging
Selecting an Existing Workspace
1. In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select
[Browse to another project workspace] radio button and click the [OK] button.
Figure 4.16 [Welcome!] Dialog Box
2. The [Open Workspace] dialog box is displayed. Select a directory in which you have created a workspace.
After that, select the workspace file (.hws) and press the [Open] button.
Figure 4.17 [Open Workspace] Dialog Box
3. This activates the High-performance Embedded Workshop and recovers the state of the selected workspace at the time
it was saved.
When the saved state information of the selected workspace includes connection to the emulator, the emulator will
automatically be connected. To connect the emulator when the saved state information does not include connection to
the emulator, refer to section 4.1.2, Creating the New Workspace (Toolchain Used).
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 52 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
4.2
Setting at E8a Emulator Activation
4.2.1
Setting at Emulator Activation
When the emulator is activated, the command chain can be automatically executed. It is also possible to register multiple
load modules to be downloaded. The registered load modules are displayed on the workspace window.
1. Select [Debug Settings…] from the [Debug] menu to open the [Debug Settings] dialog box.
Figure 4.18 [Debug Settings] Dialog Box ([Target] Page)
2. Select the product name to be connected in the [Target] drop-down list box.
3. Select the format of the load module to be downloaded in the [Default Debug Format] drop-down list box, then register
the corresponding download module in the [Download Modules] list box.
4. Click the [Options] tab.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 53 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
Figure 4.19 [Debug Settings] Dialog Box ([Options] Page)
The command chain that is automatically executed at the specified timing is registered. The following three timings can be
specified:
• At connecting the emulator
• Immediately before downloading
• Immediately after downloading
Specify the timing for executing the command chain in the [Command batch file load timing] drop-down list box. In
addition, register the command-chain file that is executed at the specified timing in the [Command Line Batch Processing]
list box.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 54 of 124
E8a Emulator User's Manual
4.2.2
4. Preparations for Debugging
Downloading a Program
A download module is added under [Download modules] in the [Workspace] window.
Open the load module of [Download modules] in the [Workspace] window by clicking the right-hand mouse button and
select [Download module] to start downloading the module.
Figure 4.20 Download Menu of the [Workspace] Window ([Projects])
Notes: 1. When load modules are downloaded, select [Debug] -> [Download] -> [All Download modules].
2. The emulator downloads programs to the flash memory just before execution of the user program.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 55 of 124
E8a Emulator User's Manual
4.2.3
4. Preparations for Debugging
Setting the [Program Flash] Mode
The following describes the procedures when the emulator is used as the programming tool. The load module to be
downloaded to the new workspace is registered and programmed.
(a) Select the new project workspace.
Figure 4.21 [New Project Workspace] Dialog Box
(b) Select the target MCU and click the [Next] button.
Figure 4.22 [Setting the Target System for Debugging] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 56 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
(c) Set a configuration file name and click the [Finish] button.
Figure 4.23 [Setting he Debugger Options] Dialog Box
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 57 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
(d) The [Emulator Setting] dialog box is displayed.
Figure 4.24 [Emulator Setting] Dialog Box
Select the [Program Flash] mode.
When the [Power Target from Emulator. (MAX 300mA)] check box is selected, power will be supplied to the user
system up to 300 mA. Then select 3.3 V or 5.0 V according to the power voltage of the user system.
(e) When [Power Target from Emulator. (MAX 300mA)] is not checked, the dialog box shown in Figure 4.25 will be
displayed.
Figure 4.25 Dialog Box of Power-on request message
When [Power Target from Emulator. (MAX 300mA)] is not checked, turn on the user system.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 58 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
(f) Enter the ID code printed on the flash memory.
Figure 4.26 [ID Code verification] Dialog Box
Note: Opening the [ID Code verification] dialog box in [Program Flash] mode depends on the target device. For details,
refer to the additional document, Notes on Connecting the xxxxx.
(g) Select [Debug Settings…] from the [Debug] menu.
Figure 4.27 High-performance Embedded Workshop Window
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 59 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
(h) Select the target MCU and then the download module with the [Add…] button.
Figure 4.28 [Debug Settings] Dialog Box ([Target] Page)
(i) The download file is displayed on [Projects].
Figure 4.29 [Workspace] Window ([Projects])
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 60 of 124
E8a Emulator User's Manual
4. Preparations for Debugging
(j) Select and download the file with the right-hand mouse button.
Figure 4.30 Download Menu of the [Workspace] Window ([Projects])
(k) The dialog box for sum checking is displayed and writing is completed.
Figure 4.31 Message for Completion of Flash Memory Writing
(l) When the following dialog box is displayed, close and restart or exit the workspace.
Figure 4.32 Message for Restarting or Exiting the [Program Flash] Mode
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 61 of 124
E8a Emulator User's Manual
5. Debugging
5. Debugging
This section describes the debugging operations and their related windows and dialog boxes. For details on the common
functions of the High-performance Embedded Workshop products, refer to the High-performance Embedded Workshop
User’s Manual.
5.1
Setting the Environment for Emulation
5.1.1
Opening the [Configuration] Dialog Box
Selecting [Setup -> Emulator -> System…] or clicking the [Emulator System] toolbar button (
[Configuration] dialog box.
5.1.2
) opens the
[General] Page
Sets the emulator operation conditions.
Figure 5.1 [Configuration] Dialog Box ([General] Page)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 62 of 124
E8a Emulator User's Manual
5. Debugging
Items that can be displayed in the sheet are listed below.
[Device] combo box
Displays the MCU name.
[Emulation mode] combo box
Selects the emulation mode at user program execution.
Select Normal to perform normal emulation.
Select No break to disable PC breakpoint or break condition settings during
emulation.
[User interface clock] combo box
Displays the transfer clock of the user interface.
[Flash memory synchronization]
combo box
Selects whether or not the contents of the flash memory are acquired by the emulator
when the user program is stopped or the position where the PC break is set is put
back as the original code.
When the flash memory is not programmed by the user program, its contents need
not be acquired by the emulator.
If there is no problem with the state that the program in the flash memory has been
replaced as the PC break code, the position where the PC break is set needs not be
put back as the original code.
Disable: Read or program is not performed for the flash memory except when the
emulator is activated, the flash memory area is modified, and the settings
of the PC break to the flash memory area are changed.
PC to flash memory: When the user program is stopped, the specified PC break
code is replaced as the original instruction. Select this option
if there is a problem with the state that the program in the
flash memory has been replaced as the PC break code.
Flash memory to PC: When the user program is stopped, the contents of the flash
memory are read by the emulator. Select this option if the
flash memory is reprogrammed by the user program.
PC to flash memory, Flash memory to PC:
When the user program is stopped, the contents of the flash memory are read by the
emulator and the specified PC break code is replaced as the original instruction.
Select this option if the flash memory is reprogrammed by the user program and
there is a problem with the state that the program in the flash memory has been
replaced as the PC break code.
Note: This dialog box differs depending on products. For details, refer to the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 63 of 124
E8a Emulator User's Manual
5.2
5. Debugging
Downloading a Program
This section describes how to download a program and view it as source code or assembly-language mnemonics.
Note: After a break has been detected, the High-performance Embedded Workshop displays the location of the program
counter (PC). In most cases, for example if an Elf/Dwarf2-based project is moved from its original path (at the
build), the source file may not be automatically found. In this case, the High-performance Embedded Workshop
will open a source file browser dialog box to allow you to manually locate the file.
5.2.1
Downloading a Program
A load module to be debugged must be downloaded.
To download a program, select the load module from [Debug -> Download] or select [Download] from the popup menu
opened by clicking the right-hand mouse button on the load module in [Download modules] of the [Workspace] window.
Note: Before downloading a program, it must be registered to the High-performance Embedded Workshop as a load
module. For registration, refer to section 4.2, Setting at E8a Emulator Activation.
5.2.2
Viewing the Source Code
Select a source file name in the [Workspace] window and click [Open] in the popup menu to make the High-performance
Embedded Workshop display the source file in the editor. It is also possible to display your source files by double-clicking
on their names in the [Workspace] window.
Figure 5.2 [Source] Window
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 64 of 124
E8a Emulator User's Manual
5. Debugging
In this window, the following items are shown on the left as line information.
The first column (Line Number column) Line number
The second column (Source address column): Address information
The third column (Event column): Event information (break condition)
The fourth column (S/W Breakpoints column): PC, bookmark, and breakpoint information
The right window that shows the source is called as the [Source] window.
• Line Number column
A line number for the current source file is displayed.
• Source address column
When a program is downloaded, an address for the current source file is displayed on the Source address column. These
addresses are helpful when setting the PC value or a breakpoint.
Event column
The Event column displays the following item:
: An address condition as a break condition is set.
: An address interrupt break is set.
This is also set by using the popup menu.
The bitmap symbol above is shown by double-clicking the Event column. This is also set by using the popup menu.
Figure 5.3 Popup Menu
S/W Breakpoints column
S/W Breakpoints column displays the following items:
: A bookmark is set.
: A PC Break is set.
: PC location
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 65 of 124
E8a Emulator User's Manual
5. Debugging
To switch off a column in all source files
1.
2.
3.
4.
Click the right-hand mouse button on the [Source] window or select the [Edit] menu.
Click the [Define Column Format…] menu item.
The [Global Editor Column States] dialog box is displayed.
A check box indicates whether the column is enabled or not. If it is checked, the column is enabled. If the check
box is gray, the column is enabled in some files and disabled in others. Deselect the check box of a column you
want to switch off.
5. Click the [OK] button for the new column settings to take effect.
Figure 5.4 [Global Editor Column States] Dialog Box
To switch off a column in one source file
1. Open the source file which contains the column you want to remove and click the [Edit] menu.
2. Click the [Columns] menu item to display a cascaded menu item. The columns are displayed in this popup menu. If
a column is enabled, it has a tick mark next to its name. Clicking the entry will toggle whether the column is
displayed or not.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 66 of 124
E8a Emulator User's Manual
5.3
5. Debugging
Stopping Your Program
This section describes how you can halt execution of your application's code. This section describes how to stop the
program by setting an address match breakpoints at specific locations in your code.
5.3.1
Address Match Breakpoints
When you are trying to debug your program you will want to be able to stop the program running when it reaches a specific point
or points in your code. You can do this by setting the address match breakpoint on the line or instruction at which you want the
execution to stop. The following instructions will show you how to quickly set and clear address match breakpoint.
•
1.
2.
3
To set a PC breakpoint in the [Source] window
Make sure that the [Disassembly] or [Source] window is open at the place you want to set a PC breakpoint.
Double-click in the event column at the line which you want the program to stop.
You will see a blue circle appear in the column to indicate that an address match breakpoint has been set.
Now when you run your program and it reaches the address at which you set the address match breakpoint, execution halts with
the message "BREAK CONDITION" displayed in the [Debug] sheet of the [Output] window, and the [Source] or [Disassembly]
window is updated with the address match breakpoint line marked with an arrow in the gutter.
Note: When a break occurs, the program stops just before it is about to execute the line or instruction at which you set an
address match breakpoint. If you choose Go or Step after stopping at the address match breakpoint, then the line
marked with an arrow will be the next instruction to be executed.
About address match breakpoints, see also section 5.4.13, Setting Break Conditions.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 67 of 124
E8a Emulator User's Manual
5.4
5. Debugging
Using the Event Points
The emulator has the event point function that performs breaking by specifying higher-level conditions along with the PC
breakpoints standard for the High-performance Embedded Workshop.
5.4.1
PC Breakpoints
When the instruction of the specified address is fetched, the user program is stopped. Up to 255 points can be set.
5.4.2
Break Conditions
Break conditions can be used for higher-level conditions such as the data condition as well as specification of the single
address.
5.4.3
Opening the [Event] Window
Select [View -> Code -> Eventpoints] or click the [Eventpoints] toolbar button (
) to open the [Event] window.
The [Event] window has the following two sheets:
[Breakpoint] sheet:
Displays the settings made for PC breakpoints. It is also possible to set, modify, and cancel PC
breakpoints.
[Breakcondition] sheet:
Displays or sets the settings made for break condition channels.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 68 of 124
E8a Emulator User's Manual
5.4.4
5. Debugging
Setting PC Breakpoints
It is possible to display, modify, and add PC breakpoints on the [Breakpoint] sheet.
Figure 5.5 [Event] Window ([Breakpoint] Sheet)
This window displays and sets the breakpoints. Items that can be displayed in the sheet are listed below.
[Type]
Breakpoint
[State]
Whether the breakpoint is enabled or disabled
[Condition] An address that the breakpoint is set
Address = Program counter (Corresponding file name, line, and symbol name)
[Action]
Operation of the emulator when a break condition is satisfied
Break: Halts execution
When a breakpoint is double-clicked in this window, the [Set Break] dialog box is opened and break conditions can be
modified.
A popup menu containing the following options is available by right-clicking within the window.
5.4.5
Add
Sets breakpoints. Clicking this item will open the [Set Break] dialog box and break conditions can be specified.
5.4.6
Edit
Only enabled when one breakpoint is selected. Select a breakpoint to be edited and click this item. The [Set Break] dialog
box will open and break conditions can be changed.
5.4.7
Enable
Enables the selected breakpoint(s).
5.4.8
Disable
Disables the selected breakpoint(s). When a breakpoint is disabled, the breakpoint will remain in the list; when specified
conditions have been satisfied, a break will not occur.
5.4.9
Delete
Removes the selected breakpoint. To retain the details of the breakpoint but not have it cause a break when its conditions
are met, use the Disable option (see section 5.4.8, Disable).
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 69 of 124
E8a Emulator User's Manual
5.4.10
5. Debugging
Delete All
Removes all breakpoints.
5.4.11
Go to Source
Only enabled when one breakpoint is selected. Opens the [Source] window at the address of the breakpoint.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 70 of 124
E8a Emulator User's Manual
5.4.12
5. Debugging
[Set Break] Dialog Box
Figure 5.6 [Set Break] Dialog Box
This dialog box specifies break conditions.
A breakpoint address to be set is specified in the [Address] edit box. Up to 255 breakpoints can be specified.
When [Address] is selected, if an overloaded function or class name including a member function is specified in address,
the [Select Function] dialog box opens.
Clicking the [OK] button sets the break conditions. Clicking the [Cancel] button closes this dialog box without setting the
break conditions.
Notes on Setting the [Set Break] Dialog Box
1. When an odd address is set for the H8S/Tiny, H8/Tiny and H8/Super Low Power series, the address is rounded down
to an even address.
2. A Breakpoint is accomplished by replacing instructions. Accordingly, it can be set only to the flash memory or RAM
area. However, a software break cannot be set to the following addresses:
⎯ An area other than the flash memory or RAM
⎯ An area occupied by the E8a emulator program
⎯ An instruction in which Break Condition 1 is satisfied
3. During step execution, a software breakpoint is disabled.
4. A condition set at Break Condition 1 is disabled immediately after starting execution when an instruction at a software
breakpoint is executed. A break does not occur even if a condition of Break Condition 1 is satisfied immediately after
starting the execution.
5. When execution resumes from the breakpoint address after the program execution stops at the software breakpoint,
single-step execution is performed at the address before execution resumes. Therefore, realtime operation cannot be
performed.
6. Settings of software breakpoint and Break Condition 1 are invalid while the STEP OVER function is being used.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 71 of 124
E8a Emulator User's Manual
5.4.13
5. Debugging
Setting Break Conditions
On the [Breakcondition] sheet, the settings for break conditions are displayed, modified, and added. For R8C Family, on
the [Breakcondition] sheet, the settings for address match breakpoint are displayed, modified, and added.
Figure 5.7 [Event] Window ([Breakcondition] Sheet)
Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to
the online help.
This window displays and sets the break condition.
Notes on Setting the Break Condition:
1. When [Go to cursor], [Step In], [Step Over], or [Step Out] is selected, the settings of Break Condition 1 are disabled.
2. Setting of Break Condition 1 is disabled when an instruction to which a BREAKPOINT has been set is executed.
3. When step over function is used, the settings of BREAKPOINT and Break Condition 1 are disabled.
Notes on Setting the Break Condition (for R8C Family):
1.
2.
3.
4.
When [Go to cursor], [Step In], [Step Over], or [Step Out] is selected, the settings of Break Condition are disabled.
Setting of Break Condition is disabled when an instruction to which a BREAKPOINT has been set is executed.
Setting of BREAKPOINT is disabled when BREAKPOINT and Break Condition are set at same address.
When step over function is used, the settings of BREAKPOINT and Break Condition are disabled.
Items that can be displayed in the sheet are listed below.
[Type]
Break channel number
[State]
Whether the breakpoint is enabled or disabled
[Condition] A condition that satisfies a break
[Action]
Operation of the emulator when a break condition is satisfied
Break: Halts execution
When a breakpoint is double-clicked in this window, the [Break condition 1] dialog box is opened and break conditions
can be modified. For details on the [Break condition 1] dialog box, refer to the online help for each product.
A popup menu containing the following options is available by right-clicking within the window.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 72 of 124
E8a Emulator User's Manual
5.4.14
5. Debugging
Edit...
Only enabled when one breakpoint is selected. Select a breakpoint to be edited and click this item. The [Break condition
1] dialog box will open and break conditions can be changed.
5.4.15
Enable
Enables the selected break channel(s). A break channel that the condition has not been set is not enabled.
5.4.16
Disable
Disables the selected break channel(s). When a break channel is disabled, a break will not occur even if specified
conditions have been satisfied.
5.4.17
Delete
Initializes the condition of the selected break channel. To retain the details of the break channel but not have it cause a
break when its conditions are met, use the Disable option (see section 5.4.16, Disable).
5.4.18
Delete All
Initializes conditions of all break channels.
5.4.19
Go to Source
Only enabled when one break channel is selected. Opens the [Source] window at address of break channel.
If an address value has not been set to the break channel, this option cannot be used.
5.4.20
Sequential Conditions
Sets the sequential condition of the break channel.
5.4.21
Editing Break Conditions
Handlings for settings other than PC breakpoints and break conditions are common. The following describes examples of
such handling.
5.4.22
Modifying Break Conditions
Select a break condition to be modified, and choose [Edit...] from the popup menu to open the dialog box for the event,
which allows the user to modify the break conditions. The [Edit...] menu is only available when one break condition is
selected.
5.4.23
Enabling Break Conditions
Select a break condition and choose [Enable] from the popup menu to enable the selected break condition.
5.4.24
Disabling Break Conditions
Select a break condition and choose [Disable] from the popup menu to disable the selected break condition. When a break
condition is disabled, the break condition will remain in the list, but an event will not occur when the specified conditions
have been satisfied.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 73 of 124
E8a Emulator User's Manual
5.4.25
5. Debugging
Deleting Break Conditions
Select a break condition and choose [Delete] from the popup menu to remove the selected break condition. To retain the
break condition but not have it cause an event when its conditions are met, use the [Disable] option (see section 5.4.24,
Disabling Break Conditions).
5.4.26
Deleting All Break Conditions
Choose [Delete All] from the popup menu to remove all break conditions.
5.4.27
Viewing the Source Line for Break Conditions
Select a break condition and choose [Go to Source] from the popup menu to open the [Source] or [Disassembly] window
at the address of the break condition. The [Go to Source] menu is only available when one break condition that has the
corresponding source file is selected.
5.4.28
[Break condition x] Dialog Box
Figure 5.8 [Break condition 3] Dialog Box
This page sets the address bus, data bus, and read/write cycle conditions.
Note: The items that can be set in this dialog box differ depending on the product. For the settings for each product, refer
to the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 74 of 124
E8a Emulator User's Manual
5. Debugging
The [Address] group box sets address bus conditions.
Option
Description
[Don’t care] check box
Does not set address conditions.
[Address] radio button
Sets the use of the normal address bus as break conditions.
[Only program fetched address after]
radio button
Sets a break after prefetched address execution as break conditions.
[Address] edit box
Sets the address bus value with a number or a symbol.
[Mask] edit box
Sets a value to be masked when [User mask] is selected. For masked bits, the
break condition is satisfied for any values.
The contents of an option that can be will change depending on the radio button selected.
Option
Description
[Address] radio button
All options can be set.
[Only program fetched address after]
radio button
The [Address] option can be set.
The [Data] group box sets the data bus conditions.
Option
Description
[Don’t care] check box
No data conditions are set.
[Value] edit box
Sets the data bus with a number.
[Low byte] radio button
Sets data access size as the lower 8-bit access.
[High byte] radio button
Sets data access size as the upper 8-bit access.
[Word] radio button
Sets data access size as the word access.
The [Read/Write] group box sets the read/write cycle conditions.
Option
Description
[Read/Write] radio button
Sets the read/write cycle conditions as break conditions.
[Read] radio button
Sets read cycles as break conditions.
[Write] radio button
Sets write cycles as break conditions.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 75 of 124
E8a Emulator User's Manual
5.5
5. Debugging
Viewing the Trace Information
For the description on the trace function, refer to section 2.2, Trace Functions.
5.5.1
Opening the [Trace] Window
To open the [Trace] window, choose [View -> Code -> Trace] or click the [Trace] toolbar button (
5.5.2
).
Acquiring Trace Information
The acquired trace information is displayed in the [Trace] window.
Figure 5.9 [Trace] Window
This window displays the following trace information items:
[PTR]
[IP]
[Type]
[Address]
[Instruction]
[Source]
[Label]
Pointer to a location in the trace buffer (+0 for the last executed instruction)
The amount of acquired trace information
Type of branch:
BRANCH: branch source
Instruction address
Instruction mnemonic
The C/C++ or assembly-language source program
Label information
It is possible to hide any column not necessary in the [Trace] window. Selecting a column you want to hide from the
popup menu displayed by clicking the right-hand mouse button on the header column hides that column. To display the
hidden column, select the column from the said popup menu again.
Note: The number of branch instructions that can be acquired by a trace and the trace display differ depending on the
product. For the specification of each product, refer to the online help.
5.5.3
Clearing the Trace Information
When [Clear] is selected from the popup menu, the trace buffer that stores the trace information becomes empty. If several
[Trace] windows are open, all [Trace] windows will be cleared as they all access the same buffer.
5.5.4
Saving the Trace Information in a File
Select [Save...] from the popup menu to open the [Save As] file dialog box, which allows the user to save the information
displayed in the [Trace] window as a text file. A range can be specified based on the [PTR] number. This file can only be
saved; it cannot be reloaded into the [Trace] window.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 76 of 124
E8a Emulator User's Manual
5.5.5
5. Debugging
Viewing the [Source] Window
The [Source] window corresponding to the selected trace record can be displayed in the following two ways:
• Select a trace record and choose [View Source] from the popup menu.
• Double-click a trace record
The [Source] or [Disassembly] window opens and the selected line is marked with a cursor.
5.5.6
Trimming the Source
Choose [Trim Source] from the popup menu to remove the white space from the left side of the source.
When the white space is removed, a check mark is shown to the left of the [Trim Source] menu. To restore the white
space, choose [Trim Source] while the check mark is shown.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 77 of 124
E8a Emulator User's Manual
5.6
5. Debugging
Using the Start/Stop Function
The emulator executes the specified routine of the user program immediately before starting and immediately after halting
program execution. This function is used to control the user system in synchronization with execution and halting of the
user program.
Note: The start/stop function is not supported in the H8/Tiny or H8/Super Low Power series, the 740 family, or the
R8C/10, R8C/11, R8C/12, or R8C/13 group.
5.6.1
Opening the [Start/Stop Function Setting] Dialog Box
The routine executed immediately before starting and immediately after halting the user program execution is specified in
the [Start/Stop Function Setting] dialog box.
To open the [Start/Stop Function Setting] dialog box, choose [Setup -> Emulator -> Start/Stop Function Setting…] from
the [Start] menu.
Figure 5.10 [Start/Stop Function Setting] Dialog Box
5.6.2
Specifying the Routine to be Executed
It is possible to specify the respective routines immediately before starting and immediately after halting the user program
execution.
When the [The specified routine is executed immediately before execution of the user’s program.] check box is selected,
the routine specified in the [starting address] combo box, which is below this check box, is executed immediately before
starting user program execution.
If no specified routine is executed immediately before starting user program execution, do not select the [The specified
routine is executed immediately before execution of the user’s program.] check box.
When the [The specified routine is executed immediately after the stop of the user’s program.] check box is selected, the
routine specified in the [starting address] combo box, which is below this check box, is executed immediately after halting
user program execution.
If no specified routine is executed immediately after halting user program execution, do not select the [The specified
routine is executed immediately after the stop of the user’s program.] check box.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 78 of 124
E8a Emulator User's Manual
5.6.3
5. Debugging
Restrictions on the Start/Stop Function
The start/stop function has the following restrictions.
•
Do not change the SFR used by the firmware.
•
When the watchdog timer is used, refresh the watchdog timer in the specified routine.
•
Do not set any breakpoints in the specified routine.
•
When a stack is used in the specified routine, be sure to use the user stack.
•
A register value is undefined when execution of the specified routine is started. It is possible to change the register
value in the specified routine, however, the following register and flags have restrictions.
Register and Flag Names
Restrictions
ISP register
When execution of the specified routine is ended, put the value back to the one at the
start of that routine.
Flag U
Be sure to set the flag value as 0 when execution of the specified routine is ended.
Flag B
Do not set the flag value as 1 in the specified routine.
Flag I
No interrupts are allowed during execution of the specified routine. Do not set the flag
value as 1 in the specified routine.
•
When the content of the [Start/Stop Function Setting] dialog box is changed, the flash memory will be reprogrammed
in the block which the firmware has been allocated at user program execution.
•
The specified routine is also executed when the following operations are performed:
⎯ Step operations
⎯ Watching or changing memory during user program execution
⎯ Setting an event break during user program execution
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 79 of 124
E8a Emulator User's Manual
6. Tutorial
6. Tutorial
6.1
Introduction
This section describes the main functions of the emulator by using a tutorial program.
The tutorial program is based on the C program that sorts ten random data items in ascending or descending order. The
tutorial program performs the following actions:
• The main function generates random data to be sorted.
• The sort function sorts the generated random data in ascending order.
• The change function then sorts the data in descending order.
The file tutorial.c contains source code for the tutorial program. The file Tutorial.x30 is a compiled load
module in the IEEE695 format.
Notes:
1.
After recompilation, the addresses may differ from those given in this section.
2.
The file Tutorial.cpp contains source code for the tutorial program of the H8 family devices. The file
Tutorial.abs is a compiled load module in the Elf/Dwarf2 format.
6.2
Running the High-performance Embedded Workshop
To run the High-performance Embedded Workshop, refer to section 3.8, System Check.
6.3
Setting up the E8a Emulator
This section describes the basic settings of the E8a emulator.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 80 of 124
E8a Emulator User's Manual
6.4
6. Tutorial
Setting the [Configuration] Dialog Box
Select [Emulator] then [Systems…] from the [Setup] menu for the basic settings of the emulator. The [Configuration]
dialog box is displayed.
Figure 6.1 [Configuration] Dialog Box
Note: The items that can be set in this dialog box differ depending on the product. For the settings for each product, refer
to the online help.
Set options as follows:
Table 6.1 [General] Page Options
Option
Value
Device
Select a device you use
Emulation mode
Normal (normal execution, default)
User interface clock
According to the system clock frequency, the maximum user interface clock is
automatically set.
Flash memory synchronization
Disable (default)
Click the [OK] button to set a configuration.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 81 of 124
E8a Emulator User's Manual
6.5
6. Tutorial
Checking the Operation of RAM
Check that RAM is operating correctly.
Display and edit the contents of the memory in the [Memory] window to check that the memory is operating correctly.
Note: The memory can be installed on the board in some microcomputers. In this case, however, the above way of
checking the operation of memory may be inadequate. It is recommended that a program for checking the memory
be created.
Select [Memory…] from the [CPU] submenu of the [View] menu and enter the RAM address in the [Display Address]
edit box. Here, enter ’0480’. Then, enter ‘0000’ and ’FFFF’ in the [Scroll Start Address] and [Scroll End Address] edit
boxes, respectively.
Figure 6.2 [Display Address] Dialog Box
Note: The settings of the RAM area differ depending on the product. For details, refer to the hardware manual.
Click the [OK] button. The [Memory] window is displayed and shows the specified memory area.
Figure 6.3 [Memory] Window
Placing the mouse cursor on a point in the display of data in the [Memory] window and double-clicking allows the values
at that point to be changed. Data can also be directly edited around the current position of the text cursor.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 82 of 124
E8a Emulator User's Manual
6. Tutorial
6.6
Downloading the Tutorial Program
6.6.1
Downloading the Tutorial Program
Download the object program to be debugged.
In this emulator, it is enabled to download the program and set the PC breakpoint in the internal flash memory area. For
the method to set the PC breakpoint, refer to section 6.16.1, PC Break Function.
Select [Download] from [Tutorial.x30] under [Download modules].
Figure 6.4 Downloading the Tutorial Program
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 83 of 124
E8a Emulator User's Manual
6.6.2
6. Tutorial
Displaying the Source Program
The High-performance Embedded Workshop allows the user to debug a user program at the source level.
Double-click [tutorial.c] under [C source file].
Figure 6.5 [Source] Window (Displaying the Source Program)
Select the [Display] option from the [Setup] menu to set a font and size that are legible, if necessary.
Initially the [Source] window shows the start of the user program, but the user can use the scroll bar to scroll through the
user program and look at the other statements.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 84 of 124
E8a Emulator User's Manual
6.7
6. Tutorial
Setting a PC Breakpoint
A PC breakpoint is a simple debugging function.
The [Source] window provides a very simple way of setting a PC breakpoint at any point in a program. For example, to set
a PC breakpoint at the sort function call:
Select by double-clicking the [S/W Breakpoints] column on the line containing the sort function call.
Figure 6.6 [Source] Window (Setting a PC Breakpoint)
The symbol • will appear on the line containing the sort function. This shows that a PC breakpoint has been set.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 85 of 124
E8a Emulator User's Manual
6.8
6. Tutorial
Setting Registers
Set values of the program counter and the stack pointer before executing the program.
Select [Registers] from the [CPU] submenu of the [View] menu. The [Register] window is displayed.
Figure 6.7 [Register] Window
To change the value of the program counter (PC), double-click the value area in the [Register] window with the mouse.
The following dialog box is then displayed, and the value can be changed. Set the program counter to 0E612 in this
tutorial program, and click the [OK] button.
Figure 6.8 [Register] Dialog Box (PC)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 86 of 124
E8a Emulator User's Manual
6.9
6. Tutorial
Executing the Program
Execute the program as described in the following:
To execute the program, select [Go] from the [Debug] menu, or click the [Go] button on the toolbar.
Figure 6.9 [Go] Button
When the program execution is started, ‘**RUNNING’ is displayed on the status bar.
The program will be executed up to the breakpoint that has been set, and an arrow will be displayed in the [S/W
Breakpoints] column to show the position that the program has halted, with the message [BREAKPOINT] in the status
bar.
Note: When the source file is displayed after a break, a path of the source file may be inquired. The location of the source
file is as follows:
The High-performance Embedded Workshop is installed to:
\WorkSpace\Tutorial\E8a\xxxx\Tutorial\Tutorial\Source
The directory xxxx varies depending on each device.
e.g.: M32C
\WorksSpace\Tutorial\E8a\M32C\Tutorial\Tutorial\Source
e.g.: M16C
\WorksSpace\Tutorial\E8a\M16C\Tutorial\Tutorial\Source
e.g.: R8C
\WorksSpace\Tutorial\E8a\R8C\Tutorial\Tutorial\Source
e.g.: 740
\WorksSpace\Tutorial\E8a\740\Tutorial\Tutorial\Source
e.g.: H8/Tiny normal mode
\WorksSpace\Tutorial\E8a\H8\Tutorial
e.g.: H8/Tiny advanced mode
\WorksSpace\Tutorial\E8a\H8\TutorialADV
e.g.: H8/Super Low Power
\WorksSpace\Tutorial\E8a\H8\TutorialSLP
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 87 of 124
E8a Emulator User's Manual
6. Tutorial
Figure 6.10 [Source] Window (Break State)
The user can see the cause of the break that occurred last time in the [Status] window.
Select [Status] from the [CPU] submenu of the [View] menu. After the [Status] window is displayed, open the [Platform]
sheet, and check the Status of Cause of last break.
Figure 6.11 [Status] Window
Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to
the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 88 of 124
E8a Emulator User's Manual
6.10
6. Tutorial
Reviewing Breakpoints
The user can see all the breakpoints set in the program in the [Event] window.
Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. Select the
[Breakpoint] sheet.
Figure 6.12 [Event] Window
The popup menu, opened by clicking the [Event] window with the right-hand mouse button, allows the user to set or
change breakpoints, define new breakpoints, and delete, enable, or disable breakpoints.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 89 of 124
E8a Emulator User's Manual
6.11
6. Tutorial
Viewing Memory
When the label name is specified, the user can view the memory contents that the label has been registered in the
[Memory] window. For example, to view the memory contents corresponding to _main in word size:
Select [Memory …] from the [CPU] submenu of the [View] menu, enter _main in the [Display Address] edit box, enter
0000 and FFFF in the [Scroll Start Address] and [Scroll End Address] edit boxes, respectively.
Figure 6.13 [Display Address] Dialog Box
Click the [OK] button. The [Memory] window showing the specified area of memory is displayed.
Figure 6.14 [Memory] Window
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 90 of 124
E8a Emulator User's Manual
6.12
6. Tutorial
Watching Variables
As the user steps through a program, it is possible to watch that the values of variables used in the user program are
changed. For example, set a watch on the long-type array a declared at the beginning of the program, by using the
following procedure:
Click the left of displayed array a in the [Source] window to position the cursor.
Select [Instant Watch...] with the right-hand mouse button.
The following dialog box will be displayed.
Figure 6.15 [Instant Watch] Dialog Box
Click the [Add] button to add a variable to the [Watch] window.
Figure 6.16 [Watch] Window (Displaying the Array)
The user can also add a variable to the [Watch] window by specifying its name.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 91 of 124
E8a Emulator User's Manual
6. Tutorial
Click the [Watch] window with the right-hand mouse button and select [Add Watch…] from the popup menu.
The following dialog box will be displayed. Enter variable i.
Figure 6.17 [Add Watch] Dialog Box
Click the [OK] button.
The [Watch] window will now also show the int-type variable i.
Figure 6.18 [Watch] Window (Displaying the Variable)
The user can click mark ‘+’ at the left side of array a in the [Watch] window to watch all the elements.
Figure 6.19 [Watch] Window (Displaying Array Elements)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 92 of 124
E8a Emulator User's Manual
6.13
6. Tutorial
Stepping Through a Program
The High-performance Embedded Workshop provides a range of step menu commands that allow efficient program
debugging.
Table 6.2 Step Option
Menu Command
Description
Step In
Executes each statement, including statements within functions.
Step Over
Executes a function call in a single step.
Step Out
Steps out of a function, and stops at the statement following the statement in the program that called
the function.
Step…
Steps the specified times repeatedly at a specified rate.
6.13.1 Executing [Step In] Command
The [Step In] command steps into the called function and stops at the first statement of the called function.
To step through the sort function, select [Step In] from the [Debug] menu, or click the [Step In] button on the toolbar.
Figure 6.20 [Step In] Button
Figure 6.21 [Source] Window (Step In)
The highlighted line moves to the first statement of the sort function in the [Source] window.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 93 of 124
E8a Emulator User's Manual
6.13.2
6. Tutorial
Executing [Step Out] Command
The [Step Out] command steps out of the called function and stops at the next statement of the calling statement in the
main function.
To step out of the sort function, select [Step Out] from the [Debug] menu, or click the [Step Out] button on the toolbar.
Note: It takes time to execute this function. When the calling source is clarified, use [Go To Cursor].
Figure 6.22 [Step Out] Button
Figure 6.23 [High-performance Embedded Workshop] Window (Step Out)
The data of variable a displayed in the [Watch] window is sorted in ascending order.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 94 of 124
E8a Emulator User's Manual
6.13.3
6. Tutorial
Executing [Step Over] Command
The [Step Over] command executes a function call as a single step and stops at the next statement of the main program.
• To step through all statements in the change function at a single step, select [Step Over] from the [Debug] menu, or
click the [Step Over] button on the toolbar.
Figure 6.24 [Step Over] Button
Figure 6.25 [High-performance Embedded Workshop] Window (Step Over)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 95 of 124
E8a Emulator User's Manual
6.14
6. Tutorial
Forced Breaking of Program Executions
The High-performance Embedded Workshop can force a break in the execution of a program.
Cancel all breaks.
To execute the remaining sections of the main function, select [Go] from the [Debug] menu or the [Go] button on the
toolbar.
Figure 6.26 [Go] Button
The program goes into an endless loop. To force a break in execution, select [Halt] from the [Debug] menu or the [Halt]
button on the toolbar.
Figure 6.27 [Halt] Button
6.15
Displaying Local Variables
The user can display local variables in a function using the [Locals] window. For example, we will examine the local
variables in the main function, which declares four local variables: a, j, i, and p_sam.
Select [Locals] from the [Symbol] submenu of the [View] menu. The [Locals] window is displayed.
The [Locals] window shows the local variables in the function currently pointed to by the program counter, along with
their values. Note, however, that the [Locals] window is initially empty because local variables are yet to be declared.
Figure 6.28 [Locals] Window
Click mark ‘+’ at the left side of array a in the [Locals] window to display the elements.
When the user refers to the elements of array a before and after the execution of the sort function, it is clarified that
random data is sorted in descending order.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 96 of 124
E8a Emulator User's Manual
6.16
6. Tutorial
Break Function
The emulator has PC and hardware break functions. With the High-performance Embedded Workshop, a PC breakpoint
can be set using the [Breakpoint] sheet of the [Event] window, and a hardware break condition can be set using the
[Breakcondition] sheet.
An overview and setting of the break function are described below.
6.16.1
PC Break Function
The emulator can set up to 255 PC breakpoints. Other methods for setting a PC breakpoint than in section 6.7, Setting a
PC Breakpoint, are described below.
Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed.
Select the [Breakpoint] sheet.
Figure 6.29 [Event] Window (Before PC Breakpoint Setting)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 97 of 124
E8a Emulator User's Manual
6. Tutorial
Click the [Event] window with the right-hand mouse button and select [Add…] from the popup menu.
Enter H'0E1FE in the [Address] edit box.
Figure 6.30 [Set Break] Dialog Box
Click the [OK] button.
The PC breakpoint that has been set is displayed in the [Event] window.
Figure 6.31 [Event] Window (PC Breakpoint Setting)
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 98 of 124
E8a Emulator User's Manual
6. Tutorial
To stop the tutorial program at the PC breakpoint, the following procedure must be executed:
Close the [Event] window.
Set the program counter value (PC = H’0E612) that was set in section 6.8, Setting Registers, in the [Register] window.
Click the [Go] button.
If program execution is failed, reset the device and execute again the procedures above.
The program runs, and stops at the set PC breakpoint.
Figure 6.32 [Source] Window at Execution Stop (PC Break)
The [Status] window displays the following contents.
Figure 6.33 Displayed Contents of the [Status] Window (PC Break)
Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to
the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 99 of 124
E8a Emulator User's Manual
6.17
6. Tutorial
Hardware Break Function
A method is given below in which the address bus condition is set under Break Condition 1 as hardware break conditions.
Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed.
The PC breakpoint that has been previously set is deleted. Click the [Event] window with the right-hand mouse button and
select [Delete All] from the popup menu to cancel all PC breakpoints that have been set.
To set a Break condition 1, click the [Break condition] tab.
Select a line of Break condition 1 in the [Event] window. When highlighted, double-click this line.
Figure 6.34 [High-performance Embedded Workshop] Window ([Break condition 1])
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 100 of 124
E8a Emulator User's Manual
6. Tutorial
The [Break condition 1] dialog box is displayed.
Clear the [Don't care] check box in the [Address] group box.
Select the [Only program fetched address after] radio button and enter H'0E1F2 as the value in the [Address] edit box.
Figure 6.35 [condition] Page ([Break condition 1] Dialog Box)
Click the [OK] button.
The first point display in the State line changes from Disable to Enable.
The first point display in the Condition line changes from None to Address =
H’0000E1FE(Tutorial.c/41)pcbefore.
Set the program counter value (PC = H’0E612) that was set in section 6.8, Setting Registers, in the [Register] window.
Click the [Go] button.
Note: The items that can be set in this page differ depending on the product. For the settings for each product, refer to the
online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 101 of 124
E8a Emulator User's Manual
6. Tutorial
Figure 6.36 [Source] Window at Execution Stop (Break Condition 1)
The [Status] window displays the following contents.
Figure 6.37 Displayed Contents of the [Status] Window (Break Condition 1)
Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to
the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 102 of 124
E8a Emulator User's Manual
6.18
6. Tutorial
Trace Functions
The emulator has a branch-instruction trace function.
The branch source addresses, mnemonics, operands, source lines, and labels are displayed for four branches.
Note: The trace function uses the trace buffer housed in the device.
Devices which have no trace function cannot use this function.
6.18.1
Displaying the Trace Window
Select [Trace] from the [Code] submenu of the [View] menu.
Run the program as shown in the example of section 6.16.1, PC Break Function. The trace results are displayed in the
[Trace] window after the program execution is completed.
Figure 6.38 [Trace] Window
If necessary, adjust the column widths by dragging borders in the header bar (immediately below the title bar).
Note: The number of branch instructions that can be acquired by a trace and the trace display differ depending on the
product. For the specification of each product, refer to the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 103 of 124
E8a Emulator User's Manual
6.19
6. Tutorial
Stack Trace Function
The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the
function to which the program counter is currently pointing.
Note: This function can be used only when the load module that has the IEEE695-type debugging information is loaded.
(However, 740 families exclude it.)
Double-click the [S/W Breakpoints] column in the sort function and set a PC breakpoint.
Figure 6.39 [Source] Window (PC Breakpoint Setting)
Set the same program counter value (PC = H’0E612) as was set in section 6.8, Setting Registers (again, use the [Register]
window). Click the [Go] button.
After the break in program execution, select [Stack Trace] from the [Code] submenu of the [View] menu to open the
[Stack Trace] window.
Figure 6.40 [Stack Trace] Window
Figure 6.40 shows that the position of the program counter is currently at the selected line of the sort() function, and
that the sort() function is called from the tutorial() function.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 104 of 124
E8a Emulator User's Manual
6.20
6. Tutorial
What Next?
This tutorial has described the major features of the emulator and the use of the High-performance Embedded Workshop.
Sophisticated debugging can be carried out by using the emulation functions that the emulator offers. This provides for
effective investigation of hardware and software problems by accurately isolating and identifying the conditions under
which such problems arise.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 105 of 124
E8a Emulator User's Manual
7. Appendix A: Components of the E8a Emulator
7. Appendix A: Components of the E8a Emulator
Table A.1 lists the components of the E8a emulator.
Table A.1 Components of the Emulator (R0E00008AKCE00)
Classification
Hardware
Component
E8a emulator
Appearance
Quantity
1
R0E00008AKCE00:
Depth: 42 mm
Width: 92 mm
Height: 15 mm
Mass: 38.0 g
User system interface
cable
1
Length: 150 mm (connector part not
included),
Mass: 10.0 g
USB cable
1
Length: 1.5 m
Mass: 42.0 g
E8a emulator setup
program
1
R0E00008AKCE00SR
(Model: R0E00008AKCE00)
Software
Remarks
E8a emulator self-check
program
E8aSCP.EXE
E8a Emulator User’s
Manual
R0E00008AKCE00J
R0E00008AKCE00E
E8a Emulator Additional
Document for User’s
Manual, Notes on
Connecting the xxxxx
R0E00008AKCE00JPn
R0E00008AKCE00EPn
(n = 1, 2, 3, 4, …)
M32C evaluation compiler
M3T-NC308WA
M16C evaluation compiler
M3T-NC30WA
740 evaluation assembler
M3T-SRA74
H8 evaluation compiler
R0C40008XSW06R
(Provided with the E8a emulator setup
program)
Note:
To our customers,
On April 1st, 2010, NEC Electronics Corporation merged with Renesas Technology Corp., and
Renesas Electronics Corporation took over all the business of both companies. Therefore,
although the old company name remains in this product, it is a valid Renesas Electronics product.
We appreciate your understanding.
April 1st, 2010
Renesas Electronics Corporation
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 106 of 124
E8a Emulator User's Manual
8. Appendix B: Window Functions
8. Appendix B: Window Functions
This section describes the window functions that can be used with the High-performance Embedded Workshop for E8a
emulator. Here, the High-performance Embedded Workshop common functions are omitted, and only the emulation
functions are described.
Table B.1 Window Functions
Menu
View
Option
Shortcut
Toolbar Button
Remarks
Disassembly
Ctrl + D
Opens the [Disassembly] window.
Command Line
Ctrl + L
Opens the [Command Line] window.
Workspace
Alt + K
Opens the [Workspace] window.
Output
Alt + U
Opens the [Output] window.
Registers
Ctrl + R
Opens the [Register] window.
Memory…
Ctrl + M
Opens the [Memory] window.
IO
Ctrl + I
Opens the [IO] window.
Status
Ctrl + U
Opens the [Status] window.
Labels
Shift + Ctrl + A
Opens the [Labels] window.
Watch
Ctrl + W
Opens the [Watch] window.
Locals
Shift + Ctrl + W
Opens the [Locals] window.
Eventpoints
Ctrl + E
Opens the [Event] window.
Trace
Ctrl + T
Opens the [Trace] window.
Stack Trace
Ctrl + K
Opens the [Stack Trace] window.
Image…
Shift + Ctrl + G
Opens the [Image] window.
Waveform…
Shift + Ctrl + V
Opens the [Waveform] window.
CPU
Symbol
Code
Graphic
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 107 of 124
E8a Emulator User's Manual
8. Appendix B: Window Functions
Table B.1 Window Functions (cont)
Menu
Setup
Option
Radix
Emulator
Debug
Shortcut
Toolbar
Button
Remarks
Hexadecimal
Uses a hexadecimal for displaying a radix in which the
numerical values will be displayed and entered by
default.
Decimal
Uses a decimal for displaying a radix in which the
numerical values will be displayed and entered by
default.
Octal
Uses an octal for displaying a radix in which the
numerical values will be displayed and entered by
default.
Binary
Uses a binary for displaying a radix in which the
numerical values will be displayed and entered by
default.
System…
Opens the [Configuration Properties] dialog box allowing
the user to modify the debugging platform settings.
Emulator
Setting…
Opens the [Emulator Setting] dialog box.
Start/Stop
Function
Setting…
Opens the [Start/Stop Function Setting] dialog box.
Debug Sessions…
Opens the [Debug Sessions] dialog box to list, add, or
remove the debug session.
Debug Settings…
Opens the [Debug Settings] dialog box to set the
debugging conditions or download modules.
Reset CPU
Resets the target hardware and sets the PC to the reset
vector address.
Go
F5
Starts executing the user program at the current PC.
Reset Go
Shift + F5
Resets the target microcomputer and executes the user
program from the reset vector address.
Go To Cursor
Starts executing the user program at the current PC until
the PC reaches the address indicated by the current text
cursor position.
Set PC To Cursor
Sets the PC to the address at the row of the text cursor.
Run…
Launches the [Run Program] dialog box allowing the
user to enter the PC or PC breakpoint during executing
the user program.
Display PC
Shift +
Ctrl + Y
Displays the current PC value.
Step In
F11
Executes a block of user program before breaking.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 108 of 124
E8a Emulator User's Manual
8. Appendix B: Window Functions
Table B.1 Window Functions (cont)
Menu
Debug
(cont)
Option
Shortcut
Toolbar
Button
Remarks
Step Over
F10
Executes a block of user program before breaking. If a
subroutine call is reached, then the subroutine will not
be entered.
Step Out
Shift +
F11
Executes the user program to reach the end of the
current function.
Step…
Step
Mode
Launches the [Step Program] dialog box allowing the
user to modify the settings for stepping.
Auto
Steps only one source line when the [Source] window is
active. When the [Disassembly] window is active,
stepping is executed in a unit of assembly instructions.
Assembly
Executes stepping in a unit of assembly instructions.
Source
Steps only one source line.
Halt Program
Esc
Stops the execution of the user program.
Initialize
Disconnects the debugging platform and connects it
again.
Connect
Connects the debugging platform.
Disconnect
Disconnects the debugging platform. This option cannot
be used in some products.
Save Memory…
Saves the specified memory area data to a file.
Verify Memory…
Verifies file contents against memory contents.
Download Modules
Downloads the object program.
Unload Modules
Unloads the object program.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 109 of 124
E8a Emulator User's Manual
9. Appendix C: Command-Line Functions
9. Appendix C: Command-Line Functions
The emulator supports the commands that can be used in the command-line window.
For details, refer to the online help.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 110 of 124
E8a Emulator User's Manual
10. Appendix D: Notes on High-performance Embedded Workshop
10. Appendix D: Notes on High-performance Embedded Workshop
1.
Note on Moving Source File Position after Creating Load Module
When the source file is moved after creating the load module, the [Open] dialog box may be displayed to specify the
source file during the debugging of the created load module. Select the corresponding source file and click the [Open]
button.
2. Source-Level Execution
⎯ Source file
Do not display source files that do not correspond to the load module in the program window. For a file having the
same name as the source file that corresponds to the load module, only its addresses are displayed in the program
window. The file cannot be operated in the program window.
⎯ Step
Even standard C libraries are executed. To return to a higher-level function, enter Step Out. In a for statement or a
while statement, executing a single step does not move execution to the next line. To move to the next line, execute
two steps.
3. Operation During Accessing Files
Do not perform other operations during downloading the load module or saving in the [Verify Memory], [Save
Memory], or [Trace] window because this will not allow correct file accessing to be performed.
4. Watch
⎯ Local variables at optimization
Depending on the generated object code, local variables in a C source file that is compiled with the optimization
option enabled will not be displayed correctly. Check the generated object code by displaying the [Disassembly]
window.
If the allocation area of the specified local variable does not exist, displays as follows.
Example:
The variable name is asc.
asc = ? - target error 2010 (xxxx)
⎯ Variable name specification
When a name other than a variable name, such as a symbol name or function name, is specified, no data is
displayed.
Example:
The function name is main.
main =
A variable that is allocated to register cannot be selected for monitoring.
⎯ Variable updating
For updating of the content of the variable that has been registered in the [Watch] window, read the data after the
break in user program execution. The realtime operation for the user program is disabled because the user program
is temporarily stopped.
5. Line Assembly
⎯ Input radix
Regardless of the Radix setting, the default for line assembly input is decimal. Specify H’ or 0x for the H8 series
microcomputers and xxxxh for the R8C, 740, M32C and M16C series microcomputers as the radix for a
hexadecimal input.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 111 of 124
E8a Emulator User's Manual
10. Appendix D: Notes on High-performance Embedded Workshop
6. Command Line Interface
⎯ Batch file
To display the message “Not currently available” while executing a batch file, enter the sleep command. Adjust the
sleep time length which differs according to the operating environment.
Example:
To display “Not currently available” during memory_fill execution:
sleep d’3000
memory_fill 0 ffff 0
⎯ File specification by commands
The current directory may be altered by file specifications in commands. It is recommended to use absolute paths to
specify the files in a command file so that the current directory alteration is not affected.
Example:
FILE_LOAD C:\Hew3\Tools\Renesas\DebugComp\Platform\E8a\
E8aR8C\TutorialR8C\Tutorial\Debug_R8C_E8a_SYSTEM\Tutorial.x30
7. Memory Save During User Program Execution
Do not execute memory save or verifying during user program execution.
8. Load of Motorola S-type Files
This High-performance Embedded Workshop does not support Motorola S-type files with only the CR code (H'0D) at
the end of each record. Load Motorola S-type files with the CR and LF codes (H'0D0A) at the end of each record.
9. [I/O] Window
⎯ Display and modification
Do not change values in the [I/O] window because the E8a emulator uses the address break controller.
⎯ Note that the E8a emulator does not support the display of the invalid module in the [I/O] window.
⎯ For the H8/Tiny and H8/Super Low Power series, the E8a emulator dose not support the display of the bit
information in the [I/O] window.
10. Note on [Register] Window Operation During Program Execution
The register value cannot be changed in the [Register] window during program execution. Even if the changed value is
displayed, the register contents are not changed actually.
11. Using Register Contents
Use the value contained in a CPU register by specifying the register name prefixed by the “#” character, e.g.: #R1,
#PC, #R6L, or #ER3 when you are entering a value elsewhere in the High-performance Embedded Workshop, for
example when displaying a specified address in the [Disassembly] or [Memory] window.
In R8C Family, specify and enter the bank number before a register name; e.g., #0R0 or #0R0H.
12. Break Functions
When the PC breakpoint is set in the flash memory area, the program is written to the flash memory each time the user
program is executed. At this time, note that the number of rewritable times will be decreased.
⎯ BREAKPOINT cancellation
When the contents of the BREAKPOINT address are modified during user program execution, the following
message is displayed when the user program stops.
BREAKPOINT IS DELETED A=xxxxxxxx
If the above message is displayed, cancel all BREAKPOINT settings with the [Delete All] or [Disable] button in
the [Breakpoints] window.
13. Number of BREAKPOINT and [Stop At] Settings in the [Run...] Menu
The maximum number of BREAKPOINTs and [Stop At] settings allowed in the [Run...] menu is 255. Therefore, when
255 BREAKPOINTs are set, specification by [Stop At] in the [Run...] menu becomes invalid. Use the BREAKPOINTs
and [Stop At] in the [Run...] menu with 255 or less total settings.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 112 of 124
E8a Emulator User's Manual
10. Appendix D: Notes on High-performance Embedded Workshop
14. Note on RUN-TIME Display
The execution time of the user program displayed in the [Status] window is not a correct value since the timer in the
host computer has been used.
15. Note on Displaying Timeout error
If Timeout error is displayed, the emulator cannot communicate with the target microcomputer. Turn off the
emulator and the user system and connect the emulator again by using the High-performance Embedded Workshop.
16. Support of Double Float Format
In the following memory operations, the double float format is not supported:
⎯ [Fill Memory] dialog box
⎯ [Search Memory] dialog box
⎯ MEMORY_FILL command
The [Format] specification in the [Copy Memory] dialog box is ignored. Memory is copied in a byte unit.
17. Note on Using the [Run Program] Dialog Box
When [Run...] is selected from the [Debug] menu to specify the stop address, there is the following note:
When the breakpoint that has been set as Disable is specified as the stop address, note that the breakpoint becomes
Enable when the user program stops.
18. [Stack Trace] window
When using the NC30WA or NC8C, if parameters and local variables of a function are referred in the call stack
window and one or more parameters are on a register, the register parameters may be interchanged with the local
variables. However, the correct values are displayed.
For NC308WA, NC30WA, or NC8C, specify the compiler option ‘-genter’, which is used to output the ENTER or
EXITD instruction, to all functions. If this option is not specified, the [Stack Trace] window will not be correctly
displayed.
19. Memory Access during User Program Execution
When a memory is accessed from the memory window, etc. during user program execution, the user program is
resumed after it has stopped in the E8a emulator to access the memory. Therefore, realtime emulation cannot be
performed
20. Internal Flash Memory
The emulator is also available as the programming tool for mass production.
However, the actual MCU, which has been used by connecting to the emulator, has been programmed to the flash
memory at emulation and stressed. Do not use the MCU that has been used for debugging for the mass products.
21. Suspend during Emulator Use
The host computer cannot enter suspend mode while the emulator is in use.
22. Verification of Memory
Use the FILE_VERIFY command to verify memory. Do not use [Verify Memory…] in the [Debug] menu.
23. Overwrite of a File
In command line interface, a file that has the same name as the output file is overwritten without asking the user.
24. Usage with Other Products
To install the SuperH™ RISC engine C/C++ compiler package or H8, H8/300 series C/C++ compiler package after
installing the emulator debugger for the High-performance Embedded Workshop, select [High-performance Embedded
Workshop] as the component to be installed in [Select Components] during installation of the compiler package.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 113 of 124
E8a Emulator User's Manual
10. Appendix D: Notes on High-performance Embedded Workshop
25. Download of Load Modules
When load modules are downloaded, select [Debug] -> [Download] -> [All Download modules].
26. [Program Flash] Mode
When microcomputers are continuously programmed, be sure to turn the target on or off.
27. Memory Access in the [Program Flash] Mode
Memory cannot be accessed in the [Program Flash] mode. In this mode, values displayed in the [Memory] or [IO]
window are dummy.
28. Memory Access during Flash Memory Programming
During flash memory programming (e.g., user program execution), operation for memory accessing such as opening
the [Memory] window is not allowed. Values displayed here are dummy. Access the memory again after flash memory
programming has been completed.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 114 of 124
E8a Emulator User's Manual
11. Appendix E: E8aSCP (E8a Self-Check Program)
11. Appendix E: E8aSCP (E8a Self-Check Program)
This appendix describes the troubleshooting procedure that applies the self-check program for the E8a emulator (E8aSCP).
11.1
Flowchart of the Procedure to Execute the Self-Check Program
Install the High-performance Embedded Workshop.
(for the first time)
Install the E8aSCP program and the USB driver
for the E8a to the host computer.
▼
Connect the user system interface cable.
Connect the user system interface cable. At this point,
do NOT connect the USB cable to the E8a.
▼
Connect the USB cable.
Connect the USB cable to the USB connector
of the host computer and the E8a emulator.
▼
Start up the E8aSCP program.
Start up the E8aSCP program.
▼
Execute the TEST1 program.
Execute the TEST1 program.
▼
Disconnect the user system interface cable
from the self-check connector.
Disconnect the user system interface cable
from the self-check connector.
▼
Execute the TEST2 program.
Execute the TEST2 program.
▼
The result of self-checking is displayed.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
The message ‘PASS’ or ‘FAIL’ will be displayed.
‘PASS’: the emulator is working correctly.
‘FAIL’: the emulator has failed.
If ‘FAIL’ is displayed, see Table E.1.
Page 115 of 124
E8a Emulator User's Manual
11.2
11. Appendix E: E8aSCP (E8a Self-Check Program)
System Setup to Execute the E8aSCP
(1) The following equipment is required to execute the check program.
•
•
•
•
•
E8a emulator main unit
USB cable included with the E8a emulator
User system interface cable included with the E8a emulator
CD included with the E8a emulator
Host computer
Install the High-performance Embedded Workshop and the USB driver on the host computer in advance.
(2) Open the cover of the self-check connector for the emulator. Connect the user system interface cable to the usersystem connector and the self-check connector.
Figure E.1 Connecting the User System Interface Cable when Using the E8aSCP
Insert the user system interface cable into the self-check
connector with the faulty-insertion-prevention nose below.
Figure E.2 Connecting the User System Interface Cable to the Self-Check Connector
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 116 of 124
E8a Emulator User's Manual
11. Appendix E: E8aSCP (E8a Self-Check Program)
WARNING
Warnings for Connecting to the Self-Check Connector:
z Make sure to disconnect the USB cable from the E8a before connecting the user system
interface cable to the user-system connector or the self-check connector of the E8a.
If the E8aSCP program is executed when the USB cable remains connected to the E8a after
‘Disconnect’ is done from the High-performance Embedded Workshop or Flash Development
Toolkit, self-checking will not be executed correctly. This is caused by the different condition of
the E8a pins. The E8aSCP program expects that the E8a pins are in the condition right after
starting-up the E8a, but after ‘Disconnect’ is done, they remain in the condition where the E8a is
connected to the user system.
z Fully insert the user system interface cable in the self-check connector as shown in Figure E.2.
(3) Start up the host computer, and connect the E8a emulator to the USB connector of the host computer via the USB
cable provided.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 117 of 124
E8a Emulator User's Manual
11.3
11. Appendix E: E8aSCP (E8a Self-Check Program)
Executing the Self-Check Program
(1) Execute [Program]-[Renesas]-[High-performance Embedded Workshop]-[E8a Self Check Program].
Figure E.3 Starting Up the E8aSCP
(2) Click the ‘START’ button. The following message will be displayed:
‘Please confirm that the User interface cable is connected to the self-check connector in a correct direction’.
Confirm that the user system interface cable is connected to the self-check connector in the correct direction, as shown
in Figure E.2, and click the [OK] button. The self-check program will start.
Figure E.4 Confirming Connection of the User System Interface Cable
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 118 of 124
E8a Emulator User's Manual
11. Appendix E: E8aSCP (E8a Self-Check Program)
(3) The message ‘TEST1 is running.’ or ‘TEST2 is running.’ will appear in the window. This indicates the start of the selfcheck program.
Figure E.5 Running the Self-Check Program
(4) When ‘TEST3 is waiting.’ starts, the following message will be displayed:
‘Please remove the User interface cable from the self-check connector to execute TEST3.’
When the above message is displayed, remove the user system interface cable from the self-check connector and close
the cover of this connector. Click the [OK] button. The self-check program will be continuously executed.
Figure E.6 ‘Please remove the User interface cable from the self-check connector to execute TEST3.’ Message
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 119 of 124
E8a Emulator User's Manual
11. Appendix E: E8aSCP (E8a Self-Check Program)
(5) The message ‘TEST3 is running.’ will appear in the window. This starts execution of the self-check program.
Figure E.7 Running the Self-Check Program
(6) The message ‘PASS’ or ‘FAIL’ will be displayed. ‘PASS’ indicates that the emulator is working correctly. Click the
[QUIT] button to exit the self-check program.
Figure E.8 Quitting the Self-Check Program
If ‘FAIL’ is displayed during execution of the self-check program, the content of an error is displayed at the center of the
window. Table E.1 shows error messages.
Figure E.9 Window Showing an Error
Clicking the [LOG] button opens the dialog box for selecting a file. Specify the destination to save the result of program
execution. The result will be saved as a text file.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 120 of 124
E8a Emulator User's Manual
11. Appendix E: E8aSCP (E8a Self-Check Program)
Table E.1 Error Messages
Error Message
The E8a has failed.
Description
The E8a emulator has become faulty.
If this applies to the contents guaranteed in 'IMPORTANT' described in this
user's manual, we will repair or replace your faulty product free of charge.
If this guarantee does not apply to your product's fault, we will repair the
product or replace it with a new one with extra-charge. However, replacement
will be lower in cost and we recommend that you purchase a new emulator.
Please connect the User interface cable
with the self-check connector in a correct
direction.
Connect the user system interface cable to the self-check connector in the
correct direction, as shown in Figure E.2, before running the self-check
program.
Because the User interface cable was
connected with to self-check connector,
TEST3 was interrupted.
Perform the self-check again from the
beginning.
Execution of TEST3 was halted because the user system interface cable was
not removed from the self-check connector before starting ‘TEST3 is running.’
Connect the user system interface cable to the self-check connector in the
correct direction, as shown in Figure E.2, and restart the self-check program
from the beginning.
An error occurred during USB I/O
processing.
The USB cable was disconnected during execution of the self-check program,
or the E8a emulator became faulty. Execute the self-check program again.
If this error message is displayed again, the emulator could be faulty.
R20UT0541EJ0500 Rev.5.00
Mar 01, 2011
Page 121 of 124
E8a Emulator (R0E00008AKCE00)
User's Manual
Publication Date:
Mar 01, 2011
Rev.5.00
Published by:
Renesas Electronics Corporation
Edited by:
Microcomputer Tool Development Department 2
Renesas Solutions Corp.
http://www.renesas.com
SALES OFFICES
Refer to "http://www.renesas.com/" for the latest and detailed information.
Renesas Electronics America Inc.
2880 Scott Boulevard Santa Clara, CA 95050-2554, U.S.A.
Tel: +1-408-588-6000, Fax: +1-408-588-6130
Renesas Electronics Canada Limited
1101 Nicholson Road, Newmarket, Ontario L3Y 9C3, Canada
Tel: +1-905-898-5441, Fax: +1-905-898-3220
Renesas Electronics Europe Limited
Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K
Tel: +44-1628-585-100, Fax: +44-1628-585-900
Renesas Electronics Europe GmbH
Arcadiastrasse 10, 40472 Düsseldorf, Germany
Tel: +49-211-65030, Fax: +49-211-6503-1327
Renesas Electronics (China) Co., Ltd.
7th Floor, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100083, P.R.China
Tel: +86-10-8235-1155, Fax: +86-10-8235-7679
Renesas Electronics (Shanghai) Co., Ltd.
Unit 204, 205, AZIA Center, No.1233 Lujiazui Ring Rd., Pudong District, Shanghai 200120, China
Tel: +86-21-5877-1818, Fax: +86-21-6887-7858 / -7898
Renesas Electronics Hong Kong Limited
Unit 1601-1613, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong
Tel: +852-2886-9318, Fax: +852 2886-9022/9044
Renesas Electronics Taiwan Co., Ltd.
7F, No. 363 Fu Shing North Road Taipei, Taiwan
Tel: +886-2-8175-9600, Fax: +886 2-8175-9670
Renesas Electronics Singapore Pte. Ltd.
1 harbourFront Avenue, #06-10, keppel Bay Tower, Singapore 098632
Tel: +65-6213-0200, Fax: +65-6278-8001
Renesas Electronics Malaysia Sdn.Bhd.
Unit 906, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia
Tel: +60-3-7955-9390, Fax: +60-3-7955-9510
Renesas Electronics Korea Co., Ltd.
11F., Samik Lavied' or Bldg., 720-2 Yeoksam-Dong, Kangnam-Ku, Seoul 135-080, Korea
Tel: +82-2-558-3737, Fax: +82-2-558-5141
© 2011 Renesas Electronics Corporation and Renesas Solutions Corp. All rights reserved.
Colophon 1.0
E8a Emulator (R0E00008AKCE00)
User's Manual
R20UT0541EJ0500
(Previous number: REJ10J1655-0400)