Renesas H8S Series User Manual
Renesas H8S Series User Manual

Renesas H8S Series User Manual

Emulator
Hide thumbs Also See for H8S Series:
Table of Contents

Advertisement

Quick Links

H8S, H8SX Family E10A-USB Emulator
User's Manual
(HS0005KCU01H, HS0005KCU02H)
H8S, H8SX Family E10A-USB
HS0005KCU01HE-H8S
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).
Rev. 14.01 Mar. 2016
www.renesas.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the H8S Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Renesas H8S Series

  • Page 1 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).
  • Page 2 Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products. 11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics.
  • Page 3: Regulatory Compliance Notices

    Name: Renesas Electronics Corporation Address: Toyosu Foresia, 3-2-24, Toyosu, Koto-ku, Tokyo, 135-0061, Japan • Manufacturer Name: Renesas System Design Co.,Ltd. Address: 5-20-1, Josuihon-cho, Kodaira-shi, Tokyo 187-8588, Japan • Person responsible for placing on the market Name: Renesas Electronics Europe GmbH...
  • Page 4: Fcc Certifications

     United States Regulatory notices This product complies with the following EMC regulation. (This is only valid in the United States.) FCC Certifications: 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.
  • Page 5: Read First

    Renesas sales company. Such use includes, but is not limited to, use in life support systems. Buyers of this emulator product must notify the relevant Renesas sales offices before planning to use the product in such applications.
  • Page 6: Limited Warranty

    Renesas, upon inspection, shall determine to be defective in material and/or workmanship. The foregoing shall constitute the sole remedy for any breach of Renesas’ warranty. See the Renesas warranty booklet for details on the warranty period. This warranty extends only to you, the original Purchaser.
  • Page 7 All Rights Reserved: This user's manual and emulator product are copyrighted and all rights are reserved by Renesas. No part of this user's manual, all or part, may be reproduced or duplicated in any form, in hard- copy or machine-readable form, by any means available without Renesas’ prior written consent.
  • Page 8: Definition Of Signal Words

    SAFETY PAGE READ FIRST • READ this user's manual before using this emulator product. • KEEP the user's manual handy for future reference. Do not attempt to use the emulator product until you fully understand its mechanism. DEFINITION OF SIGNAL WORDS This is the safety alert symbol.
  • Page 9 WEEE must be treated, recycled and disposed of in an environmentally sound manner. Renesas Electronics Europe GmbH can take back end of life equipment, register for this service at “ http://www.renesas.eu/weee ”.
  • Page 10 Warnings on Emulator Usage Be sure to read and understand the warnings below before using this emulator. Note that these are the main warnings, not the complete list. WARNING 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.
  • Page 11 Introduction The High-performance Embedded Workshop is a powerful development environment for embedded applications targeted at Renesas microcontrollers. The main features are:  A configurable build engine that allows you to set-up compiler, assembler and linker options via an easy to use interface.
  • Page 12: About This Manual

    About This Manual This manual describes preparation before using the emulator, emulator functions, debugging functions specific to the emulator, tutorial, and emulator's hardware and software specifications. Refer to the High-performance Embedded Workshop User's Manual for details on the information on the basic usage of the High-performance Embedded Workshop, customization of the environment, build functions, and debugging functions common to each High-performance Embedded Workshop product.
  • Page 13 Table 2 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.
  • Page 14: User Registration

    User Registration When you install debugger software, a text file for user registration is created on your PC. Fill it in and email it to your local distributor. If you have replaced an emulator main unit or emulation probe, rewrite an emulator name and serial number in the text file you filled in earlier to register your new hardware products.
  • Page 15: Table Of Contents

    Table of Contents Regulatory Compliance Notices ................1 Section 1 Overview ....................1 Warnings ..........................3 Environmental Conditions ..................... 4 Components ........................... 5 Section 2 Emulator Functions .................. 7 Overview ..........................7 Trace Functions ........................9 2.2.1 Branch Trace Function ....................9 Break Function ........................
  • Page 16 4.3.2 Adding and Removing Sessions ................78 4.3.3 Saving Session Information ..................81 Connecting the Emulator ..................... 82 Reconnecting the Emulator ....................83 Ending the Emulator ......................84 Section 5 Debugging ....................85 Setting the Environment for Emulation ................85 5.1.1 Opening the [Configuration] Dialog Box ..............
  • Page 17 5.3.28 [Break condition 1] Dialog Box ................105 Viewing the Trace Information ..................110 5.4.1 Opening the [Trace] Window .................. 110 5.4.2 Acquiring Trace Information .................. 110 5.4.3 Clearing the Trace Information ................111 5.4.4 Saving the Trace Information in a File ..............111 5.4.5 Viewing the [Editor] Window .................
  • Page 18 6.19 Stack Trace Function ......................156 6.20 What Next? ........................157 Section 7 Maintenance and Guarantee ..............159 User Registration ....................... 159 Maintenance ........................159 Guarantee ........................... 159 Repair Provisions ....................... 160 7.4.1 Repair with Extra-Charge ..................160 7.4.2 Replacement with Extra-Charge ................160 7.4.3 Expiration of the Repair Period ................
  • Page 19: Regulatory Compliance Notices

    Section 1 Overview The E10A-USB emulator (hereafter referred to as the emulator) is a support tool for developing application systems to run on Renesas original microcomputers. The main unit of the emulator is connected, through the dedicated debugging interface, to the user system.
  • Page 20 H8S, H8SX Family E10A-USB Emulator Section 1 Overview The emulator provides the following features:  Excellent cost-performance emulator Compactness and connection to the USB are obtained.  Realtime emulation Realtime emulation of the user system is enabled at the maximum operating frequency of the CPU.
  • Page 21: Warnings

    H8S, H8SX Family E10A-USB Emulator Section 1 Overview Warnings 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 after unpacking the emulator. 2.
  • Page 22: Environmental Conditions

    H8S, H8SX Family E10A-USB Emulator Section 1 Overview Environmental 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.
  • Page 23: Components

    1.1 in the additional document, Supplementary Information on Using the H8S/xxxx and Supplementary Information on Using the H8SX/xxxx. If all of the components are not present, contact your nearest Renesas sales office. R20UT0869EJ1401 Rev. 14.01 Page 5 of 182 Mar.
  • Page 24 H8S, H8SX Family E10A-USB Emulator Section 1 Overview R20UT0869EJ1401 Rev. 14.01 Page 6 of 182 Mar. 25, 2016...
  • Page 25: Section 2 Emulator Functions

    H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions Section 2 Emulator Functions This section describes the emulator functions. They differ according to the device supported by the emulator. For the usage of each function, refer to section 6, Tutorial. Overview Table 2.1 gives a functional overview of the emulator.
  • Page 26 H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions Table 2.1 Emulator Functions (cont) Item Function  Memory access functions Downloading to RAM  Downloading to flash memory  Single-line assembly  Reverse assembly (disassembly)  Reading of memory  Writing to memory ...
  • Page 27: Trace Functions

    H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions Trace Functions The emulator has a trace function. Note: The number of branch instructions that can be acquired by a trace differs according to the product. For the number that can be specified for each product, refer to the online help. 2.2.1 Branch Trace Function The branch source addresses, mnemonics, operands, and source lines are displayed.
  • Page 28: Memory Access Functions

    H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions 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. Since there is no cache in the emulator, read cycles are always generated.
  • Page 29: Stack Trace Function

    H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions (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 For details, refer to the online help.
  • Page 30 H8S, H8SX Family E10A-USB Emulator Section 2 Emulator Functions R20UT0869EJ1401 Rev. 14.01 Page 12 of 182 Mar. 25, 2016...
  • Page 31: Section 3 Preparation Before Use

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Section 3 Preparation before Use 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.
  • Page 32: Emulator Hardware Configuration

    H8S, H8SX Family E10A-USB Emulator Section 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.
  • Page 33 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use The names of each section of the emulator are explained next. Emulator Top View: Figure 3.3 Emulator Top View (a) E10A-USB logo plate: A yellow plate (for HS0005KCU01H) or a red plate (for HS0005KCU02H) dedicated for the emulator is provided to be easily distinguished from other E-series emulators.
  • Page 34 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Figure 3.4 Emulator Host-side View (a) Host-side connector: A USB connector for the host computer. Be sure to connect the provided USB cable. R20UT0869EJ1401 Rev. 14.01 Page 16 of 182 Mar.
  • Page 35 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Emulator User-side View: Figure 3.5 Emulator User-side View (a) User-side connector: A user system interface cable is connected. R20UT0869EJ1401 Rev. 14.01 Page 17 of 182 Mar. 25, 2016...
  • Page 36 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Emulator Bottom View: MODEL : HS0005KCU01H (HS0005KCU01H) SERIAL No. : 00001A This device complies with Part 15 of the FCC Rules. Operation is subject to the follow ing 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.
  • Page 37: Cd-R

    XP, a warning message on the Windows logo test may be displayed, but it is not a problem. Select [Continue Anyway] to proceed with driver installation. Download the latest version of “Renesas E-Series USB driver” from the following URL and install the USB driver. http://www.renesas.com/products/tools/emulation_debugging/onchip_debuggers/e10ausb/ downloads.jsp R20UT0869EJ1401 Rev.
  • Page 38: Connecting The Emulator To The Host Computer

    H8S, H8SX Family E10A-USB Emulator Section 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. Note: Be sure to install the software for the emulator before putting the emulator in place.
  • Page 39 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 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 R20UT0869EJ1401 Rev.
  • Page 40: Connecting The Emulator To The User System

    H8S, H8SX Family E10A-USB Emulator Section 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.
  • Page 41 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (1) The user system connector must be installed to the user system. Table 3.2 shows the recommended user system connector for the emulator. Table 3.2 Recommended User System Connector Connector Type Number Manufacturer Specifications...
  • Page 42 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Notes: 1. Connection of the signals differs depending on the package. For details, refer to the MCU pin assignments. 2. To remove the 14-pin type user system interface cable from the user system, pull the tab on the connector upward.
  • Page 43: Connecting System Ground

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 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.
  • Page 44: Setting The Dip Switches

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Setting the DIP Switches WARNING Do not change switches (SW2 and SW3) while the emulator and the user sytem are turned on. The changing of switches (SW2 and SW3) will result in a FIRE HAZARD and will damage the user system and the emulator product.
  • Page 45 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Table 3.3 shows the relationships between settings and functions of DIP switches 1 to 3. Use the settings depending on the usage of the user system. CAUTION Use only the settings shown in table 3.3. Use of other settings will not activate the emulator.
  • Page 46: Interface Circuits In The Emulator

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Interface Circuits in the Emulator Figure 3.12 shows interface circuits in the emulator. Use them as a reference to determine the value of the pull-up resistance. Note: The 74LVC2G125 operates at VCC (1.8 to 5.0 V) from the user system connector. 3.3 V User system connector Emulator control circuit...
  • Page 47: Setting Up The Emulator

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 3.10 Setting up the Emulator Set up the emulator’s firmware using the following procedures. Here describes how to set up the H8S device group. Note: Only one device group can be set up using the setup tool when the emulator is purchased. Be sure to check the device group you have selected on the label for product management attached to the back of the emulator box.
  • Page 48: Setting Up At Purchasing The Emulator Or Updating The Version Of Software

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 3.10.1 Setting up at Purchasing the Emulator or Updating the Version of Software Note: If you are using the HS0005KCU01H (serial No.: 03311C or later) or HS0005KCU02H (serial No.: 04146E or later) emulator hardware, the below procedure may not be required; follow the procedure only when the dialog box shown in figure 3.13 or 3.14 is displayed by using the procedure described in section 3.11, System Check.
  • Page 49 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (2) Select [Renesas] -> [High-performance Embedded Workshop] -> [Setup tool for E10A-USB Emulator] -> [H8S/xxxx Device Group] from [Programs] in the [Start] menu. A tool for setting up the emulator is activated.
  • Page 50 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Notes: 1. If the version numbers shown in (b) and (c) are the same, setup of the emulator is not required. Setup the emulator only when “-.-.--.---“ is shown in (b) or the version number of (b) is older than that of (c).
  • Page 51 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (4) Turn the setup switch (SW1) to ‘0’, connect the USB cable again, and click the [OK] button. Setting up the emulator’s firmware is started. Notes: 1. If the following dialog message is displayed, insert the USB cable again. Figure 3.20 [Setup tool for H8S E10A-USB Emulator] Dialog Box (3) 2.
  • Page 52 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (5) When the following dialog box is displayed, setting up the emulator is completed. Figure 3.22 Message for Completion of Setting up the Emulator When setting up the emulator has been completed, the following message will be displayed. Turn the setup switch (SW1) to ‘1’, connect the USB cable again, and click the [OK] button.
  • Page 53: Setting Up The Emulator By Using The License Tool To Add A Device Group

    H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 3.10.2 Setting up the Emulator by Using the License Tool to Add a Device Group In the license tool, the emulator for the current product group can be used for debugging another product group (device group such as SHxxxx Device Group, H8S Device Group, or H8SX Device Group that is supported by the emulator).
  • Page 54 1. Open the sliding switch cover and check that the switch (SW1) for setting the emulator is turned to ‘1’. 2. Select [Renesas] -> [License tool for E10A-USB] -> [H8S Device Group] from [Programs] in the [Start] menu. This starts up the license tool to add a device group to the emulator.
  • Page 55 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Notes: 1. If the version numbers shown in (b) and (c) are the same, setup of the emulator is not required. Set up the emulator only when “-.-.--.---“ is shown in (b) or the version number of (b) is older than that of (c).
  • Page 56 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use Setting up the emulator’s control software is started. Notes: 1. If the following dialog message is displayed, insert the USB cable again. Figure 3.28 [License tool for H8S E10A-USB Emulator] Dialog Box 2.
  • Page 57 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use When the following dialog box is displayed, setting up the emulator is completed. Figure 3.30 Message for Completion of Setting up the Emulator When setting up the emulator has been completed, the following message will be displayed. Turn the setup switch (SW1) to ‘1’, connect the USB cable again, and click the [OK] button.
  • Page 58: System Check

    2. Connect the user system interface cable to the connector of the emulator. 3. Connect the user system interface cable to the user system connector. 4. Select [Renesas] -> [High-performance Embedded Workshop] -> [High-performance Embedded Workshop] from [Programs] in the [Start] menu.
  • Page 59 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 5. The [Welcome!] dialog box is displayed. Figure 3.33 [Welcome!] Dialog Box [Create a new project workspace] radio button: Creates a new workspace. [Open a recent project workspace] radio button: Uses an existing workspace and displays the history of the opened workspace.
  • Page 60 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use After the directory has been specified, select the following file and click the [Open] button. Figure 3.34 [Open Workspace] Dialog Box R20UT0869EJ1401 Rev. 14.01 Page 42 of 182 Mar. 25, 2016...
  • Page 61 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 6. The [Select Emulator mode] dialog box is displayed. Figure 3.35 [Select Emulator mode] Dialog Box Select the MCU name in use from the [Device] drop-down list box. The following items are selected in the [Mode] group box.
  • Page 62 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 7. The [Connecting] dialog box is displayed and the emulator connection is started. Figure 3.36 [Connecting] Dialog Box R20UT0869EJ1401 Rev. 14.01 Page 44 of 182 Mar. 25, 2016...
  • Page 63 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 8. The dialog box shown in figure 3.37 is displayed if no product groups have been installed in the emulator at the time of purchase or if the H8S or H8SX license has been installed in the emulator but the emulator firmware has been set up for a different device group.
  • Page 64 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 9. The dialog box is displayed as shown in figure 3.39 or figure 3.40. Figure 3.39 [Turn Power on] Message Box Figure 3.40 Dialog Box of the Power-on Request Message 10.
  • Page 65 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 12. Set an eight-digit hexadecimal ID code as a security code for the flash memory. To read the data that has been written to the internal flash memory, input this ID code when the [E10A- USB Emulator] is selected in the [Select Emulator mode] dialog box and the [New ID code] check box is unselected on activating the emulator.
  • Page 66 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 13. When "Connected" is displayed in the [Output] window of the High-performance Embedded Workshop, the emulator initiation is completed. Figure 3.43 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.
  • Page 67 H8S, H8SX Family E10A-USB Emulator Section 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.44 [Cable disconnected from connector] Dialog Box 2.
  • Page 68 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (b) The following dialog box is displayed when an incorrect ID code has been input. For security, the flash memory is completely erased. Figure 3.46 [ID code error!] Dialog Box (c) The following dialog box is displayed when the MCU cannot communicate with the emulator.
  • Page 69 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use (e) If the following dialog box is displayed, the version of the firmware in the emulator may be old. Set up the firmware by using the setup tool. For the usage of the setup tool, refer to section 3.10, Setting up the Emulator.
  • Page 70 H8S, H8SX Family E10A-USB Emulator Section 3 Preparation before Use 3. If an incorrect driver has been selected, the following dialog box will appear. Figure 3.52 [Driver Communications error] Dialog Box Figure 3.53 [Driver Communications error] Dialog Box R20UT0869EJ1401 Rev. 14.01 Page 52 of 182 Mar.
  • Page 71: Section 4 Preparations For Debugging

    To activate the High-performance Embedded Workshop, follow the procedure listed below. 1. Connect the emulator to the host computer and the user system, then turn on the user system. 2. Select [High-performance Embedded Workshop] from [Renesas High-performance Embedded Workshop] of [Programs] in the [Start] menu.
  • Page 72: Creating The New Workspace (Toolchain Not Used)

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 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 ...
  • Page 73 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 2. The Project Generator is started. In this section, we omit description of the settings 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.
  • Page 74 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 3. The following dialog box is displayed. Figure 4.4 [Debugger Target] Dialog Box Check [H8S/xxxx E10A-USB SYSTEM] and click the [Next] button. R20UT0869EJ1401 Rev. 14.01 Page 56 of 182 Mar. 25, 2016...
  • Page 75 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4. Set the configuration file name. The configuration file saves the state of High-performance Embedded Workshop except for the emulator. Figure 4.5 [Debugger Options] Dialog Box This is the end of the emulator setting. Click the [Finish] button to exit the Project Generator.
  • Page 76: Creating The New Workspace (Toolchain Used)

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4.1.2 Creating the New Workspace (Toolchain 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.
  • Page 77 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 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: Enter the new workspace name. Here, for example, enter ‘test’.
  • Page 78 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 3. Make the required setting for the toolchain. When the setting has been completed, the following dialog box is displayed. Figure 4.8 [New Project -7/9- Setting the Target System for Debugging] Dialog Box Check [H8S/xxxx E10A-USB SYSTEM] and click the [Next] button.
  • Page 79 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4. Set the configuration file name. The configuration file saves the state of High-performance Embedded Workshop except for the emulator. Figure 4.9 [New Project -8/9- Setting the Debugger Options] Dialog Box This is the end of the emulator setting.
  • Page 80 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 5. 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.
  • Page 81 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging Figure 4.10 Selecting the Session File In the list box that is circled in figure 4.10, select the session file name including the character string that has been set in the [Target name] text box in figure 4.9, [New Project -8/9- Setting the Debugger Options] dialog box.
  • Page 82: Selecting An Existing Workspace

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4.1.3 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.
  • Page 83 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 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.12 [Open Workspace] Dialog Box Note: In figure 4.12, ‘xxxx’...
  • Page 84: Setting At Emulator Activation

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging Setting at Emulator Activation 4.2.1 Setting at Emulator Activation A batch file of commands can be specified for automatic execution when the emulator is activated. It is also possible to register multiple load modules to be downloaded. The registered load modules are displayed on the workspace window.
  • Page 85 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4. Click the [Options] tab. Figure 4.14 [Debug Settings] Dialog Box ([Options] Page) The command batch file that is automatically executed at the specified timing is registered. The following four timings can be specified: ...
  • Page 86: Downloading A Program

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4.2.2 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.
  • Page 87: Setting The Program Flash Mode

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4.2.3 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.
  • Page 88 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (b) Select the target MCU and click the [Finish] button. Figure 4.17 [Setting the Target System for Debugging] Dialog Box (c) The [Select Emulator mode] dialog box is displayed. Figure 4.18 [Select Emulator mode] Dialog Box Select the [Program Flash] mode.
  • Page 89 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (d) If the dialog box shown below is displayed, turn on the target board and press the [OK] button. Figure 4.19 [Turn Power on] Message Box Figure 4.20 Dialog Box of the Reset Request Message (e) Input the system clock value.
  • Page 90 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (f) Select [Debug Setting] from the [Debug] menu. Figure 4.22 High-performance Embedded Workshop Window R20UT0869EJ1401 Rev. 14.01 Page 72 of 182 Mar. 25, 2016...
  • Page 91 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (g) Select the download module with the [Add…] button. Figure 4.23 [Debug Settings] Dialog Box ([Target] Page) R20UT0869EJ1401 Rev. 14.01 Page 73 of 182 Mar. 25, 2016...
  • Page 92 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (h) The download file is displayed on [Projects]. Figure 4.24 [Workspace] Window ([Projects]) (i) Select and download the file with the right-hand mouse button. Figure 4.25 Download Menu of the [Workspace] Window ([Projects]) R20UT0869EJ1401 Rev.
  • Page 93 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging (j) The dialog box for sum checking is displayed and programming is completed. Checksum is a value that data in the internal ROM area has been added by byte. If no user program exists, the value is calculated by H’FF.
  • Page 94: Debug Sessions

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging Debug Sessions The High-performance Embedded Workshop stores all of your builder options into a configuration. In a similar way, the High-performance Embedded Workshop stores your debugger options in a session. The debugging platforms, the programs to be downloaded, and each debugging platform’s options can be stored in a session.
  • Page 95 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging  From the dialog box 1. Select [Debug -> Debug Sessions…]. This will open the [Debug Sessions] dialog box (figure 4.29). Figure 4.29 [Debug Sessions] Dialog Box 2. Select the session you want to use from the [Current session] drop-down list. 3.
  • Page 96: Adding And Removing Sessions

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging 4.3.2 Adding and Removing Sessions A new session can be added by copying settings from another session or removing a session.  To add a new empty session 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.29).
  • Page 97 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging  To import an existing session into a new session file 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.29). 2. Click the [Add…] button to display the [Add new session] dialog box (figure 4.30). 3.
  • Page 98 H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging  To view the session properties 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.29). 2. Select the session you would like to view the properties for. 3.
  • Page 99: Saving Session Information

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging  To save a session with a different name 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.29). 2. Select the session you would like to save. 3.
  • Page 100: Connecting The Emulator

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging Connecting the Emulator Select either of the following two ways to connect the emulator: (1) 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 batch file that is automatically executed at activation.
  • Page 101: Reconnecting The Emulator

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging After the session file name is selected, the emulator will automatically be connected. For details on the session file, refer to section 4.3, Debug Sessions. Reconnecting the Emulator When the emulator is disconnected, use the following way for reconnection: Select [Debug ->...
  • Page 102: Ending The Emulator

    H8S, H8SX Family E10A-USB Emulator Section 4 Preparations for Debugging Ending the Emulator When using the toolchain, the emulator can be exited by using the following two methods:  Canceling the connection of the emulator being activated  Exiting the High-performance Embedded Workshop (1) Canceling the connection of the emulator being activated Select [Disconnect] from the [Debug] menu or click the [Disconnect] toolbar button ( (2) Exiting the High-performance Embedded Workshop...
  • Page 103: Section 5 Debugging

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Section 5 Debugging This section describes the debugging operations and their related windows and dialog boxes. Setting the Environment for Emulation 5.1.1 Opening the [Configuration] Dialog Box Selecting [Options -> Emulator -> System…] or clicking the [Emulator System] toolbar button ) opens the [Configuration] dialog box.
  • Page 104 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging [Device] combo box Displays the MCU name. [Emulation mode] combo box Selects the emulation mode at user program execution.  Normal: Performs normal emulation.  No break: Temporarily disables breakpoint settings and executes user program.
  • Page 105 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging [JTAG clock] combo box Sets the frequency of the JTAG clock. [Flash memory synchronization] Selects whether or not the contents of the flash memory are combo box 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.
  • Page 106 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging [Step Over option] combo box Enables or disables programming of the flash memory while executing step operation.  Programming of the flash memory: Uses a software break for step operation (e.g. Step Over) and enables programming of the flash memory.
  • Page 107 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Notes: 1. This function is supported by the H8SX family. 2. The range of frequency for the JTAG clock differs depending on the supported MCU. 3. The H8S family supports the optional Step Over function. When Step Over is performed after selecting [No Programming of the flash memory] for [Step Over option], the instruction that follows a JSR, BSR, or TRAPA instruction will also be executed.
  • Page 108: Downloading A Program

    H8S, H8SX Family E10A-USB Emulator Section 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).
  • Page 109: Viewing The Source Code

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 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.
  • Page 110 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging In this window, the following items are shown on the left as line information. The first column (Line number column): Source-line information The second column (Source address column): Address information The third column (Event column): Event information (break condition) The fourth column (S/W breakpoint column): PC, bookmark, and breakpoint information Line number column The line number that corresponds to the source file is displayed.
  • Page 111 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging S/W breakpoint column S/W breakpoint column displays the following items: : A bookmark is set. : A breakpoint is set. : PC location To switch off a column in all source files 1.
  • Page 112: Viewing The Assembly-Language Code

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.2.3 Viewing the Assembly-Language Code If there is an address at the cursor position in the [Editor] window, selecting [Go to Disassembly] in the pop-up menu opens the [Disassembly] window. The first address displayed in the [Disassembly] window is the address where the cursor is placed in the [Editor] window.
  • Page 113: Modifying The Assembly-Language Code

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.2.4 Modifying the Assembly-Language Code You can modify the assembly-language code by double-clicking on the instruction that you want to change. The [Assembler] dialog box will be opened. Figure 5.6 [Assembler] Dialog Box The address, instruction code, and mnemonic are displayed.
  • Page 114: Viewing A Specific Address

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.2.5 Viewing a Specific Address When you are viewing your program in the [Disassembly] window, you may wish to look at another area of your program's code. Rather than scrolling through a lot of code in the program, you can go directly to a specific address.
  • Page 115: Using The Event Points

    H8S, H8SX Family E10A-USB Emulator Section 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.3.1 PC Breakpoints When the instruction of the specified address is fetched, the user program is stopped.
  • Page 116: Setting Pc Breakpoints

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.3.4 Setting PC Breakpoints It is possible to display, modify, and add PC breakpoints on the [Breakpoint] sheet. Figure 5.8 [Event] Window ([Breakpoint] Sheet) This window displays and sets the breakpoints. Items that can be displayed in the sheet are listed below.
  • Page 117: Add

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging A popup menu containing the following options is available by right-clicking within the window. 5.3.5 Sets breakpoints. Clicking this item will open the [Set Break] dialog box and break conditions can be specified. 5.3.6 Edit Only enabled when one breakpoint is selected.
  • Page 118: Set Break] Dialog Box

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.3.12 [Set Break] Dialog Box Figure 5.9 [Set Break] Dialog Box This dialog box specifies break conditions. A breakpoint address to be set is specified in the [Address] edit box. The PC register can also be specified such as #PC.
  • Page 119 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Notes on Setting the [Set Break] Dialog Box 1. When an odd address is set, the address is rounded down to an even address. 2. A software break is accomplished by replacing instructions. Accordingly, it can be set only to the flash memory or RAM area.
  • Page 120: Setting Break Conditions

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.3.13 Setting Break Conditions On the [Breakcondition] sheet, the settings for break conditions are displayed, modified, and added. Figure 5.10 [Event] Window ([Breakcondition] Sheet) Note: The items that can be set in this window differ depending on the product. For details on the settings for each product, refer to the online help.
  • Page 121: Edit

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 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: Breaks program execution When a Break condition 1 is double-clicked in this window, the [Break condition 1] dialog box is opened and break conditions can be modified.
  • Page 122: Sequential Conditions

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.3.20 Sequential Conditions Sets the sequential condition of the break channel. Note: This function is set in [Emulation mode] of the [Configuration] dialog box (refer to section 5.1.2, [Emulator] Page). 5.3.21 Editing Break Conditions Handlings for settings other than PC breakpoints and break conditions are common.
  • Page 123: Break Condition 1] Dialog Box

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.3.28 [Break condition 1] Dialog Box Figure 5.11 [Break condition 1] Dialog Box (H8S) 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 MCU. For details on the settings for each MCU, refer to the online help.
  • Page 124 H8S, H8SX Family E10A-USB Emulator Section 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.
  • Page 125 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Figure 5.12 [Break condition 1] Dialog Box (H8SX) 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 MCU. For details on the settings for each MCU, refer to the online help.
  • Page 126 H8S, H8SX Family E10A-USB Emulator Section 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.
  • Page 127 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 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. [Byte] radio button Sets byte data access cycles.
  • Page 128: Viewing The Trace Information

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Viewing the Trace Information For the description on the trace function, refer to section 2.2, Trace Functions. 5.4.1 Opening the [Trace] Window To open the [Trace] window, choose [View -> Code -> Trace] or click the [Trace] toolbar button 5.4.2 Acquiring Trace Information The acquired trace information is displayed in the [Trace] window.
  • Page 129: Clearing The Trace Information

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging This window displays the following trace information items: [PTR] Pointer to a location in the trace buffer (+0 for the last executed instruction) [IP] The amount of acquired trace information [Type] Type of branch: BRANCH: branch source DESTINATION: branch destination [Address]...
  • Page 130: Viewing The [Editor] Window

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.4.5 Viewing the [Editor] Window The [Editor] 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. ...
  • Page 131: Using The Start/Stop Function

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Using the Start/Stop Function The start/stop functions are useful if you wish to control the user system in synchronization with the user program execution being started or stopped. 5.5.1 Opening the [Start/Stop Function Setting] Dialog Box The start/stop functions are useful if you wish to control the user system in synchronization with the user program execution being started or stopped.
  • Page 132: Specifying The Routine To Be Executed

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.5.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.
  • Page 133: Restrictions On The Start/Stop Function

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.5.3 Restrictions on the Start/Stop Function The start/stop function has the following restrictions.  An RTS instruction must be written at the end of the user routine.  The user routine must end. ...
  • Page 134: Operation With Multiple Debugging Platforms

    The High-performance Embedded Workshop is capable of operation with multiple debugging platforms. When selecting [Renesas High-performance Embedded Workshop] -> [High-performance Embedded Workshop] from [Programs] in the [Start] menu to initiate another High-performance Embedded Workshop, two emulators can be used separately for debugging.
  • Page 135 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Select [Renesas E-Series USB Driver] from the [Driver] drop-down list box and open the [Channel] drop-down list box. Channel information for two emulators is displayed in the [Channel] drop-down list box as shown in figure 5.18.
  • Page 136 H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Display example:  E10A-USB: [Cont0] – [Port1] The emulator is connected to port 1 of USB controller 0.  E10A-USB: [Cont4] – [Port7] [Port3] The emulator is connected to general hub port 3 which has been connected to port 7 of USB controller 4 (this is displayed when the USB hub is connected).
  • Page 137: Saving Of Hardware-Break Settings

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging Saving of Hardware-Break Settings 5.7.1 Saving and Loading Hardware-Break Settings This facility allows you to save or load hardware-break settings, i.e. the "Break condition" settings for all channels shown on the [Breakcondition] sheet of the [Eventpoints] window (note that the breakpoints that have been set will not be saved).
  • Page 138: How To Load Hardware-Break Settings

    H8S, H8SX Family E10A-USB Emulator Section 5 Debugging 5.7.3 How to Load Hardware-Break Settings Use the [Load Break condition] dialog box to load hardware-break settings. To open the [Load Break condition] dialog box, select [Setup -> Emulator -> Load Break condition] or click on the [Load Break condition] toolbar button ( Figure 5.20 [Load Break condition] Dialog Box Select a file name from the [File name] combo box.
  • Page 139: Section 6 Tutorial

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial Section 6 Tutorial Introduction This section describes the main functions of the emulator by using a tutorial program. The explanation of the tutorial program will be given in this section using the H8S device. When the H8SX device is used, the displays of some dialog boxes will differ.
  • Page 140: Setting The [Configuration] Dialog Box

    H8S, H8SX Family E10A-USB Emulator Section 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 details on the settings for each product, refer to the online help.
  • Page 141 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial Set options as follows: Table 6.1 [General] Page Options Option Value (Default) Device H8S/xxxx Emulation mode Normal (normal execution) Step option Disables interrupts during single step execution JTAG clock Sets the frequency* of the JTAG clock. Flash memory synchronization when Disable the user program is stopped...
  • Page 142: Checking The Operation Of Ram

    H8S, H8SX Family E10A-USB Emulator Section 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 MCUs. In this case, however, the above way of checking the operation of memory may be inadequate.
  • Page 143 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  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.
  • Page 144: Downloading The Tutorial Program

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 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 ROM area.
  • Page 145: Displaying The Source Program

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.6.2 Displaying the Source Program The High-performance Embedded Workshop allows the user to debug a user program at the source level.  Double-click [tutorial.cpp] under [C++ source file]. Figure 6.5 [Editor] Window (Displaying the Source Program) ...
  • Page 146: Setting A Pc Breakpoint

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial Setting a PC Breakpoint A PC breakpoint is a simple debugging function. The [Editor] 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: ...
  • Page 147: Setting Registers

    H8S, H8SX Family E10A-USB Emulator Section 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.
  • Page 148: Executing The Program

    H8S, H8SX Family E10A-USB Emulator Section 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’...
  • Page 149 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial Figure 6.10 [Editor] Window (Break State) R20UT0869EJ1401 Rev. 14.01 Page 131 of 182 Mar. 25, 2016...
  • Page 150 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 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.
  • Page 151: Reviewing Breakpoints

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.10 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.
  • Page 152: Viewing Memory

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.11 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: ...
  • Page 153: Watching Variables

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.12 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: ...
  • Page 154 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  Click the [Add] button to add a variable to the [Watch] window. Figure 6.16 [Watch] Window (Displaying the Array) R20UT0869EJ1401 Rev. 14.01 Page 136 of 182 Mar. 25, 2016...
  • Page 155 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The user can also add a variable to the [Watch] window by specifying its name.  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.
  • Page 156 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 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) R20UT0869EJ1401 Rev. 14.01 Page 138 of 182 Mar.
  • Page 157: Stepping Through A Program

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.13 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.
  • Page 158 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial Figure 6.21 [Editor] Window (Step In)  The highlighted line moves to the first statement of the sort function in the [Editor] window. R20UT0869EJ1401 Rev. 14.01 Page 140 of 182 Mar. 25, 2016...
  • Page 159: Executing [Step Out] Command

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.13.2 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.
  • Page 160: Executing [Step Over] Command

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.13.3 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.
  • Page 161: Forced Breaking Of Program Executions

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.14 Forced Breaking of Program Executions The High-performance Embedded Workshop can force a break in the execution of a program.  Cancel all breakpoints settings.  To execute the remaining sections of the main function, select [Go] from the [Debug] menu or the [Go] button on the toolbar.
  • Page 162: Displaying Local Variables

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 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.
  • Page 163: Break Function

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.16 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.
  • Page 164 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  Double-click the [S/W breakpoint] column on the [Editor] window. A PC breakpoint is set. Figure 6.30 [Editor] Window (Setting a PC Breakpoint) R20UT0869EJ1401 Rev. 14.01 Page 146 of 182 Mar. 25, 2016...
  • Page 165 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  When the PC breakpoint is set in the [Event] window, click the [Event] window with the right- hand mouse button and select [Add…] from the popup menu. Figure 6.31 [Set Break] Dialog Box ...
  • Page 166 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The PC breakpoint that has been set is displayed in the [Event] window. Figure 6.32 [Event] Window (PC Breakpoint Setting) Note: The items that can be displayed in this window differ according to the product. For the items that can be displayed, refer to the online help.
  • Page 167 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The program runs, and stops at the set PC breakpoint. Figure 6.33 [Editor] Window at Execution Stop (PC Break) R20UT0869EJ1401 Rev. 14.01 Page 149 of 182 Mar. 25, 2016...
  • Page 168 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The [Status] window displays the following contents. Figure 6.34 Displayed Contents of the [Status] Window (PC Break) Note: The items that can be displayed in this window differ depending on the product. For the items that can be displayed, refer to the online help.
  • Page 169: Hardware Break Function

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.17 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.
  • Page 170 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  The [Break condition 1] dialog box is displayed.  The data condition can be set besides the address condition. Figure 6.36 [condition] Page ([Break condition 1] Dialog Box)  Click the [OK] button. ...
  • Page 171 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The program runs and then stops at the condition specified under Break Condition 1. Figure 6.37 [Editor] Window at Execution Stop (Break Condition 1) R20UT0869EJ1401 Rev. 14.01 Page 153 of 182 Mar. 25, 2016...
  • Page 172 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial The [Status] window displays the following contents. Figure 6.38 Displayed Contents of the [Status] Window (Break Condition 1) Note: The items that can be displayed in this window differ depending on the product. For the items that can be displayed, refer to the online help.
  • Page 173: Trace Functions

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.18 Trace Functions The emulator has a branch-instruction trace function. In H8S family, the four-channel branch source addresses, mnemonics, operands, source lines, and labels are displayed. In H8SX family, the eight-channel branch source or destination addresses, mnemonics, operands, source lines, and labels are displayed.
  • Page 174: Stack Trace Function

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial 6.19 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 Elf/Dwarf2-type debugging information is loaded.
  • Page 175: What Next

    H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial  Set the same program counter value (PC = H’400) 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.
  • Page 176 H8S, H8SX Family E10A-USB Emulator Section 6 Tutorial R20UT0869EJ1401 Rev. 14.01 Page 158 of 182 Mar. 25, 2016...
  • Page 177: Section 7 Maintenance And Guarantee

    H8S, H8SX Family E10A-USB Emulator Section 7 Maintenance and Guarantee Section 7 Maintenance and Guarantee This section describes maintenance, guarantee, repair provisions, and how to request for repair of the emulator. User Registration When you purchase our product, be sure to register as a user. For user registration, refer to the section of ‘User Registration’...
  • Page 178: Repair Provisions

    H8S, H8SX Family E10A-USB Emulator Section 7 Maintenance and Guarantee Repair Provisions 7.4.1 Repair with Extra-Charge The products elapsed more than one year after purchase can be repaired with extra-charge. 7.4.2 Replacement with Extra-Charge If your product's fault falls in any of the following categories, the fault will be corrected by replacing the entire product instead of repair, or you will be advised to purchase new one, depending on the severity of the fault.
  • Page 179: How To Make A Request For Repair

    H8S, H8SX Family E10A-USB Emulator Section 7 Maintenance and Guarantee How to Make a Request for Repair If your product is found faulty, follow the procedure below to send your product for repair. Fill in the Repair Request Sheet included with this product, then send it along with this product for repair to your local distributor.
  • Page 180 H8S, H8SX Family E10A-USB Emulator Section 7 Maintenance and Guarantee R20UT0869EJ1401 Rev. 14.01 Page 162 of 182 Mar. 25, 2016...
  • Page 181: Appendix A Troubleshooting

    Embedded Workshop, updating of the workspace is within the memory. The settings are not saved in a file unless the user intentionally saves the workspace. In addition to above, refer to FAQs on the emulator and High-performance Embedded Workshop on the Renesas web site (www.renesas.com). R20UT0869EJ1401 Rev. 14.01 Page 163 of 182...
  • Page 182 H8S, H8SX Family E10A-USB Emulator Appendix A Troubleshooting R20UT0869EJ1401 Rev. 14.01 Page 164 of 182 Mar. 25, 2016...
  • Page 183: Appendix B Window Functions

    H8S, H8SX Family E10A-USB Emulator Appendix B Window Functions Appendix B Window Functions This section describes the window functions that can be used with the E10A-USB emulator High- performance Embedded Workshop. Here, the High-performance Embedded Workshop common functions are omitted, and only the emulation functions are described. Table B.1 Window Functions Toolbar Menu...
  • Page 184 H8S, H8SX Family E10A-USB Emulator Appendix B Window Functions Table B.1 Window Functions (cont) Toolbar Menu Option Shortcut Button Remarks View Code Eventpoints Ctrl + E Opens the [Event] window. (cont) Trace Ctrl + T Opens the [Trace] window. Stack Trace Ctrl + K Opens the [Stack Trace] window.
  • Page 185 H8S, H8SX Family E10A-USB Emulator Appendix B Window Functions Table B.1 Window Functions (cont) Toolbar Menu Option Shortcut Button Remarks Debug 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.
  • Page 186 H8S, H8SX Family E10A-USB Emulator Appendix B Window Functions Table B.1 Window Functions (cont) Toolbar Menu Option Shortcut Button Remarks Debug Step… Launches the [Step Program] dialog box allowing the user to modify the settings for stepping. Step Auto Steps only one source line when Mode the [Editor] window is active.
  • Page 187: Appendix C Command-Line Functions

    H8S, H8SX Family E10A-USB Emulator Appendix C Command-Line Functions 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. R20UT0869EJ1401 Rev. 14.01 Page 169 of 182 Mar.
  • Page 188 H8S, H8SX Family E10A-USB Emulator Appendix C Command-Line Functions R20UT0869EJ1401 Rev. 14.01 Page 170 of 182 Mar. 25, 2016...
  • Page 189: Appendix D Notes On High-Performance Embedded Workshop

    H8S, H8SX Family E10A-USB Emulator Appendix D Notes on High-performance Embedded Workshop 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.
  • Page 190 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\HEW\Tools\Renesas\DebugComp\Platform \E10A-USB\Tutorial\Debug_H8S_xxxx_E10A-USB_SYSTEM \Tutorial.abs 7. Memory Save during User Program Execution Do not execute saving, verifying, comparing, or searching of memory during user program execution.
  • Page 191 H8S, H8SX Family E10A-USB Emulator Appendix D Notes on High-performance Embedded Workshop 9. [I/O] Window  Display and modification Do not change values in the [I/O Registers] window because the emulator uses the address break controller. Note that the emulator does not support the display of the invalid module or bit information in the [I/O] window.
  • Page 192 H8S, H8SX Family E10A-USB Emulator Appendix D Notes on High-performance Embedded Workshop 15. 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 ...
  • Page 193 H8S, H8SX Family E10A-USB Emulator Appendix D Notes on High-performance Embedded Workshop 19. MCU for use in debugging The emulator is also applicable as a programming tool in mass production when it is operating in the [Program Flash] mode. However, the flash memory of an actual MCU which has been used in connection with the emulator in the [E10A-USB Emulator] mode for debugging will have been programmed and subjected to stress accordingly.
  • Page 194 H8S, H8SX Family E10A-USB Emulator Appendix D Notes on High-performance Embedded Workshop 27. 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.
  • Page 195: Appendix E Diagnostic Test Procedure

    H8S, H8SX Family E10A-USB Emulator Appendix E Diagnostic Test Procedure Appendix E Diagnostic Test Procedure For the diagnostic test procedure using the emulator test program, refer to the E10A-USB Emulator Test Program Manual (file name: E10A-USBTME.PDF) in the ‘E10A-USB Emulator software’...
  • Page 196 H8S, H8SX Family E10A-USB Emulator Appendix E Diagnostic Test Procedure R20UT0869EJ1401 Rev. 14.01 Page 178 of 182 Mar. 25, 2016...
  • Page 197: Appendix F Repair Request Sheet

    H8S, H8SX Family E10A-USB Emulator Appendix F Repair Request Sheet Appendix F Repair Request Sheet Thank you for purchasing the E10A-USB emulator (HS0005KCU01H or HS0005KCU02H). In the event of a malfunction, fill in the repair request sheet on the following pages and send it to your distributor.
  • Page 198 H8S, H8SX Family E10A-USB Emulator Appendix F Repair Request Sheet Repair Request Sheet To Distributor Your company name: Person in charge: Tel.: Item Symptom 1. Date and time when the malfunction Month/Day/Year {at system initiation, in system occurred operation} *Circle either of items in the braces { }. 2.
  • Page 199 H8S, H8SX Family E10A-USB Emulator Appendix F Repair Request Sheet Item Symptom 4. Settings when the malfunction (1) MCU: Part number: occurred (2) Operating frequency: 5. Failure phenomenon 6. Error in debugging 7. Error in the diagnostic program 8. The High-performance Embedded Content of the error message Workshop does not link-up with the emulator.
  • Page 200 H8S, H8SX Family E10A-USB Emulator Appendix F Repair Request Sheet R20UT0869EJ1401 Rev. 14.01 Page 182 of 182 Mar. 25, 2016...
  • Page 202 H8S, H8SX Family E10A-USB Emulator User’s Manual (HS0005KCU01H, HS0005KCU02H) Publication Date: Rev. 14.01, Mar. 25, 2016 Published by: Renesas Electronics Corporation...
  • Page 203 SALES OFFICES Refer to "http://www.renesas.com/" for the latest and detailed information. Renesas Electronics America Inc. 2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A. Tel: +1-408-588-6000, Fax: +1-408-588-6130 Renesas Electronics Canada Limited 9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3...
  • Page 204 H8S, H8SX Family E10A-USB Emulator User’s Manual R20UT0869EJ1401...
  • Page 205 X-ON Electronics Largest Supplier of Electrical and Electronic Components Click to view similar products for manufacturer: Renesas Other Similar products are found below : EL4511CUZ-T7 PYB15-Q24-S5-H-U PQA30-D24-S24-DH PQA30-D48-S12-TH PYB30-Q24-T312-H-U PYB15-Q24-S5-H-T PYB15- Q24-S12-H-T V7815-500-SMT PYB20-Q48-S12-H-T PQZ6-Q24-S15-D PYB20-Q48-S5-H-T PYB20-Q24-S12-H-T VLED15-120-350 VGS-75-12 PYB15-Q24-S12-H-U R5F100GFAFB#V0 VGS-50-15 VGS-50-24 VGS-25-24 VGS-50-5 VGS-100-12 M30620FCAFP#U3...

This manual is also suitable for:

H8sx seriesE10a-usbHs0005kcu01hHs0005kcu02h

Table of Contents