User’s Manual E8a Emulator User's Manual Supported Devices: R8C Family M16C Family H8S Family H8 Family 740 Family All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice.
Notice 1. 2. 3. 4. 5. 6. 7. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office.
E8a Emulator User's Manual Introduction Introduction This manual describes the followings - E8a Emulator functions - Preparation before use - Debugger functions - Tutorial - Appendix: (Components of the E8a Emulator, Notes on High-performance Embedded Workshop, and Diagnostic Test Procedure) This manual does not intend to explain how to write C/C++ or assembly language programs, how to use any particular operating system or how best to tailor code for the individual devices.
E8a Emulator User's Manual IMPORTANT IMPORTANT Before using this product, be sure to read the user’s manual (this user's manual) carefully. Keep this user’s manual, and refer to this when you have questions about this product. Emulator: The emulator in this document refers to the following products that are manufactured by Renesas Electronics Corporation: (1) Emulator (2) User system interface cable The emulator herein does not include the customer’s user system and host machine.
E8a Emulator User's Manual IMPORTANT About the rights: We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the use of any information, products or circuits presented in this user’s manual. (1) We assume no responsibility for any damage or infringement on patent rights or any other rights arising from the use of any information, products or circuits presented in this user’s manual.
E8a Emulator User's Manual Precautions for Safety Precautions for Safety This chapter describes the precautions which should be taken in order to use this product safely and properly. Be sure to read and understand this chapter before using this product. Contact us if you have any questions about the precautions described here. WARNING WARNING indicates a potentially dangerous situation that will cause death or heavy wound unless it is avoided.
E8a Emulator User's Manual Precautions for Safety WARNING Warnings for Power Supply: If you smell a strange odor, hear an unusual sound, or see smoke coming from this product, then disconnect power immediately by unplugging the AC power cable from the outlet. Do not use this as it is because of the danger of electric shock and/or fire. In this case, contact your local distributor.
E8a Emulator User's Manual Precautions for Safety CAUTION Cautions to Be Taken for Turning On the Power: Turn ON/OFF the power of the emulator and the user system as simultaneously as possible. If you cannot turn on the powers simultaneously, turn on the emulator first and then the user system. When turning on the power again after shutting off the power, wait about 10 seconds. Cautions to Be Taken for Handling This Product: Use caution when handling the product.
E8a Emulator User's Manual Contents Contents Introduction......................................................................................................................................... 3 IMPORTANT ..................................................................................................................................... 4 Precautions for Safety ......................................................................................................................... 6 Contents ...........
E8a Emulator User's Manual 5.3 5.4 5.5 5.6 Contents 5.2.2 Viewing the Source Code ........................................................................................................................ 64 Stopping Your Program ........................................................................................................................................ 67 5.3.1 Address Match Breakpoints ...........................................................................................................
E8a Emulator User's Manual 6.7 6.8 6.9 6.10 6.11 6.12 6.13 6.14 6.15 6.16 6.17 6.18 6.19 6.20 Contents Setting a PC Breakpoint ........................................................................................................................................ 85 Setting Registers ................................................................................................................................................... 86 Executing the Program...................................................
E8a Emulator User's Manual 1. Overview 1. Overview The High-performance Embedded Workshop is a Graphical User Interface intended to facilitate 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.
E8a Emulator User's Manual 1. Overview The emulator has three activation modes: (1) Erase Flash and Connect This mode is used to erase data of the MCU flash memory and activate the debugger. A program for the emulator is also written to at the same time. (2) Keep Flash and Connect This mode is used to activate the debugger while retaining data of the MCU flash memory. However, areas for the emulator program and vector areas used by the emulator will be changed.
E8a Emulator User's Manual 1.1 1. Overview Warnings CAUTION Caution to be taken when using this product: Read the following warnings before using the emulator product. Incorrect operation will damage the user system and the emulator product. The user program will be lost. (1) Check all components against the component list provided at the rear side of the component box after unpacking the emulator. (2) Never place heavy objects on the casing.
E8a Emulator User's Manual 1.2 1. Overview Environmental Conditions CAUTION Caution to be taken when using this product: Observe the conditions listed in Tables 1.1 to 1.3 when using the emulator. Failure to do so may result in improper operation of the user system, the emulator product, and the user program. Table 1.
E8a Emulator User's Manual 1. Overview Table 1.3 Operating Environments (Windows Vista® and Windows® 7) Item Description Host computer IBM PC or compatible OS Windows® 7 32/64-bit editions Windows Vista® 32-bit edition (64-bit edition not supported) CPU Pentium 4 running at 3 GHz or Core 2 Duo running at 1 GHz or more recommended. Host machine interface USB (USB1.1, full-speed), also USB 2.
E8a Emulator User's Manual 2. E8a Emulator Functions 2. E8a Emulator Functions This section describes the emulator functions. They differ according to the device supported by the emulator. 2.1 Overview Table 2.1 gives a functional overview of the emulator. Table 2.1 Emulator Functions Item Function User program execution function Executes a program at an operating frequency guaranteed for the applicable device.
E8a Emulator User's Manual 2.2 2. E8a Emulator Functions Trace Functions The branch source addresses, mnemonics, operands, and source lines are displayed. Real-time trace acquisition is supported by the trace buffer incorporated in the device. Note: The MCUs which have no trace function cannot use this function. 2.3 Break Functions The E8a emulator has the following four break functions. (1) Hardware break function Uses a break controller incorporated in the device.
E8a Emulator User's Manual 2. E8a Emulator Functions (2) User program downloading function A load module registered in the workspace can be downloaded. Such module can be selected from [Download Modules] in the [Debug] menu. Downloading is also possible by a popup menu that is opened by right-clicking on the mouse at the load module in the workspace. The user program is downloaded to the RAM or flash memory.
E8a Emulator User's Manual 2.5 2. E8a Emulator Functions Stack Trace Function The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing.
E8a Emulator User's Manual 2.8 2. E8a Emulator Functions Regulatory Compliance Notices European Union regulatory notices This product complies with the following EU Directives. (These directives are only valid in the European Union.) CE Certifications: ・Electromagnetic Compatibility (EMC) Directive 2004/108/EC EN 55022 Class A WARNING: This is a Class A product. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures.
E8a Emulator User's Manual 3. Preparation before Use 3. Preparation before Use 3.1 Emulator Preparation Unpack the emulator and prepare it for use as follows: CAUTION Caution to be taken when using this product: Read the reference sections shaded in Figure 3.1 before using the emulator product. Incorrect operation will damage the user system and the emulator product. The user program will be lost.
E8a Emulator User's Manual 3.2 3. Preparation before Use Emulator Hardware Configuration As shown in Figure 3.2, the emulator consists of an emulator, a USB cable, and a user system interface cable. The emulator is connected to the host computer via USB 1.1, and also to the USB port conforming to USB 2.0. Figure 3.2 Emulator Hardware Configuration R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 3. Preparation before Use The names of each section of the emulator are explained next. Emulator Upper-side Panel: Figure 3.3 Emulator Upper-side Panel (a) ACT LED: (b) VCC LED: An LED to show the operating state of the emulator software. When this LED is lit (yellow-green), the E8a control software is in operation. An LED to show the power state of the user system. When power is supplied from the emulator to the user system, this LED is lit in orange.
E8a Emulator User's Manual 3. Preparation before Use Emulator Host-Computer-Side Panel: Figure 3.4 Side view of the emulator (host computer side) (a) Host-side connector: A USB cable connector for connecting the emulator to the host computer. Be sure to use the attached USB cable. (b) Portable strap hole: A hole for the strap (No strap is provided for this product). R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 3. Preparation before Use Emulator User-System-Side Panel: Figure 3.5 Side view of the emulator (user system side) (a) Connector to the user system: R20UT0541EJ0601 Rev.6.01 Aug 25, 2011 Used for connecting the user interface cable.
E8a Emulator User's Manual 3. Preparation before Use Emulator Bottom Panel: Figure 3.6 Emulator Bottom Panel (a) Label for product management: The serial No. and information provided on the label differ depending on the time of purchase. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 3. Preparation before Use Emulator Left-Side Panel: Figure 3.7 Emulator Left-Side Panel (a) Self-check connector: The user interface cable is connected here when conducting E8aSCP (Self Check Program). (b) Self-check connector cover: To be closed when you are not running E8aSCP. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 3.3 3. Preparation before Use Emulator Software Configuration The following item is included with the emulator debugger when it is purchased: E8a Emulator Software: R0E00008AKCE00SR (CD) 3.3.1 CD Install the software according to the instruction message that will be displayed when you insert the attached CD-ROM to the host machine. The following files and programs are contained in each folder. Table 3.
E8a Emulator User's Manual 3.5 3. Preparation before Use Connecting the Emulator to the Host Computer This section describes how to connect the emulator to the host computer. For the position of each connector of the emulator, refer to section 3.2, Emulator Hardware Configuration. Notes: 1. When [Add New Hardware Wizard] is displayed, select the [Search for the best driver for your device.
E8a Emulator User's Manual 3.6 3. Preparation before Use Connecting the Emulator to the User System Use the procedure below to connect the emulator to the user system with the user system interface cable, or to disconnect them when moving the emulator or the user system. 1. Check that the host computer is turned off or the emulator is not connected to the host computer with the USB cable. 2. Connect the user system interface cable to the user-side connector of the emulator. 3.
E8a Emulator User's Manual 3.7 3. Preparation before Use Connecting System Ground WARNING Warnings for Connecting Ground: Separate the frame ground from the signal ground at the user system. Failure to do so will result in a fire hazard and will damage the user system and the emulator product or will result in personal injury. The emulator's signal ground is connected to the user system's signal ground. In the emulator, the signal ground and frame ground are connected.
E8a Emulator User's Manual 3.8 3. Preparation before Use System Check When the software is executed, use the procedure below to check that the emulator is connected correctly. Here, use the workspace for a tutorial provided on the product. Refer to section 4, Preparations for Debugging, for the other activating method to create a new project or use a workspace for the High-performance Embedded Workshop of the old version. 1. 2. 3. 4. Connect the emulator to the host computer.
E8a Emulator User's Manual 3. Preparation before Use 6. When the [Open workspace] dialog box is opened, specify the following directory: \WorkSpace\Tutorial\E8a\xxxx\Tutorial After the directory has been specified, select the following file and click the [Open] button. Figure 3.12 [Open Workspace] Dialog Box Note: The directory for a tutorial differs depending on the device.
E8a Emulator User's Manual 3. Preparation before Use 7. The [Emulator Setting] dialog box is displayed. Figure 3.13 [Emulator Setting] Dialog Box Select the device name in use from the [MCU Group] drop-down list box. Note: The [MCU Group] drop-down list box is not displayed in the H8/Tiny or H8/Super Low Power series. Select the device name in use from the [Device] drop-down list box. The following items are selected in the [Mode] group box.
E8a Emulator User's Manual 3. Preparation before Use Note: It is necessary to input the ID code of the flash memory by the target device. For details, refer to the additional document, Notes on Connecting the xxxxx. Debugging of CPU rewrite mode This mode is used to debug the program that rewrites the CPU.
E8a Emulator User's Manual 3. Preparation before Use 9. When the version of the E8a firmware downloaded into the emulator is old, the message box shown in Figure 3.15 will be displayed. Figure 3.15 Dialog Box for confirming the E8a firmware download Note: When [OK] button is clicked, it starts downloading the E8a firmware. Do not connect/disconnect the USB cable until the download status dialog box closes. 10. When [Power Target from Emulator.
E8a Emulator User's Manual 3. Preparation before Use CAUTION Cautions to Be Taken for Power Supply: Before carrying out the power supply, check the power specification of the user system and there is no short circuit in the user system. Incorrect operation will damage the user system and the emulator product. The user program will be lost. 12. When "Connected" is displayed in the [Output] window of the High-performance Embedded Workshop, the emulator initiation is completed Figure 3.
E8a Emulator User's Manual 3. Preparation before Use Notes: 1. If the user system interface cable is disconnected from the connector on the user system, the following dialog box will appear. Figure 3.19 [Connector disconnected] Dialog Box 2. If the emulator is not properly initialized, one of the dialog boxes shown in Figures 3.20 through 3.24 will appear. (a) The following dialog box is displayed when the flash memory cannot be erased.
E8a Emulator User's Manual 3. Preparation before Use (c) The following dialog box is displayed when an incorrect ID code has been input. For the H8/Tiny, H8/Super Low Power, R8C/10, 11, 12 and 13, if an ID code does not match, the flash memory will be completely erased. Figure 3.22 [ID code error!] Dialog Box (d) The following dialog box is displayed when the MCU cannot communicate with the emulator. Check the MCU settings. Figure 3.23 [Boot Failed!] Dialog Box 3.
E8a Emulator User's Manual 4. Preparations for Debugging 4. Preparations for Debugging 4.1 Method for Activating High-performance Embedded Workshop To activate the High-performance Embedded Workshop, follow the procedure listed below. 1. 2. 3. Connect the emulator to the host computer and the user system, then turn on the user system.
E8a Emulator User's Manual 4.1.1 4. Preparations for Debugging Creating the New Workspace (Toolchain Not Used) 1. In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select [Create a new project workspace] radio button and click the [OK] button. Figure 4.2 [Welcome!] Dialog Box R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging 2. The Project Generator is started. This section omits the description on the setting for the toolchain. If you have not purchased the toolchain, the following dialog box is displayed. Figure 4.3 [New Project Workspace] Dialog Box [Workspace Name] edit box: Enter the new workspace name. Here, enter ‘test’. [Project Name] edit box: Enter the project name. When the project name is the same as the workspace name, it needs not be entered.
E8a Emulator User's Manual 4. Preparations for Debugging 3. The following dialog box is displayed. Figure 4.4 [Setting the Target System for Debugging] Dialog Box Select the target system for debugging and click the [Next] button. [Target system for debugging] M32C E8a SYSTEM: M16C E8a SYSTEM: R8C E8a SYSTEM: 740 E8a SYSTEM: H8S Tiny: H8 Tiny/Super Low Power E8a SYSTEM 300H: H8 Tiny/Super Low Power E8a SYSTEM 300L: R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging 4. Set the configuration file name. The configuration file saves the setting of the High-performance Embedded Workshop except the emulator. Figure 4.5 [Setting the Debugger Options] Dialog Box This is the end of the emulator setting. Click the [Finish] button to exit the Project Generator. The High-performance Embedded Workshop is activated. 5. After the High-performance Embedded Workshop has been activated, the emulator is automatically connected.
E8a Emulator User's Manual 4.1.2 1. 4. Preparations for Debugging Creating the New Workspace (Toolchain Used) In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select [Create a new project workspace] radio button and click the [OK] button. Figure 4.6 [Welcome!] Dialog Box 2. The Project Generator is started. If you have purchased the toolchain, the following dialog box is displayed. Figure 4.
E8a Emulator User's Manual 4. Preparations for Debugging 3. Make the required setting for the toolchain. Figure 4.8 [New Project-1/6-Select Target CPU. Toolchain version] Dialog Box Select your toolchain version, CPU series and click the [Next] button. 4. Make the required settings for the RTOS. Figure 4.9 [New Project-2/6-Select RTOS] Dialog Box Select the RTOS you use, type of startup file and click the [Next] button.
E8a Emulator User's Manual 4. Preparations for Debugging 5. Make the required settings for the heap area etc. Figure 4.10 [New Project-3/6-Setting the Contents of Files to be Generated] Dialog Box Set the heap size etc. and click the [Next] button. Note: In the H8/Tiny, H8/Super Low Power series, and 740 family, the content of the dialog box will differ. 6. Make the required setting for the stack area. Figure 4.
E8a Emulator User's Manual 4. Preparations for Debugging 7. When the tool chain settings have been completed, the following dialog box is displayed. Figure 4.12 [New Project-5/6-Setting the Target System for Debugging] Dialog Box Select the target system for debugging and click the [Next] button.
E8a Emulator User's Manual 4. Preparations for Debugging 8. Set a configuration file name. The configuration file saves the settings of the High-performance Embedded Workshop except for the emulator. Figure 4.13 [New Project-6/7-Setting the Debugger Options] Dialog Box 9. Finally, confirm the file name you create. Figure 4.
E8a Emulator User's Manual 4. Preparations for Debugging 10. After the High-performance Embedded Workshop has been activated, connect the emulator. However, it is not needed to connect the emulator immediately after the High-performance Embedded Workshop has been activated. To connect the emulator, use one of the methods (a) and (b) below. For operation during connection, refer to section 3.8, System Check.
E8a Emulator User's Manual 4.1.3 4. Preparations for Debugging Selecting an Existing Workspace 1. In the [Welcome!] dialog box that is displayed when the High-performance Embedded Workshop is activated, select [Browse to another project workspace] radio button and click the [OK] button. Figure 4.16 [Welcome!] Dialog Box 2. The [Open Workspace] dialog box is displayed. Select a directory in which you have created a workspace. After that, select the workspace file (.hws) and press the [Open] button.
E8a Emulator User's Manual 4. Preparations for Debugging 4.2 Setting at E8a Emulator Activation 4.2.1 Setting at Emulator Activation When the emulator is activated, the command chain can be automatically executed. It is also possible to register multiple load modules to be downloaded. The registered load modules are displayed on the workspace window. 1. Select [Debug Settings…] from the [Debug] menu to open the [Debug Settings] dialog box. Figure 4.18 [Debug Settings] Dialog Box ([Target] Page) 2.
E8a Emulator User's Manual 4. Preparations for Debugging Figure 4.19 [Debug Settings] Dialog Box ([Options] Page) The command chain that is automatically executed at the specified timing is registered. The following three timings can be specified: At connecting the emulator Immediately before downloading Immediately after downloading Specify the timing for executing the command chain in the [Command batch file load timing] drop-down list box.
E8a Emulator User's Manual 4.2.2 4. Preparations for Debugging Downloading a Program A download module is added under [Download modules] in the [Workspace] window. Open the load module of [Download modules] in the [Workspace] window by clicking the right-hand mouse button and select [Download module] to start downloading the module. Figure 4.20 Download Menu of the [Workspace] Window ([Projects]) Notes: 1. When load modules are downloaded, select [Debug] -> [Download] -> [All Download modules]. 2.
E8a Emulator User's Manual 4.2.3 4. Preparations for Debugging Setting the [Program Flash] Mode The following describes the procedures when the emulator is used as the programming tool. The load module to be downloaded to the new workspace is registered and programmed. (a) Select the new project workspace. Figure 4.21 [New Project Workspace] Dialog Box (b) Select the target MCU and click the [Next] button. Figure 4.22 [Setting the Target System for Debugging] Dialog Box R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging (c) Set a configuration file name and click the [Finish] button. Figure 4.23 [Setting he Debugger Options] Dialog Box R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging (d) The [Emulator Setting] dialog box is displayed. Figure 4.24 [Emulator Setting] Dialog Box Select the [Program Flash] mode. When the [Power Target from Emulator. (MAX 300mA)] check box is selected, power will be supplied to the user system up to 300 mA. Then select 3.3 V or 5.0 V according to the power voltage of the user system. (e) When [Power Target from Emulator. (MAX 300mA)] is not checked, the dialog box shown in Figure 4.
E8a Emulator User's Manual 4. Preparations for Debugging (f) Enter the ID code printed on the flash memory. Figure 4.26 [ID Code verification] Dialog Box Note: Opening the [ID Code verification] dialog box in [Program Flash] mode depends on the target device. For details, refer to the additional document, Notes on Connecting the xxxxx. (g) Select [Debug Settings…] from the [Debug] menu. Figure 4.27 High-performance Embedded Workshop Window R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging (h) Select the target MCU and then the download module with the [Add…] button. Figure 4.28 [Debug Settings] Dialog Box ([Target] Page) (i) The download file is displayed on [Projects]. Figure 4.29 [Workspace] Window ([Projects]) R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 4. Preparations for Debugging (j) Select and download the file with the right-hand mouse button. Figure 4.30 Download Menu of the [Workspace] Window ([Projects]) (k) The dialog box for sum checking is displayed and writing is completed. Figure 4.31 Message for Completion of Flash Memory Writing (l) When the following dialog box is displayed, close and restart or exit the workspace. Figure 4.32 Message for Restarting or Exiting the [Program Flash] Mode R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 5. Debugging 5. Debugging This section describes the debugging operations and their related windows and dialog boxes. For details on the common functions of the High-performance Embedded Workshop products, refer to the High-performance Embedded Workshop User’s Manual. 5.1 Setting the Environment for Emulation 5.1.1 Opening the [Configuration] Dialog Box Selecting [Setup -> Emulator -> System…] or clicking the [Emulator System] toolbar button ( [Configuration] dialog box. 5.
E8a Emulator User's Manual 5. Debugging Items that can be displayed in the sheet are listed below. [Device] combo box Displays the MCU name. [Emulation mode] combo box Selects the emulation mode at user program execution. Select Normal to perform normal emulation. Select No break to disable PC breakpoint or break condition settings during emulation. [User interface clock] combo box Displays the transfer clock of the user interface.
E8a Emulator User's Manual 5.2 5. Debugging Downloading a Program This section describes how to download a program and view it as source code or assembly-language mnemonics. Note: After a break has been detected, the High-performance Embedded Workshop displays the location of the program counter (PC). In most cases, for example if an Elf/Dwarf2-based project is moved from its original path (at the build), the source file may not be automatically found.
E8a Emulator User's Manual 5. Debugging In this window, the following items are shown on the left as line information. The first column (Line Number column) Line number The second column (Source address column): Address information The third column (Event column): Event information (break condition) The fourth column (S/W Breakpoints column): PC, bookmark, and breakpoint information The right window that shows the source is called as the [Source] window.
E8a Emulator User's Manual 5. Debugging To switch off a column in all source files 1. 2. 3. 4. Click the right-hand mouse button on the [Source] window or select the [Edit] menu. Click the [Define Column Format…] menu item. The [Global Editor Column States] dialog box is displayed. A check box indicates whether the column is enabled or not. If it is checked, the column is enabled. If the check box is gray, the column is enabled in some files and disabled in others.
E8a Emulator User's Manual 5.3 5. Debugging Stopping Your Program This section describes how you can halt execution of your application's code. This section describes how to stop the program by setting an address match breakpoints at specific locations in your code. 5.3.1 Address Match Breakpoints When you are trying to debug your program you will want to be able to stop the program running when it reaches a specific point or points in your code.
E8a Emulator User's Manual 5.4 5. Debugging Using the Event Points The emulator has the event point function that performs breaking by specifying higher-level conditions along with the PC breakpoints standard for the High-performance Embedded Workshop. 5.4.1 PC Breakpoints When the instruction of the specified address is fetched, the user program is stopped. Up to 255 points can be set. 5.4.
E8a Emulator User's Manual 5.4.4 5. Debugging Setting PC Breakpoints It is possible to display, modify, and add PC breakpoints on the [Breakpoint] sheet. Figure 5.5 [Event] Window ([Breakpoint] Sheet) This window displays and sets the breakpoints. Items that can be displayed in the sheet are listed below.
E8a Emulator User's Manual 5.4.10 5. Debugging Delete All Removes all breakpoints. 5.4.11 Go to Source Only enabled when one breakpoint is selected. Opens the [Source] window at the address of the breakpoint. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 5.4.12 5. Debugging [Set Break] Dialog Box Figure 5.6 [Set Break] Dialog Box This dialog box specifies break conditions. A breakpoint address to be set is specified in the [Address] edit box. Up to 255 breakpoints can be specified. When [Address] is selected, if an overloaded function or class name including a member function is specified in address, the [Select Function] dialog box opens. Clicking the [OK] button sets the break conditions.
E8a Emulator User's Manual 5.4.13 5. Debugging Setting Break Conditions On the [Breakcondition] sheet, the settings for break conditions are displayed, modified, and added. For R8C Family, on the [Breakcondition] sheet, the settings for address match breakpoint are displayed, modified, and added. Figure 5.7 [Event] Window ([Breakcondition] Sheet) Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to the online help.
E8a Emulator User's Manual 5.4.14 5. Debugging Edit... Only enabled when one breakpoint is selected. Select a breakpoint to be edited and click this item. The [Break condition 1] dialog box will open and break conditions can be changed. 5.4.15 Enable Enables the selected break channel(s). A break channel for which no conditions are set cannot be enabled. 5.4.16 Disable Disables the selected break channel(s).
E8a Emulator User's Manual 5.4.25 5. Debugging Deleting Break Conditions Select a break condition and choose [Delete] from the popup menu to remove the selected break condition. To retain the break condition but not have it cause an event when its conditions are met, use the [Disable] option (see section 5.4.24, Disabling Break Conditions). 5.4.26 Deleting All Break Conditions Choose [Delete All] from the popup menu to remove all break conditions. 5.4.
E8a Emulator User's Manual 5. Debugging The [Address] group box sets address bus conditions. Option Description [Don’t care] check box Does not set address conditions. [Address] radio button Sets the use of the normal address bus as break conditions. [Only program fetched address after] radio button Sets a break after prefetched address execution as break conditions. [Address] edit box Sets the address bus value with a number or a symbol.
E8a Emulator User's Manual 5.5 5. Debugging Viewing the Trace Information For the description on the trace function, refer to section 2.2, Trace Functions. 5.5.1 Opening the [Trace] Window To open the [Trace] window, choose [View -> Code -> Trace] or click the [Trace] toolbar button ( 5.5.2 ). Acquiring Trace Information The acquired trace information is displayed in the [Trace] window. Figure 5.
E8a Emulator User's Manual 5.5.5 5. Debugging Viewing the [Source] Window The [Source] window corresponding to the selected trace record can be displayed in the following two ways: Select a trace record and choose [View Source] from the popup menu. Double-click a trace record The [Source] or [Disassembly] window opens and the selected line is marked with a cursor. 5.5.6 Trimming the Source Choose [Trim Source] from the popup menu to remove the white space from the left side of the source.
E8a Emulator User's Manual 5.6 5. Debugging Using the Start/Stop Function The emulator executes the specified routine of the user program immediately before starting and immediately after halting program execution. This function is used to control the user system in synchronization with execution and halting of the user program. Note: The start/stop function is not supported in the H8/Tiny or H8/Super Low Power series, the 740 family, or the R8C/10, R8C/11, R8C/12, or R8C/13 group. 5.6.
E8a Emulator User's Manual 5.6.3 5. Debugging Restrictions on the Start/Stop Function The start/stop function has the following restrictions. Do not change the SFR used by the firmware. When the watchdog timer is used, refresh the watchdog timer in the specified routine. Do not set any breakpoints in the specified routine. When a stack is used in the specified routine, be sure to use the user stack. A register value is undefined when execution of the specified routine is started.
E8a Emulator User's Manual 6. Tutorial 6. Tutorial 6.1 Introduction This section describes the main functions of the emulator by using a tutorial program. The tutorial program is based on the C program that sorts ten random data items in ascending or descending order. The tutorial program performs the following actions: The main function generates random data to be sorted. The sort function sorts the generated random data in ascending order.
E8a Emulator User's Manual 6.4 6. Tutorial Setting the [Configuration] Dialog Box Select [Emulator] then [Systems…] from the [Setup] menu for the basic settings of the emulator. The [Configuration] dialog box is displayed. Figure 6.1 [Configuration] Dialog Box Note: The items that can be set in this dialog box differ depending on the product. For the settings for each product, refer to the online help. Set options as follows: Table 6.
E8a Emulator User's Manual 6.5 6. Tutorial Checking the Operation of RAM Check that RAM is operating correctly. Display and edit the contents of the memory in the [Memory] window to check that the memory is operating correctly. Note: The memory can be installed on the board in some microcomputers. In this case, however, the above way of checking the operation of memory may be inadequate. It is recommended that a program for checking the memory be created.
E8a Emulator User's Manual 6. Tutorial 6.6 Downloading the Tutorial Program 6.6.1 Downloading the Tutorial Program Download the object program to be debugged. With this emulator, you can download programs or set PC breakpoints to the internal flash area. For the method to set the PC breakpoint, refer to section 6.16.1, PC Break Function. Select [Download] from [Tutorial.x30] under [Download modules]. Figure 6.4 Downloading the Tutorial Program R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 6.6.2 6. Tutorial Displaying the Source Program The High-performance Embedded Workshop allows the user to debug a user program at the source level. Double-click [tutorial.c] under [C source file]. Figure 6.5 [Source] Window (Displaying the Source Program) Select the [Display] option from the [Setup] menu to set a font and size that are legible, if necessary.
E8a Emulator User's Manual 6.7 6. Tutorial Setting a PC Breakpoint A PC breakpoint is a simple debugging function. The [Source] window provides a very simple way of setting a PC breakpoint at any point in a program. For example, to set a PC breakpoint at the sort function call: Select by double-clicking the [S/W Breakpoints] column on the line containing the sort function call. Figure 6.6 [Source] Window (Setting a PC Breakpoint) The symbol will appear on the line containing the sort function.
E8a Emulator User's Manual 6.8 6. Tutorial Setting Registers Set values of the program counter and the stack pointer before executing the program. Select [Registers] from the [CPU] submenu of the [View] menu. The [Register] window is displayed. Figure 6.7 [Register] Window To change the value of the program counter (PC), double-click the value area in the [Register] window with the mouse. The following dialog box is then displayed, and the value can be changed.
E8a Emulator User's Manual 6.9 6. Tutorial Executing the Program Execute the program as described in the following: To execute the program, select [Go] from the [Debug] menu, or click the [Go] button on the toolbar. Figure 6.9 [Go] Button When the program execution is started, ‘**RUNNING’ is displayed on the status bar.
E8a Emulator User's Manual 6. Tutorial Figure 6.10 [Source] Window (Break State) The user can see the cause of the break that occurred last time in the [Status] window. Select [Status] from the [CPU] submenu of the [View] menu. After the [Status] window is displayed, open the [Platform] sheet, and check the Status of Cause of last break. Figure 6.11 [Status] Window Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to the online help.
E8a Emulator User's Manual 6.10 6. Tutorial Reviewing Breakpoints The user can see all the breakpoints set in the program in the [Event] window. Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. Select the [Breakpoint] sheet. Figure 6.12 [Event] Window The popup menu, opened by clicking the [Event] window with the right-hand mouse button, allows the user to set or change breakpoints, define new breakpoints, and delete, enable, or disable breakpoints.
E8a Emulator User's Manual 6.11 6. Tutorial Viewing Memory When the label name is specified, the user can view the memory contents with which the label has been registered in the [Memory] window. For example, to view the memory contents corresponding to _main in word size: Select [Memory …] from the [CPU] submenu of the [View] menu, enter _main in the [Display Address] edit box, enter 0000 and FFFF in the [Scroll Start Address] and [Scroll End Address] edit boxes, respectively. Figure 6.
E8a Emulator User's Manual 6.12 6. Tutorial Watching Variables As the user steps through a program, it is possible to watch that the values of variables used in the user program are changed. For example, set a watch on the long-type array a declared at the beginning of the program, by using the following procedure: Click the left of displayed array a in the [Source] window to position the cursor. Select [Instant Watch...] with the right-hand mouse button. The following dialog box will be displayed.
E8a Emulator User's Manual 6. Tutorial Click the [Watch] window with the right-hand mouse button and select [Add Watch…] from the popup menu. The following dialog box will be displayed. Enter variable i. Figure 6.17 [Add Watch] Dialog Box Click the [OK] button. The [Watch] window will now also show the int-type variable i. Figure 6.18 [Watch] Window (Displaying the Variable) The user can click mark ‘+’ at the left side of array a in the [Watch] window to watch all the elements. Figure 6.
E8a Emulator User's Manual 6.13 6. Tutorial Stepping Through a Program The High-performance Embedded Workshop provides a range of step menu commands that allow efficient program debugging. Table 6.2 Step Option Menu Command Description Step In Executes each statement, including statements within functions. Step Over Executes a function call in a single step. Step Out Steps out of a function, and stops at the next statement of the calling statement in the main function.
E8a Emulator User's Manual 6.13.2 6. Tutorial Executing [Step Out] Command The [Step Out] command steps out of the called function and stops at the next statement of the calling statement in the main function. To step out of the sort function, select [Step Out] from the [Debug] menu, or click the [Step Out] button on the toolbar. Note: It takes time to execute this function. When the calling source is clarified, use [Go To Cursor]. Figure 6.22 [Step Out] Button Figure 6.
E8a Emulator User's Manual 6.13.3 6. Tutorial Executing [Step Over] Command The [Step Over] command executes a function call as a single step and stops at the next statement of the main program. To step through all statements in the change function at a single step, select [Step Over] from the [Debug] menu, or click the [Step Over] button on the toolbar. Figure 6.24 [Step Over] Button Figure 6.25 [High-performance Embedded Workshop] Window (Step Over) R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 6.14 6. Tutorial Forced Breaking of Program Executions The High-performance Embedded Workshop can force a break in the execution of a program. Cancel all breaks. To execute the remaining sections of the main function, select [Go] from the [Debug] menu or the [Go] button on the toolbar. Figure 6.26 [Go] Button The program goes into an endless loop. To force a break in execution, select [Halt] from the [Debug] menu or the [Halt] button on the toolbar. Figure 6.
E8a Emulator User's Manual 6.16 6. Tutorial Break Function The emulator has PC and hardware break functions. With the High-performance Embedded Workshop, a PC breakpoint can be set using the [Breakpoint] sheet of the [Event] window, and a hardware break condition can be set using the [Breakcondition] sheet. An overview and setting of the break function are described below. 6.16.1 PC Break Function The emulator can set up to 255 PC breakpoints.
E8a Emulator User's Manual 6. Tutorial Click the [Event] window with the right-hand mouse button and select [Add…] from the popup menu. Enter H'0E1FE in the [Address] edit box. Figure 6.30 [Set Break] Dialog Box Click the [OK] button. The PC breakpoint that has been set is displayed in the [Event] window. Figure 6.31 [Event] Window (PC Breakpoint Setting) R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 6. Tutorial To stop the tutorial program at the PC breakpoint, the following procedure must be executed: Close the [Event] window. Set the program counter value (PC = H’0E612) that was set in section 6.8, Setting Registers, in the [Register] window. Click the [Go] button. If program execution is failed, reset the device and execute again the procedures above. The program runs, and stops at the set PC breakpoint. Figure 6.
E8a Emulator User's Manual 6.17 6. Tutorial Hardware Break Function A method is given below in which the address bus condition is set under Break Condition 1 as hardware break conditions. Select [Eventpoints] from the [Code] submenu of the [View] menu. The [Event] window is displayed. The PC breakpoint that has been previously set is deleted. Click the [Event] window with the right-hand mouse button and select [Delete All] from the popup menu to cancel all PC breakpoints that have been set.
E8a Emulator User's Manual 6. Tutorial The [Break condition 1] dialog box is displayed. Clear the [Don't care] check box in the [Address] group box. Select the [Only program fetched address after] radio button and enter H'0E1F2 as the value in the [Address] edit box. Figure 6.35 [condition] Page ([Break condition 1] Dialog Box) Click the [OK] button. The first point display in the State line changes from Disable to Enable.
E8a Emulator User's Manual 6. Tutorial Figure 6.36 [Source] Window at Execution Stop (Break Condition 1) The [Status] window displays the following contents. Figure 6.37 Displayed Contents of the [Status] Window (Break Condition 1) Note: The items that can be set in this window differ depending on the product. For the settings for each product, refer to the online help. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 6.18 6. Tutorial Trace Functions The emulator has a branch-instruction trace function. The branch source addresses, mnemonics, operands, source lines, and labels are displayed for four branches. Note: The trace function uses the trace buffer housed in the device. Devices which have no trace function cannot use this function. 6.18.1 Displaying the Trace Window Select [Trace] from the [Code] submenu of the [View] menu. Run the program as shown in the example of section 6.16.
E8a Emulator User's Manual 6.19 6. Tutorial Stack Trace Function The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing. Note: This function can be used only when the load module that has the IEEE695-type debugging information is loaded. (However, 740 families exclude it.) Double-click the [S/W Breakpoints] column in the sort function and set a PC breakpoint. Figure 6.
E8a Emulator User's Manual 6.20 6. Tutorial What Next? This tutorial has described the major features of the emulator and the use of the High-performance Embedded Workshop. Sophisticated debugging can be carried out by using the emulation functions that the emulator offers. This provides for effective investigation of hardware and software problems by accurately isolating and identifying the conditions under which such problems arise. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 7. Appendix A: Components of the E8a Emulator 7. Appendix A: Components of the E8a Emulator Table A.1 lists the components of the E8a emulator. Table A.1 Components of the Emulator (R0E00008AKCE00) Classification Hardware Component E8a emulator Appearance Quantity 1 R0E00008AKCE00: Depth: 42 mm Width: 92 mm Height: 15 mm Mass: 38.0 g User system interface cable 1 Length: 150 mm (connector part not included), Mass: 10.0 g USB cable 1 Length: 1.5 m Mass: 42.
E8a Emulator User's Manual 8. Appendix B: Window Functions 8. Appendix B: Window Functions This section describes the window functions that can be used with the High-performance Embedded Workshop for E8a emulator. Here, the High-performance Embedded Workshop common functions are omitted, and only the emulation functions are described. Table B.1 Window Functions Menu View Option Shortcut Toolbar Button Remarks Disassembly Ctrl + D Opens the [Disassembly] window.
E8a Emulator User's Manual 8. Appendix B: Window Functions Table B.1 Window Functions (cont) Menu Setup Option Radix Emulator Debug Shortcut Toolbar Button Remarks Hexadecimal Uses a hexadecimal for displaying a radix in which the numerical values will be displayed and entered by default. Decimal Uses a decimal for displaying a radix in which the numerical values will be displayed and entered by default.
E8a Emulator User's Manual 8. Appendix B: Window Functions Table B.1 Window Functions (cont) Menu Debug (cont) Option Shortcut Toolbar Button Remarks Step Over F10 Executes a block of user program before breaking. If a subroutine call is reached, then the subroutine will not be entered. Step Out Shift + F11 Executes the user program to reach the end of the current function. Step… Step Mode Launches the [Step Program] dialog box allowing the user to modify the settings for stepping.
E8a Emulator User's Manual 9. Appendix C: Command-Line Functions 9. Appendix C: Command-Line Functions The emulator supports the commands that can be used in the command-line window. For details, refer to the online help. R20UT0541EJ0601 Rev.6.
E8a Emulator User's Manual 10. Appendix D: Notes on High-performance Embedded Workshop 10. Appendix D: Notes on High-performance Embedded Workshop 1. Note on Moving Source File Position after Creating Load Module When the source file is moved after creating the load module, the [Open] dialog box may be displayed to specify the source file during the debugging of the created load module. Select the corresponding source file and click the [Open] button. 2.
E8a Emulator User's Manual 10. Appendix D: Notes on High-performance Embedded Workshop 6. Command Line Interface Batch file To display the message “Not currently available” while executing a batch file, enter the sleep command. Adjust the sleep time length which differs according to the operating environment.
E8a Emulator User's Manual 10. Appendix D: Notes on High-performance Embedded Workshop 14. Note on RUN-TIME Display The execution time of the user program displayed in the [Status] window is not a correct value since the timer in the host computer has been used. 15. Note on Displaying Timeout error If Timeout error is displayed, the emulator cannot communicate with the target microcomputer.
E8a Emulator User's Manual 10. Appendix D: Notes on High-performance Embedded Workshop 25. Download of Load Modules When load modules are downloaded, select [Debug] -> [Download] -> [All Download modules]. 26. [Program Flash] Mode When microcomputers are continuously programmed, be sure to turn the target on or off. 27. Memory Access in the [Program Flash] Mode Memory cannot be accessed in the [Program Flash] mode. In this mode, values displayed in the [Memory] or [IO] window are dummy. 28.
E8a Emulator User's Manual 11. Appendix E: E8aSCP (E8a Self-Check Program) 11. Appendix E: E8aSCP (E8a Self-Check Program) This appendix describes the troubleshooting procedure that applies the self-check program for the E8a emulator (E8aSCP). 11.1 Flowchart of the Procedure to Execute the Self-Check Program Install the High-performance Embedded Workshop. (for the first time) Install the E8aSCP program and the USB driver for the E8a to the host computer. ▼ Connect the user system interface cable.
E8a Emulator User's Manual 11.2 11. Appendix E: E8aSCP (E8a Self-Check Program) System Setup to Execute the E8aSCP (1) The following equipment is required to execute the check program. E8a emulator main unit USB cable included with the E8a emulator User system interface cable included with the E8a emulator CD included with the E8a emulator Host computer Install the High-performance Embedded Workshop and the USB driver on the host computer in advance.
E8a Emulator User's Manual 11. Appendix E: E8aSCP (E8a Self-Check Program) WARNING Warnings for Connecting to the Self-Check Connector: Make sure to disconnect the USB cable from the E8a before connecting the user system interface cable to the user-system connector or the self-check connector of the E8a.
E8a Emulator User's Manual 11.3 11. Appendix E: E8aSCP (E8a Self-Check Program) Executing the Self-Check Program (1) Execute [Program]-[Renesas]-[High-performance Embedded Workshop]-[E8a Self Check Program]. Figure E.3 Starting Up the E8aSCP (2) Click the ‘START’ button. The following message will be displayed: ‘Please confirm that the User interface cable is connected to the self-check connector in a correct direction’.
E8a Emulator User's Manual 11. Appendix E: E8aSCP (E8a Self-Check Program) (3) The message ‘TEST1 is running.’ or ‘TEST2 is running.’ will appear in the window. This indicates the start of the selfcheck program. Figure E.5 Running the Self-Check Program (4) When ‘TEST3 is waiting.’ starts, the following message will be displayed: ‘Please remove the User interface cable from the self-check connector to execute TEST3.
E8a Emulator User's Manual 11. Appendix E: E8aSCP (E8a Self-Check Program) (5) The message ‘TEST3 is running.’ will appear in the window. This starts execution of the self-check program. Figure E.7 Running the Self-Check Program (6) The message ‘PASS’ or ‘FAIL’ will be displayed. ‘PASS’ indicates that the emulator is working correctly. Click the [QUIT] button to exit the self-check program. Figure E.
E8a Emulator User's Manual 11. Appendix E: E8aSCP (E8a Self-Check Program) Table E.1 Error Messages Error Message The E8a has failed. Description The E8a emulator has become faulty. If this applies to the contents guaranteed in 'IMPORTANT' described in this user's manual, we will repair or replace your faulty product free of charge. If this guarantee does not apply to your product's fault, we will repair the product or replace it with a new one with extra-charge.
E8a Emulator (R0E00008AKCE00) User's Manual Publication Date: Aug 25, 2011 Rev.6.01 Published by: Renesas Electronics Corporation Edited by: Microcomputer Tool Development Department 2 Renesas Solutions Corp.
http://www.renesas.com SALES OFFICES Refer to "http://www.renesas.com/" for the latest and detailed information. Renesas Electronics America Inc. 2880 Scott Boulevard Santa Clara, CA 95050-2554, U.S.A. Tel: +1-408-588-6000, Fax: +1-408-588-6130 Renesas Electronics Canada Limited 1101 Nicholson Road, Newmarket, Ontario L3Y 9C3, Canada Tel: +1-905-898-5441, Fax: +1-905-898-3220 Renesas Electronics Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.
E8a Emulator (R0E00008AKCE00) User's Manual R20UT0541EJ0601