Renesas E8 User Manual

Loading...
Renesas E8 User Manual

REJ10J0768-1000

E8 Emulator

User's Manual

R0E000080KCE00E

Renesas Microcomputer Development Environment System

Rev.10.00

Aug. 1, 2007

Notes regarding these materials

1.This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document.

2.Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples.

3.You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. When exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations.

4.All information included in this document such as product data, diagrams, charts, programs, algorithms, and application circuit examples, 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 products listed in this document, please confirm the latest product information with a Renesas sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website. (http://www.renesas.com )

5.Renesas has used reasonable care in compiling the information included in this document, but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document.

6.When using or otherwise relying on the information in this document, you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application. Renesas makes no representations, warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products.

7.With the exception of products specified by Renesas as suitable for automobile applications, Renesas products are not designed, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion control, aerospace and aeronautics, nuclear power, or undersea communication transmission. If you are considering the use of our products for such purposes, please contact a Renesas sales office beforehand. Renesas shall have no liability for damages arising out of the uses set forth above.

8.Notwithstanding the preceding paragraph, you should not use Renesas products for the purposes listed below:

(1)artificial life support devices or systems

(2)surgical implantations

(3)healthcare intervention (e.g., excision, administration of medication, etc.)

(4)any other purposes that pose a direct threat to human life

Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp., its affiliated companies and their officers, directors, and employees against any and all damages arising out of such applications.

9.You should use the products described herein within the range specified by Renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges.

10.Although Renesas endeavors to improve the quality and reliability of its products, IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas 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 applicable measures. Among others, since the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you.

11.In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. You should implement safety measures so that Renesas products may not be easily detached from your products. Renesas shall have no liability for damages arising out of such detachment.

12.This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from Renesas.

13.Please contact a Renesas sales office if you have any questions regarding the information contained in this document, Renesas semiconductor products, or if you have any other inquiries.

Introduction

This manual describes the followings

-E8 Emulator functions

-Preparation before use

-Debugger functions

-Tutorial

-Appendix: (Components of the E8 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® and Windows® 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.

 

When this symbol is used, it is always located in the left hand margin.

(The “how to” symbol)

It indicates that the text to its immediate right is describing “how to”

do something.

 

 

 

IMPORTANT

READ FIRST

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 Technology Corp.:

(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 the emulator:

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 emulator:

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 the emulator:

(1)This product is a development supporting unit for use in your program development and evaluation stages. In mass-producing your program you have finished developing, be sure to make a judgment on your own risk that it can be put to practical use by performing integration test, evaluation, or some experiment else.

(2)In no event shall Renesas Solutions Corp. be liable for any consequence arising from the use of this product.

(3)Renesas Solutions Corp. strives to renovate or provide a workaround for product malfunction at some charge or without charge. However, this does not necessarily mean that Renesas Solutions Corp. guarantees the renovation or the provision under any circumstances.

(4)This product has been developed by assuming its use for program development and evaluation in laboratories. Therefore, it does not fall under the application of Electrical Appliance and Material Safety Law and protection against electromagnetic interference when used in Japan.

(5)Renesas Solutions Corp. cannot predict all possible situations or possible cases of misuse where a potential danger exists. Therefore, the warnings written in this user’s manual and the warning labels attached to this emulator do not necessarily cover all of such possible situations or cases. Please be sure to use this emulator correctly and safely on your own responsibility.

(6)This product is not qualified under UL or other safety standards and IEC or other industry standards. This fact must be taken into account when taking this product from Japan to some other country.

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.

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:

Chapters 1 through 6 of the Debugger Part in this user’s manual use R8C/Tiny 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.

Precautions for Safety

READ FIRST

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.

DEFINITION OF SIGNAL WORDS

Be sure to read and understand the warnings below before using this emulator. Note that these are the main warnings, not the complete list.

This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.

DANGER DANGER indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury.

WARNING

CAUTION

CAUTION

WARNING indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury.

CAUTION indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury.

CAUTION used without the safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in property damage.

NOTE emphasizes essential information.

WARNING

1.Do not repair or remodel the emulator product by yourself for electric shock prevention and quality assurance.

2.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 or will result in PERSONAL INJURY. The USER PROGRAM will be LOST.

3.Connect the connectors in the user system and in the user interface cable by confirming the correct direction.

CAUTION

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.

Contents

Section 1 Overview...........................................................................................

1

1.1

Warnings ...........................................................................................................................

3

1.2

Environmental Conditions ................................................................................................

4

1.3

Components ......................................................................................................................

5

Section 2 E8 Emulator Functions .....................................................................

7

2.1

Overview..............................................................................................................................

7

2.2

Trace Functions....................................................................................................................

9

2.3

Break Functions ...................................................................................................................

10

2.4

Memory Access Functions...................................................................................................

11

2.5

Stack Trace Function ...........................................................................................................

12

2.6

Online Help..........................................................................................................................

12

Section 3 Preparation before Use......................................................................

13

3.1

Emulator Preparation ...........................................................................................................

13

3.2

Emulator Hardware Configuration.......................................................................................

15

3.3

Emulator Software Configuration........................................................................................

19

 

3.3.1 CD ..........................................................................................................................

19

3.4

Installing Emulator’s Debugger...........................................................................................

20

3.5

Connecting the Emulator to the Host Computer ..................................................................

21

3.6

Connecting the Emulator to the User System ......................................................................

23

3.7

Connecting System Ground .................................................................................................

25

3.8

System Check ......................................................................................................................

26

3.9

Uninstalling the Emulator’s Debugger ................................................................................

35

Section 4 Preparations for Debugging ..............................................................

39

4.1

Method for Activating High-performance Embedded Workshop.....................................

39

 

4.1.1 Creating the New Workspace (Toolchain Not Used)...........................................

40

 

4.1.2 Creating the New Workspace (Toolchain Used)..................................................

44

 

4.1.3 Selecting an Existing Workspace.........................................................................

56

4.2

Setting at E8 Emulator Activation ....................................................................................

58

 

4.2.1 Setting at Emulator Activation.............................................................................

58

 

4.2.2 Downloading a Program ......................................................................................

60

 

4.2.3 Setting the Writing Flash Memory Mode ............................................................

61

Section 5 Debugging.........................................................................................

71

5.1 Setting the Environment for Emulation ............................................................................

71

 

5.1.1

Opening the [Configuration] Dialog Box ............................................................

71

 

5.1.2

[General] Page .....................................................................................................

72

5.2

Downloading a Program ...................................................................................................

74

 

5.2.1

Downloading a Program ......................................................................................

74

 

5.2.2

Viewing the Source Code ....................................................................................

75

5.3

Stopping Your Program ....................................................................................................

78

 

5.3.1

Address Interrupt Breakpoints .............................................................................

78

5.4 Using the Event Points......................................................................................................

79

 

5.4.1

PC Breakpoints ....................................................................................................

79

 

5.4.2

Break Conditions .................................................................................................

79

 

5.4.3

Opening the [Event] Window ..............................................................................

79

 

5.4.4

Setting PC Breakpoints........................................................................................

79

 

5.4.5

Add ......................................................................................................................

80

 

5.4.6

Edit.......................................................................................................................

80

 

5.4.7

Enable ..................................................................................................................

80

 

5.4.8

Disable .................................................................................................................

80

 

5.4.9

Delete...................................................................................................................

80

 

5.4.10

Delete All.............................................................................................................

80

 

5.4.11

Go to Source ........................................................................................................

81

 

5.4.12

[Set Break] Dialog Box........................................................................................

81

 

5.4.13

Setting Break Conditions .....................................................................................

82

 

5.4.14

Edit.......................................................................................................................

83

 

5.4.15

Enable ..................................................................................................................

83

 

5.4.16

Disable .................................................................................................................

84

 

5.4.17

Delete...................................................................................................................

84

 

5.4.18

Delete All.............................................................................................................

84

 

5.4.19

Go to Source ........................................................................................................

84

 

5.4.20

Sequential Conditions ..........................................................................................

84

 

5.4.21

Editing Break Conditions.....................................................................................

84

 

5.4.22

Modifying Break Conditions ...............................................................................

84

 

5.4.23

Enabling Break Conditions ..................................................................................

84

 

5.4.24

Disabling Break Conditions.................................................................................

84

 

5.4.25

Deleting Break Conditions...................................................................................

85

 

5.4.26

Deleting All Break Conditions.............................................................................

85

 

5.4.27

Viewing the Source Line for Break Conditions...................................................

85

 

5.4.28

[Break condition x] Dialog Box...........................................................................

85

5.5 Viewing the Trace Information.........................................................................................

87

 

5.5.1

Opening the [Trace] Window ..............................................................................

87

 

5.5.2

Acquiring Trace Information ...............................................................................

87

 

5.5.3

Clearing the Trace Information............................................................................

88

 

5.5.4

Saving the Trace Information in a File ................................................................

88

 

5.5.5

Viewing the [Source] Window ............................................................................

88

 

5.5.6

Trimming the Source ...........................................................................................

88

5.6 Using the Start/Stop Function................................................................................................

89

5.6.1 Opening the [Start/Stop Function Setting] Dialog Box........................................

89

5.6.2

Specifying the Routine to be Executed ................................................................

89

5.6.3

Restrictions on the Start/Stop Function................................................................

91

Section 6 Tutorial..............................................................................................

93

6.1

 

Introduction..........................................................................................................................

93

6.2

Running the High-performance Embedded Workshop........................................................

94

6.3

Setting up the E8 Emulator..................................................................................................

94

6.4

Setting the [Configuration] Dialog Box...............................................................................

95

6.5

Checking the Operation of RAM.........................................................................................

97

6.6

Downloading the Tutorial Program .....................................................................................

99

 

 

6.6.1 Downloading the Tutorial Program........................................................................

99

 

 

6.6.2 Displaying the Source Program..............................................................................

100

6.7

Setting a PC Breakpoint.......................................................................................................

101

6.8

 

Setting Registers ..................................................................................................................

102

6.9

 

Executing the Program.........................................................................................................

104

6.10

Reviewing Breakpoints......................................................................................................

107

6.11

Viewing Memory...............................................................................................................

108

6.12

Watching Variables............................................................................................................

109

6.13

Stepping Through a Program .............................................................................................

112

 

 

6.13.1 Executing [Step In] Command.............................................................................

112

 

 

6.13.2 Executing [Step Out] Command ..........................................................................

113

 

 

6.13.3 Executing [Step Over] Command ........................................................................

114

6.14

Forced Breaking of Program Executions ...........................................................................

115

6.15

Displaying Local Variables................................................................................................

116

6.16

Break Function...................................................................................................................

117

 

 

6.16.1

PC Break Function ...............................................................................................

117

6.17

Hardware Break Function..................................................................................................

121

6.18

Trace Functions..................................................................................................................

124

 

 

6.18.1 Displaying the Trace Window..............................................................................

124

6.19

Stack Trace Function .........................................................................................................

125

6.20

What Next? ........................................................................................................................

127

Appendix A Components of the E8 Emulator ..................................................

129

Appendix B

Window Functions........................................................................

131

Appendix C

Command-Line Functions ............................................................

135

Appendix D Notes on High-performance Embedded Workshop .....................

137

Appendix E Diagnostic Hardware Program .....................................................

143

E.1.

System Setup to Execute the Check Program ...................................................................

143

E.2.

Executing the Check Program...........................................................................................

143

E.3

When an Error Occurs.......................................................................................................

145

Section 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 E8 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 shows the system configuration using the emulator.

Figure 1.1 System Configuration with the Emulator

1

The emulator has three activation modes:

(1)A mode in which the emulator program is started after it has been downloaded to the target device:

This mode is used when there is no emulator program in the flash memory of the target device.

(2)A mode in which the emulator program is started without downloading it to the target device: This mode is used when there is an emulator program in the flash memory of the target device.

(3)A mode in which the emulator is used as the flash memory programmer:

This mode is used when the emulator is used for programming the flash memory.

The emulator provides the following features:

(1)Excellent cost-performance card emulator Compactness and USB connection are obtained.

(2)Realtime emulation

Realtime emulation of the user system is enabled at the maximum operating frequency of the MCU.

(3)Excellent operability

Using the High-performance Embedded Workshop on the Microsoft® Windows® 2000, or Microsoft® Windows® XP operating system enables user program debugging using a pointing device such as a mouse.

(4)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.

(5)Debugging of the user system in the final development stage

The user system can be debugged under conditions similar to the actual application conditions.

(6)Compact debugging environment

A laptop computer can be used as a host computer, creating a debugging environment in any place.

(7)The emulator can be used to program the internal flash memory.

2

1.1Warnings

CAUTION

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 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.

3

1.2Environmental Conditions

CAUTION

Observe the conditions listed in tables 1.1 and 1.2 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.

 

Transportation: 14.7 m/s2 max.

Ambient gases

No corrosive gases may be present

 

 

 

Table 1.2 Operating Environments

Item

Description

Host computer

IBM PC or compatible machine with built-in Pentium® III or higher-

 

performance CPU (600 MHz or higher recommended)

 

 

OS

Windows® 2000, or Windows® XP

Minimum memory

128 Mbytes or more (double of the load module size)

capacity

 

 

 

Hard-disk capacity

Installation disk capacity: 100 Mbytes or more. (Prepare an area at

 

least double the memory capacity (four-times or more recommended)

 

as the swap area.)

 

 

Interface

USB (USB1.1, full-speed)*

 

 

Pointing device such as

Connectable to the host computer; compatible with Windows® 2000 or

mouse

Windows® XP.

Power voltage

5.0 ± 0.25 V (USB-bus power type)

 

 

Current consumption

500 mA (max)

 

 

CD drive

Required to install the software for the emulator or refer to the emulator

 

user’s manual.

*Can be connected to a host machine supporting USB 2.0.

*Not all hardware (such as host machine, USB devices, USB hub) combination will work and guaranteed.

4

1.3Components

Check all the components unpacking. For details on the E8 emulator components, refer to the component list provided at the side of the component box. If the components are not complete, contact our E-mail address for user registration or refer to the web site.

5

6

Section 2 E8 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

No.

Item

 

Function

1

User program execution

Executes a program with the operating frequency within a

 

function

 

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)

 

 

 

 

2

Reset function

Issues a reset from the High-performance Embedded

 

 

 

Workshop to the device during break.

 

 

 

 

3

Trace function

Branch trace function incorporated in the device (four

 

 

 

branches)

 

 

 

The support of this function depends on a device.

 

 

 

 

4

Break functions

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

 

 

 

 

7

Table 2.1 Emulator Functions (cont)

No.

Item

 

Function

5

Memory access 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

 

 

 

6

General/control register

Reads or writes the general/control register.

 

access function

 

 

 

 

 

7

Internal I/O register

Reads or writes the internal I/O register.

 

access function

 

 

 

 

 

8

Source-level debugging

Various source-level debugging functions.

 

function

 

 

 

 

 

9

Command line function

Supports command input.

 

 

Batch processing is enabled when a file is created by arranging

 

 

commands in input order.

10

Help function

Describes the usage of each function or command syntax input

 

 

from the command line window.

 

 

 

 

The specific functions of the emulator are described in the next section.

8

2.2 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.

9

2.3 Break Functions

The E8 emulator has the following four break functions.

(1)Hardware break function H8 R8C series

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.

10

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.

(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 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 High-performance Embedded Workshop User’s Manual.

11

(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.

2.5Stack 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 series 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.6Online 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.

12

Section 3 Preparation before Use

3.1 Emulator Preparation

Unpack the emulator and prepare it for use as follows:

WARNING

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Unpack the emulator

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check the components against the component

 

 

 

 

 

 

 

 

List provided at the side of the component box .

 

 

 

 

When the emulator

 

 

 

 

 

 

 

 

 

 

is used first.

 

 

 

 

 

 

 

 

 

 

 

 

 

Set up the emulator

 

Section 3

 

 

 

 

 

 

-

Install the Highperformance Embedded

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Workshop

 

 

 

 

 

 

 

 

-

Insert the emulator

 

 

 

 

 

 

 

 

- Set up the main unit of the emulator

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Start the Highperformance Embedded

 

Section 4

 

 

 

 

 

 

 

Workshop

 

 

 

When the emulator

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

is used for second

 

 

 

 

Turn on the user system

 

 

 

 

time or later.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Figure 3.1 Emulator Preparation Flow Chart

13

14

3.2 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

15

The names of each section of the emulator are explained next.

Emulator Upper-side Panel:

(d)

(a)

(e)

 

 

(c)

(b)

 

 

 

 

 

 

 

 

 

Figure 3.3 Emulator Upper-side Panel

(a)

E8 logo plate:

A pink plate dedicated for the emulator is provided to be easily

 

 

distinguished from other E-series emulators.

(b)

Sliding switch cover:

A cover to protect a switch for setting the emulator, which is closed

 

 

to prevent incorrect operation. Be sure to close this cover during

 

 

emulation.

 

(c)

ACTION LED:

Marked ‘ACT’. When this LED is lit, the E8 control software is in

 

 

operation.

 

(d)

Host connector:

Marked ‘

 

’. A connector for the host computer is provided at the

 

 

 

side of this mark.

(e)

User connector:

Marked ‘USER I/F’. A connector for the user system interface cable

 

 

is provided at the side of this mark.

Note: Even if the LED is not lit when the emulator is connected to the host computer, the USB is not malfunctioned.

16

Emulator Host-side Panel:

(a)

Figure 3.4 Emulator Host-side Panel

(a)Host-side connector: A USB connector for the host computer. Be sure to connect the

provided USB cable.

Emulator User-side Panel:

(a)

Figure 3.5 Emulator User-side Panel

(a) User-side connector: A user system interface cable is connected.

17

Emulator Bottom Panel:

(a)

Figure 3.6 Emulator Bottom Panel

(a) Seal for product management: The serial number, revision, and safety standard, etc. of the emulator are written to. The contents differ depending on the time when you purchased the product.

18

3.3 Emulator Software Configuration

The following item is included with the emulator debugger when it is purchased:

E8 Emulator Debugger: R0E000080KCE00SR (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

E8 emulator driver

The E8 emulator drivers.

 

 

 

E8SCP

Self check program for the E8

Diagnostic test program for the E8 emulator.

 

emulator

 

 

 

 

Help

Online help for the E8 emulator

An online help file

 

 

 

Manuals

E8 emulator manual

E8 emulator user’s manual. This is provided

 

 

as a PDF file.

 

 

 

19

3.4 Installing Emulator’s Debugger

When the CD is inserted in the host computer’s CD drive, execute Setup.exe from the root directory of the CD.

20

3.5 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

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.

21

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.7 shows the system configuration.

Figure 3.7 System Configuration when Connecting the Emulator to the Host Computer

22

3.6 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-side connector of the emulator.

Figure 3.8 shows the position of the connector.

Connector for user system interface cable

Figure 3.8 Position of the Connector

(1)The connector must be installed to 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 used, do not install any components within 3 mm of the connector.

23

(2)The pin assignments of the connector are shown in section 2 in the additional documents, Notes on Connecting the xxxxx.

Figure 3.9 Connecting the User System Interface Cable to the User System

Notes: 1. To connect the signals output from the connector, refer to the MCU pin alignment.

2.To remove the user system interface cable from the user system, pull the tab on the connector upward.

3.The range of frequencies that the emulator operates at is different according to the MCUs used.

4.Connect the signals from the connector as shown in section 2 in the additional documents, Notes on Connecting the xxxxx.

24

3.7 Connecting System Ground

WARNING

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

E7E8eemulator

Signal

User system

 

 

Signal

 

 

Logic

Logic

Host

USB

 

 

computer

 

 

 

 

 

 

 

Signal ground

Signal ground

 

Power

 

 

 

supply

 

 

 

 

 

Frame ground

Figure 3.10 Connecting System Ground

25

3.8 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.Connect the emulator to the host computer.

2.Connect the user system interface cable to the connector of the emulator.

3.Connect the user system interface cable to the connector in the user system.

4.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:

[Open a recent project workspace] radio button:

[Browse to another project workspace] radio button:

Creates a new workspace.

Uses the current workspace and displays the history of the opened workspace.

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.

26

When the [Open workspace] dialog box is opened, specify the following directory: <OS installation directory>

\WorkSpace\Tutorial\E8\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.

zM32C

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\M32C\Tutorial

zR16C

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\M16C\Tutorial

zR8C/Tiny

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\R8C\Tutorial

zH8/Tiny normal mode

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\H8\Tutorial

zH8/Tiny advanced mode

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\H8\TutorialADV

zH8/ Super Low Power

Drive where the OS has been installed: \WorkSpace\Tutorial\E8\H8\TutorialSLP

27

6. The [Select Emulator mode] 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.

28

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.

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

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.

29

7.The [Connecting] dialog box is displayed and the emulator connection is started.

Figure 3.14 [Connecting] Dialog Box

8.When the version of the E8 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 E8 firmware download

Note: When [OK] button is clicked, it starts downloading the E8 firmware. Do not connect/disconnect the USB cable until the download status dialog box closes.

30

9.When [Power supply is carried out. (MAX 300mA)] is not checked, the dialog box shown in Figure 3.17 will be displayed.

Figure 3.16 Dialog Box of the Power-on Request Message

10. The dialog box for confirming the power supply status of the user system will be displayed.

Figure 3.17 [Power Supply] Dialog Box

When [Power supply is carried out. (MAX 300mA)] is checked, 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

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.

31

11.When [Power supply is carried out. (MAX 300mA)] is not checked, power on the user system and click the [OK] button.

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.

32

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

33

(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

34

+ 114 hidden pages