User’s Manual SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers User’s Manual SuperH™ Family E10A-USB HS0005KCU04HE 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. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. 2.
Regulatory Compliance Notices z 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.
z 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. These limits are designed to provide reasonable protection against harmful interference when the equipment is operated in a commercial environment.
IMPORTANT INFORMATION 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. Emulator Product: Throughout this document, the term "emulator product" shall be defined as the following products produced only by Renesas Electronics Corp. excluding all subsidiary products.
LIMITED WARRANTY Renesas warrants its emulator products to be manufactured in accordance with published specifications and free from defects in material and/or workmanship. Renesas, at its option, will replace any emulator products returned intact to the factory, transportation charges prepaid, which 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.
State Law: Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may have other rights which may vary from state to state.
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. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
WARNING Observe the precautions listed below. Failure to do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY. The USER PROGRAM will be LOST. 1. Do not repair or remodel the emulator product by yourself for electric shock prevention and quality assurance. 2. Always switch OFF the host computer and user system before connecting or disconnecting any CABLES or PARTS. 3.
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. The USER PROGRAM will be LOST.
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.
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. Your registered information is used for only after-sale services, and not for any other purposes.
Table of Contents Section 1 Overview................................................................................................................................ 1 1.1 1.2 1.3 Warnings ................................................................................................................................................................... 3 Environmental Conditions ....................................................................................................................................
5.1.3 [Synchronization style] Group Box.............................................................................................................. 75 5.1.4 [Synchronization options] Group Box.......................................................................................................... 76 5.1.5 [Memory update] Options ............................................................................................................................ 77 5.1.
5.7.5 Clearing the Trace Information .................................................................................................................. 131 5.7.6 Saving the Trace Information in a File....................................................................................................... 131 5.7.7 Viewing the [Editor] Window .................................................................................................................... 131 5.7.8 Trimming the Source........................
7.7 Downloading the Tutorial Program ...................................................................................................................... 217 7.7.1 Downloading the Tutorial Program............................................................................................................ 217 7.7.2 Displaying the Source Program.................................................................................................................. 219 7.8 Setting a PC Breakpoint...................
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 1 Overview Section 1 Overview The E10A-USB emulator (hereafter referred to as the emulator) is a support tool for developing the hardware and software of 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. The user system can be debugged under the conditions similar to the actual application conditions.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 1 Overview The emulator provides the following features: • Excellent cost-performance emulator Compactness and connection to the USB are implemented. • Realtime emulation Realtime emulation of the user system is enabled at the maximum operating frequency of the CPU. • Excellent operability Using the High-performance Embedded enables user program debugging using a pointing device such as a mouse.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 1.1 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. Never place heavy objects on the casing. 3. Protect the emulator from excessive impacts and stresses. For details, refer to section 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 1.2 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. Table 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 1 Overview Table 1.2 lists the acceptable operating environments. Table 1.2 Operating Environments Item Description Operating system Windows XP (32-bit version) Host computer IBM PC or compatible machine with USB 1.1/2.0 (Full-Speed). CPU Core™ 2 Duo (2 GHz), or higher recommended Core™ 2 Duo (3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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 [SH-2A] or section 7, Tutorial [SH-4A]. 2.1 Overview Table 2.1 gives a functional overview of the emulator. For details on the functions of each product, refer to the online help. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions Table 2.1 Emulator Functions No. Item Function 1 User program execution function • Executes a program with the operating frequency within a range guaranteed by devices.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions Table 2.1 Emulator Functions (cont) No.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions The specific functions of the emulator are described in the next section. 2.2 Trace Functions The emulator has two trace functions. 2.2.1 Internal Trace Function The branch source and branch destination addresses, mnemonics, operands, and source lines are displayed. This function uses the trace buffer built into the device. Notes: 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions (c) Software trace When a specific instruction is executed, the PC value at execution and the contents of one general register are acquired by trace. Describe the Trace(x) function (x is a variable name) to be compiled and linked beforehand. For details, refer to the SHC/C++ compiler manual.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions (3) Trace display contents When the program breaks, the following trace results are displayed in the [Trace] window. • PTR: The trace-buffer pointer (+0 from the last instruction to have been executed) • IP: Indicates the number of cycles that have elapsed since the latest trace information was gathered. For branch instructions, the branch source and destination are counted together as one.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions The following items will be displayed, according to the device to be debugged. For specifications of the individual products, refer to the additional document, ″Supplementary Information on Using the SHxxxx″, or the online help.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions Table 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions (5) Changes the trace settings during user program execution. In some devices to be debugged, trace settings can be changed during user program execution. For details on the specifications of each product, refer to the online help. 2.3 Break Function The emulator has the following three break functions. (1) Hardware break function Uses a break controller incorporated in the device.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions Note: Items to be measured differ according to the product and some products do not support this function. For details on the specifications of each product, refer to the online help. 2.5 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions (5) Displaying the variable contents The variable contents specified in the user program are displayed. (6) Monitoring function In some devices to be debugged, memory contents can be monitored during user program execution. For details on the specifications of each product, refer to the online help.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 2 Emulator Functions Notes: 1. Memory access during user program execution: When memory is accessed from the memory window, etc. during execution of the user program, execution stops for the memory access and is then resumed. Therefore, realtime emulation cannot be performed. The stopping time of the user program is as follows: Environment: TM Host computer: CORE 2 CPU T7600 2.33 GHz SH7265: CPU clock 66.6 MHz JTAG clock: 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 2.6 Section 2 Emulator Functions Stack Trace Function The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing. This function can be used only when the load module that has the Dwarf2-type debugging information is loaded. For the usage of this function, refer to section 6.21 and 7.22 Stack Trace Function. 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Section 3 Preparation before Use 3.1 Emulator Preparation Unpack the emulator and prepare it for use as follows: WARNING READ the reference sections shaded in figure 3.1 before using the emulator product. Incorrect operation will damage the user system and the emulator product. The USER PROGRAM will be LOST.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.2 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. USB cable E10A-USB emulator User interface cable Figure 3.2 Emulator Hardware Configuration (when the 38-pin Type Cable is Used) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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: (b) ACTION LED: A circled LED. Marked ‘ACT’. When this LED is lit, the E10A-USB control software is in operation. (c) RUN LED: Marked ‘1’. When this LED is lit, the user program is in operation. (d) ACT LED: Marked ‘2’.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers (e) Core switch LED: Section 3 Preparation before Use Marked ‘3’. When this LED is lit, the E10A-USB switches the micro computer to be controlled. (f) UVCC LED: Marked ‘4’. When this LED is lit, the E10A-USB is supplied the UVCC . (g) Host connector: Marked ‘ ’. A connector for the host computer is provided at the side of this mark. (h) User connector: Marked ‘USER I/F’.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use (a) User-side connector: A user system interface cable is connected. Emulator Bottom View: (a) MODEL : HS0005KCU04H 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.3 Section 3 Preparation before Use CD-R The root directory of the CD-R contains a setup program for installing the emulator’s software. The folders contain the files and programs listed below. Table 3.1 Contents of the CD-R Directories Directory Name Contents ® Description Dlls Microsoft runtime library A runtime library for the High-performance Embedded Workshop.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.5 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. Notes: 1. When the [Add New Hardware] wizard is displayed, select the [Search for the best driver for your device. (Recommended)] radio button. 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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. Host comuputer E10A-USB emulator USB cable (1.5 m) Figure 3.7 System Configuration when Connecting the Emulator to the Host Computer R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.6 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. Check that the host computer is turned off or the emulator is not connected to the host computer with the USB cable. 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use (1) The connector must be installed to the user system. Table 3.2 shows the recommended connector for the emulator. Table 3.2 Recommended H-UDI Port Connector Connector Type Number Manufacturer Specifications 14-pin connector 2514-6002 Minnesota Mining & Manufacturing Ltd. 14-pin straight type 38-pin connector 2-5767004-2 Tyco Electronics Corporation 38-pin Mictor connector Notes: 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use User Interface Cable User System H-UDI Port Connector Figure 3.9 Connecting the User System Interface Cable to the User System when the 38-pin Type Connector is Used User system interface cable User system Pin 1 H-UDI port connector Figure 3.10 Connecting the User System Interface Cable to the User System when the 14-pin Type Connector is Used R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use CAUTION Note that the pin number assignments of the connector differ from those of the connector manufacturer. Notes: 1. Connection of the signals differs depending on the package. For details, refer to the device’s pin assignments. 2. The range of communication that the emulator operates at is different depending on the device used. 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.7 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. 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.8 Section 3 Preparation before Use Interface Circuits in the Emulator Figures 3.13 and 3.14 show interface circuits in the emulator. Use them as a reference to determine the value of the pull-up resistance. Note: The 74LVC2G125 and 74LVC2T45 operate at VCC (1.8 to 5.0 V) from the H-UDI port connector. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Emulator control circuit H-UDI port connector 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Emulator control circuit H-UDI port connector Reference voltage UVCC_AUD SN65LVDS33 10 kΩ 22 Ω AUDCK 10 kΩ SN65LVDS33 22 Ω AUDATA[3:0] 10 kΩ SN65LVDS33 22 Ω SN65LVDS33 AUDSYNC 10 kΩ 22 Ω AUDATA[7:4] Figure 3.14 Interface Circuits in the Emulator (AUD) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 3.9 Section 3 Preparation before Use System Check Before executing software, follow the procedure below to check that the emulator is connected correctly. At this point, use the tutorial workspace that is provided with the product and start up the High-performance Embedded Workshop for CPU0 only. Refer to section 4, Preparations for Debugging, for the other activating method to create a new project or use an existing workspace. 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use When the [Open workspace] dialog box is opened, specify the following directory: : \WorkSpace\Tutorial\E10A-USBM\xxxx\xxxx\Tutorial\CPU0 (xxxx represents the device group name). After the directory has been specified, select the following file and click the [Open] button. Figure 3.16 [Open The Workspace] Dialog Box R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6. Section 3 Preparation before Use The [CPU Select] dialog box or [Select Emulator mode] dialog box is displayed. Figure 3.17 [CPU Select] Dialog Box The [CPU Select] dialog box has the following options. • [Search the best JTAG clock] check box Selects finding of the fastest usable JTAG clock value, and starting up with this as the initial value.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use 7. The [Select Emulator mode] dialog box is displayed and indicates the device group to be used. Figure 3.18 [Select Emulator mode] Dialog Box The [Select Emulator mode] dialog box has the following options. • [Reset assert (Auto Connect)] check box A reset signal is generated by the emulator, and steps 12 and 14 are skipped.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 8. Section 3 Preparation before Use The [Connecting] dialog box is displayed and connection of the emulator starts. Figure 3.19 [Connecting] Dialog Box 9. The dialog box shown in figure 3.21 is displayed if no product groups have been installed in the emulator at the time of purchase or the emulator firmware has been set up for a different device group. The dialog box shown in figure 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Figure 3.21 Dialog Box to Confirm Updating of the SHxxxx Emulator Firmware CAUTION The USB cable must not be disconnected until writing is complete.Early disconnection may damage the emulator. 10. When the Reset assert (Auto Connect) option is in use, the dialog box shown in figure 3.22 is displayed. When the power of the user system is turned on, figure 3.22 is not displayed. Figure 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use 14. Input the reset signal from the user system, and click the [OK] button. 15. If no reset signal is detected, the following dialog box is displayed. Figure 3.24 [Can not find /RESET signal] Dialog Box 16. If the "Connected" is displayed in the [Output] window of the High-performance Embedded Workshop for CPU0, starting up the emulator is completed. Figure 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Figure 3.26 [Can not find /RESET signal] Dialog Box (b) If the following dialog box is displayed, check that the H-UDI port connector on the user system is correctly connected. Figure 3.27 [Check the connection] Dialog Box (c) If the following dialog box is displayed, the device may not correctly operate. Check if there are reasons for illegal device operation. Figure 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use Figure 3.29 [INVALID ASERAM FIRMWARE!] Dialog Box Figure 3.30 [Error JTAG boot] Dialog Box (d) The following dialog box is displayed when the MCU cannot communicate with the emulator. The MCU may not operate correctly; check the MCU settings. Figure 3.31 [Boot Failed!] Dialog Box R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 3 Preparation before Use 2. If an incorrect driver has been selected, the following dialog box will appear. Figure 3.32 [Unable to restore the previous driver settings] Dialog Box 3. If the emulator is not activated due to other reasons, a message box corresponding to the status is displayed. Use the message as a reference to check the wiring on the board. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging Section 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. Connect the emulator to the host computer and the user system, then turn on the user system. 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging The following describes how to activate the High-performance Embedded Workshop when selecting [Create a new project workspace] without any toolchain, [Create a new project workspace] with a toolchain, and [Browse to another project workspace].
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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. Here, for example, enter ‘test’. [Project Name] edit box: Enter the project name.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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.4 [Setting the Target System for Debugging] Dialog Box Check the target emulator and click the [Next] button. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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. Select the CPU core numbers for debugging from the [Core] drop-down list box. 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.1.2 Section 4 Preparations for Debugging Creating a 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. Figure 4.6 [Welcome!] Dialog Box R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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’. [Project Name] edit box: Enter the project name. When the project name is the same as the workspace name, it needs not be entered.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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 the target emulator and click the [Next] button. Mark other products as required. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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. Selects the CPU core numbers for debugging from the [Core] drop-down list box. Figure 4.9 [New Project –8/9– Setting the Debugger Options] Dialog Box This is the end of the emulator setting. Exit the Project Generator according to the instructions on the screen.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging (a) Connecting the emulator after the setting at emulator activation Select [Debug settings] from the [Debug] menu to open the [Debug Settings] dialog box. It is possible to register the download module or the command chain that is automatically executed at activation. For details on the [Debug Settings] dialog box, refer to section 4.3, Setting at Emulator Activation.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging 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. The setting for using the emulator has been registered in this session file. After selected, the emulator is automatically connected. 4.1.3 Selecting an Existing Workspace 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging Figure 4.12 [Open Workspace] Dialog Box 3. This activates the High-performance Embedded Workshop and recovers the state of the selected workspace at the time it was saved. When the saved state information of the selected workspace includes connection to the emulator, the emulator will automatically be connected.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.2 Section 4 Preparations for Debugging Creating a Project for Synchronized Debugging For synchronized debugging, the workplace must include as many projects as the number of cores to be debugged. 4.2.1 Adding a New Project 1. Select the [Insert Project] dialog box from the [Project] menu of a workspace opened or created by following the procedure in Section 4.1.1, Creating a New Workspace (Toolchain Not in Use), Section 4.1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging Figure 4.14 [Insert New Project] Dialog Box 3. Create a new project by following the procedure in Section 4.1.1 Creating a New Workspace (Toolchain Not in Use) or Section 4.1.2 Creating a New Workspace (Toolchain in Use). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.2.2 Section 4 Preparations for Debugging Adding an Existing Project 1. Select the [Insert Project] item from the [Project] menu of a workspace opened or created by following the procedure in Section 4.1.1, Creating the New Workspace (Toolchain Not in Use), Section 4.1.2, Creating the New Workspace (Toolchain in Use), or Section 4.1.3, Selecting an Existing Workspace. The [Insert Project] dialog box is opened. Figure 4.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.3 4.3.1 Section 4 Preparations for Debugging Setting at Emulator Activation 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging Figure 4.17 [Debug Settings] Dialog Box ([Options] Page) The command chain that is automatically executed at the specified timing is registered.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.3.2 Section 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 righthand mouse button and select [Download module] to start downloading the module. Figure 4.18 Download Menu of the [Workspace] Window ([Projects]) Notes: 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.4 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. Sessions are not directly related to a configuration.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging • From the dialog box 1. Select [Debug -> Debug Sessions…]. This will open the [Debug Sessions] dialog box (figure 4.17). Figure 4.20 [Debug Sessions] Dialog Box 2. Select the session you want to use from the [Current session] drop-down list box. 3. Click the [OK] button to set the session. 4.4.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging Figure 4.21 [Add new session] Dialog Box • To import an existing session into a new session file 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.17). 2. Click the [Add…] button to display the [Add new session] dialog box (figure 4.18). 3. Check the [Use an existing session file] radio button. 4. Enter a name for the session. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging • To remove a session 1. Select [Debug -> Debug Sessions…] to display the [Debug Sessions] dialog box (figure 4.17). 2. Select the session you would like to remove. 3. Click the [Remove] button. Note that the current session cannot be removed. 4. Click the [OK] button to close the [Debug Sessions] dialog box. • To view the session properties 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging 4. Specify the location to save the new file. 5. If you want to export the session file to another location, leave the [Maintain link] check box unchecked. If you would like the High-performance Embedded Workshop to use this location instead of the current session location, check the [Maintain link] check box. 6. Click the [Save] button. Figure 4.23 [Save Session] Dialog Box 4.4.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.5 Section 4 Preparations for Debugging Connecting the Emulator Select either of the following two ways to connect the emulator: (a) Connecting the emulator after the setting at emulator activation Select [Debug settings] from the [Debug] menu to open the [Debug Settings] dialog box. It is possible to register the download module or the command chain that is automatically executed at activation.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 4 Preparations for Debugging In the list box that is circled in figure 4.21, 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. The setting for using the emulator has been registered in this session file. After the session file name is selected, the emulator will automatically be connected.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 4.7 Section 4 Preparations for Debugging Ending a Session with 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 ( ).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Section 5 Debugging 5.1 Setting up Synchronized Debugging This section describes how to make the settings for synchronized debugging. For details of functions and operations in synchronized debugging, refer to section 18, Synchronized Debugging Functions in the user’s manual for V. 4.09 of the High-performance Embedded Workshop. 5.1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.1.2 Section 5 Debugging [Synchronization session] List Box In the [Synchronization session] list box, set the condition for the synchronization session. Lists that can be set are shown below. [Debugger ID] [Status] This setting is for a unique ID that can specify the debugging *1 session. Ensure that the setting is capable of doing so. Display the state of the session.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.1.3 Section 5 Debugging [Synchronization style] Group Box In the [Synchronization style] group box, set the direction of synchronization operations. Lists that can be set are shown below. [None] Synchronization is not performed. All sessions operate individually. [Synchronization at all debugger] For checked functions in the [Synchronization options] group box, perform synchronization with all sessions in both directions.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.1.4 Section 5 Debugging [Synchronization options] Group Box In the [Synchronization style] group box, select the operations for synchronization. The available items are as listed below. [Reset] Operations in response to the [Reset CPU] and [Reset Go] functions are synchronized. For synchronization of the response to the [Reset Go] function, the [Go] check box must also should be checked.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.1.5 Section 5 Debugging [Memory update] Options Figure 5.2 [Memory update] option When this option is checked all High-performance Embedded Workshop views which display memory data (e.g. the memory view, the watch view etc.) in all Debuggers will update whenever the * memory is changed in any synchronized Debugger. If the option is not set then only the memory views in local Debugger will update when memory is changed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.2 Section 5 Debugging Setting the Environment for Emulation This section describes the debugging operations and their related windows and dialog boxes. 5.2.1 Opening the [Configuration] Dialog Box Selecting [Setup -> Emulator -> System…] or clicking the [Emulator System] toolbar button ( opens the [Configuration] dialog box. 5.2.2 ) [General] Page On the [General] page, make basic emulator settings for a specific CPU.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.3 [Configuration] Dialog Box ([General] Page) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Items that can be displayed in the sheet are listed below. [Mode] [Step option] Displays the CPU number. Sets the step interrupt option. Disable interrupts during single step execution: Disables * interrupts during step execution. Enable interrupts during single step execution: Enables interrupts during step execution.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.2.3 Section 5 Debugging [Common Setting] Page On the [Common Setting] page, make basic emulator settings for both CPUs. These settings are common to the CPUs. Figure 5.4 [Configuration] Dialog Box ([Common Setting] Page) Items that can be set on this page are listed below. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Mode] Indicates the device name. [Emulation mode] Selects the mode of emulation for user programs. Normal: Normal execution of emulation for the user program. No break: The user program is executed with settings of PC breakpoints and hardware breakpoints temporarily disabled. [UBC mode] Set the UBC mode. Eml: The UBC is used as an event condition by the emulator. User: The UBC is released to the user.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [Timeout] Section 5 Debugging Set the period of waiting before a timeout error is considered to have occurred. The setting is in three-second units over the range from three to thirty seconds. Note: If ″User″ is selected, certain functions are not available. Since this depends on the product in use, consult the online help system for details.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.5 [Configuration] Dialog Box ([Loading flash memory] Page) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Items that can be displayed in the sheet are listed below. [Loading flash memory] Sets Enable for flash memory downloading. At Enable, when the flash memory is downloaded on the High-performance Embedded Workshop, the write module is always called. Disable: Not download to the flash memory Enable: Download to the flash memory [Erasing flash memory] Sets Enable for erasing before the flash memory is programmed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.3 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). In most cases, for example if an Elf/Dwarf2-based project is moved from its original path, the source file may not be automatically found.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.6 [Source] Window In this window, the following items are shown on the left as line information.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.7 Popup Menu Note: The contents of the Event column are erased when conditions other than the address condition are added to each channel by using the [Edit] menu or in the [Event] window. S/W breakpoint column S/W breakpoint column displays the following items: : A bookmark is set. : A PC Break is set. : PC location To switch off a column in all source files 1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.8 [Global Editor Column States] Dialog Box To switch off a column in one source file 1. Open the source file which contains the column you want to remove and click the [Edit] menu. 2. Click the [Columns] menu item to display a cascaded menu item. The columns are displayed in this popup menu. If a column is enabled, it has a tick mark next to its name.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.9 [Disassembly] Window 5.3.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.10 [Assembler] Dialog Box The address, machine code, and disassembled instruction are displayed. Enter the new instruction or edit the current instruction in the [Mnemonic] field.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Note: The assembly-language display is disassembled from the machine code on the actual memory. If the memory contents are changed, the dialog box (and the [Disassembly] window) will show the new assembly-language code, but the display content of the [Editor] window will not be changed. This is the same even if the source file contains assembly codes. 5.3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.4 Section 5 Debugging Displaying Memory Contents in Realtime Use the [Monitor] window to monitor the memory contents during user program execution. These settings can be made per CPU. Note: This function is not supported in some devices to be debugged. For details on the specifications of each product, refer to the online help. 5.4.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.12 [Monitor Setting] Dialog Box [Name]: Decides the name of the monitor window. [Options]: Sets monitor conditions. [Address]: Sets the start address for monitoring. [Size]: Sets the range for monitoring. [Access]: Sets the access size to be displayed in the monitor window. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Auto-Refresh at rate]: Sets the interval for acquisition by monitoring. [Reading the Initial Value]: Selects reading of the values in the monitored area when the monitor window is opened. [Color]: Sets the method to update monitoring and the attribute of colors. [Change Indicator]: Selects how to display the values that have changed during monitoring (available when [Reading the Initial Value] has been selected).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.13 [Monitor] Window During user program execution, the display is updated according to the setting value of the autoupdate interval. Note: Select [Refresh] from the popup menu when data is not displayed correctly after changing the address or content of memory. 5.4.2 Changing the Monitor Settings Selecting [Monitor Settings...
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.4.5 Section 5 Debugging Monitoring Variables Using the [Watch] window refers to the value of any variables. When the address of the variable registered in the [Watch] window exists within the monitoring range that has been set by the Monitor function, the value of the variable can be updated and displayed. This function allows checking the content of a variable without affecting the realtime operation. 5.4.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.4.7 Section 5 Debugging Managing the [Monitor] Window Selecting [Display -> CPU -> Monitor -> Windows Select…] displays the [Windows Select] dialog box. In this window, the current monitoring condition is checked and the new monitoring condition is added, edited, and deleted in succession. Selecting multiple monitoring conditions enables a temporary stop of update, hiding, and deletion. Figure 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.5 Section 5 Debugging Viewing the Current Status Choose [View -> CPU -> Status] or click the [View Status] toolbar button ( window and see the current status of the debugging platform. ) to open the [Status] Figure 5.16 [Status] Window The [Status] window has three sheets: • [Memory] sheet Contains information about the current memory status including the memory-mapping resources and the areas used by the currently loaded object file.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.6 Section 5 Debugging Using the Event Points The emulator has the event point function that performs breaking, tracing, and execution time measurement by specifying more complex conditions along with the PC breakpoints standard for the High-performance Embedded Workshop. 5.6.1 PC Breakpoints When the instruction at an address specified as a PC breakpoint is fetched, the user program is stopped. Up to 255 points can be set.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.6.3 Section 5 Debugging Opening the [Event] Window Select [View -> Code -> Eventpoints] or click the [Eventpoints] toolbar button ( [Event] window. ) to open the The [Event] window has the following two sheets: [Breakpoint] sheet: Displays the settings made for PC breakpoints. It is also possible to set, modify, and cancel PC breakpoints. [Event condition] sheet: Displays or sets the settings made for event condition channels. 5.6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Condition] An address that the breakpoint is set Address = Program counter (Corresponding file name, line, and symbol name) [Action] Operation of the emulator when a break condition is satisfied Break: Breaks program execution Notes: 1. PC breakpoints can only be set when all of synchronized execution, synchronized stepping, and synchronized breaks have been selected. 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.6.10 Section 5 Debugging Delete All Removes all breakpoints. 5.6.11 Go to Source Only enabled when one breakpoint is selected. Opens the [Source] window at the address of the breakpoint. 5.6.12 [Breakpoint] Dialog Box Figure 5.18 [Breakpoint] Dialog Box This dialog box specifies break conditions. A breakpoint address to be set is specified in the [Value] edit box. The PC register can also be specified such as #PC.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging When [Value] is selected, if an overloaded function or class name including a member function is specified in address, the [Select Function] dialog box opens. Clicking the [OK] button sets the break conditions. Clicking the [Cancel] button closes this dialog box without setting the break conditions. 5.6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging PAn_Start_Point: Measurement on performance analysis channel n starts. PAn_End_Point: Measurement on performance analysis channel n ends. When a channel is double-clicked in this window, the [Event condition] dialog box is opened and the conditions can be modified. For details on the [Event condition] dialog box, refer to the on-line help for each product.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.6.20 Section 5 Debugging Sequential Conditions Sets the sequential condition of the channel. 5.6.21 Editing Event Conditions Handlings for settings other than PC breakpoints and event conditions are common. The following describes examples of such handling. 5.6.22 Modifying Event Conditions To modify an event condition, select an event condition to be modified, and choose [Edit...
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.6.27 Section 5 Debugging Viewing the Source Line for Event Conditions Select an event condition and choose [Go to Source] from the popup menu to open the [Source] or [Disassembly] window at the address of the event condition. The [Go to Source] menu is only available when one event condition that has the corresponding source file is selected. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [IP] The amount of acquired trace information [CPU ID] Type of the CPU core: CPU0: Trace is made for CPU0 CPU1: Trace is made for CPU1 [Master] Master device that generated the event. CPU: CPU0 was the master. DMA: The DMAC was the master.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [Size] Display the size of access: BYTE: Byte WORD: Word LONG: Longword [Instruction] Instruction mnemonic [Time stamp] Time stamp, in cycles of Bφ [Source] The C/C++ or assembly-language source program [Label] Label information Section 5 Debugging Selecting the [Set…] menu in the popup menu of the [Trace] window displays the [Acquisition] dialog box.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Master] Master device that generated the event: CPU: CPU0 was the master [Type] Type of the trace information: BRANCH: Branch source DESTINATION: Branch destination MEMORY: Memory access S_TRACE: Executed Trace(x) function LOST: Lost trace information (only in the realtime mode) CPU-WAIT: CPU was waiting for the output of the trace information (only in the non-realtime mode) [Branch Type] Type of the branch: GENERAL:
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Note: Since the displayed contents differ depending on the product, refer to each product’s online help. Some supported chips do not have the AUD tracing function. The following items may be displayed for some target devices for debugging. Refer to the additional document ″Supplementary Information on Using the SHxxxx″ and the online help for the specifications of the device. Figure 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Data] Indicates the accessed data When [Type] is S_TRACE, this is the value of the variable x of the trace(x) function [PPC] Output of the performance counter [Instruction] Instruction mnemonic [Source] C/C ++ or assembler source code [Label] Label information It is possible to hide any column not necessary in the [Trace] window.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.23 [Acquisition] dialog box (on [Trace mode] page) [Trace type] Selects the type of tracing function [AUD trace]: Use AUD tracing [Internal trace]: Use internal tracing [User memory trace]: Use the function for the output of trace-data memory. [Trace Mode 1] Decides the kind of operation for consecutive trace information This can be only be used when [AUD trace] or [User Memory trace] is selected.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [Realtime trace]: Some trace information will not be output. [Non realtime trace]: The CPU is made to wait for the output of trace data. [Trace Mode 2]: Decides whether or not operation continues after the trace buffer of the emulator is full. This can only be used when [AUD trace] or [User Memory trace] is selected. [Trace continue]: Continue to acquire the latest information by overwriting the oldest trace information.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (1) [Trace mode] page Sets trace acquisition conditions. Figure 5.24 [Acquisition] Dialog Box ([Trace mode] Page) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging This dialog box specifies the methods and conditions for the acquisition of trace information. The following items can be set: [Trace mode]: Set the trace mode conditions [Trace Type]: Selects the type of trace function. [I-Trace]: The internal trace function is used. [AUD function]: The AUD trace function is used. • [Trace mode] page for internal trace ([I-trace] selected) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Figure 5.25 [Acquisition] Dialog Box (when I-trace has been selected) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging This dialog box is used to specify conditions for the acquisition of trace information. When [I-Trace] has been selected: [I-Trace mode]: Set the bus and other conditions for acquisition of the internal trace. [Channel 1] : Set the trace acquisition conditions for channel 1. The same conditions cannot be set for channels 1 and 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [Acquisition] [When trace buffer full] [F-Bus, CPU1] : Trace information is acquired with F-bus access by CPU1 as a condition. [None] : No conditions are set. : Set the conditions for acquisition of the internal trace information. [Read] : Trace information is acquired on reading. [Write] : Trace information is acquired on writing. [PC relative addressing] : Trace information is acquired with the execution address.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging • [Trace mode] page for AUD trace ([AUD function] selected) Figure 5.26 [Acquisition] Dialog Box (when AUD function has been selected) When [AUD function] has been selected R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [AUD mode1] [AUD mode2] Section 5 Debugging : Selection of realtime or non-realtime trace acquisition [Realtime trace] : When the trace information is being generated intensely that the output from the AUD pin incapable of keeping up, the CPU temporarily suspends the output of trace information. Therefore, although the user program is run in real time, the acquisition of some trace information might not be possible.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (2) [AUD Trace(CPU0)] or [AUD Trace(CPU1)] page Figure 5.27 [Acquisition] Dialog Box ([AUD Trace (CPU0)] Page) The settings of either the AUD trace (CPU0) or the AUD trace (CPU1) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Select the AUD trace conditions from the [Trace Settings] when the AUD function is selected. [Branch trace] : Trace information is acquired by the branch source and the branch destination as conditions. [Window trace] : Window trace functions. Memory access information is acquired within the specified area. [Software trace] [Channel A] : Set whether acquire the window trace information from channel A or not.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [Channel A] [Channel B] [Bus state] Aug 10, 2012 : Sets a bus to acquire the window trace. [M-Bus] : Select the M-Bus. [DMAC] : Select the DMA. Set the conditions to acquire the AUD trace. [Read/Write] R20UT0363EJ0500 Rev. 5.00 Section 5 Debugging : Sets tracing of read or write access or both. [Read] : Trace information is acquired on reading. [Write] : Trace information is acquired on writing.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.7.4 Section 5 Debugging Searching for a Trace Record Use the [Trace Find] dialog box to search for a trace record. To open this dialog box, choose [Find...] from the popup menu. These settings are not common to the High-performance Embedded Workshops for the individual CPU. That is, each High-performance Embedded Workshop has its own settings. The [Trace Find] dialog box has the following options: Table 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (1) [General] page Set the range for searching. Figure 5.28 [Trace Find] Dialog Box ([General] Page) [Trace search range]: Sets the range for searching. [No]: Searches for information that does not match the conditions set in other pages when this box is checked. [Upper search]: Searches upwards when this box is checked. [Start pointer]: Enters a PTR value to start a search.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (2) [Address] page Set address condition. Figure 5.29 [Trace Find] Dialog Box ([Address] Page) [Don't care]: Detects no address when this box is checked. [Setting]: Detects the specified address. [Value]: Enter the address value (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (3) [Data] page Set a data condition. Figure 5.30 [Trace Find] Dialog Box ([Data] Page) [Don't care]: Detects no data when this box is checked. [Setting]: Detects the specified data. [Value]: Enter the data value (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (4) [R/W] page Select the type of access cycles. Figure 5.31 [Trace Find] Dialog Box ([R/W] Page) [Don't care]: Detects no read/write condition when this box is checked. [Setting]: Detects the specified read/write condition. [String]: Select a read/write condition (not available when [Don’t care] has been checked). READ: Read cycle WRITE: Write cycle R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (5) [Type] page Select the type of Trace information. Figure 5.32 [Trace Find] Dialog Box ([Type] Page) [Don't care]: Detects no type condition when this box is checked. [Setting]: Detects the specified type condition. [String]: Select a type condition (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (6) [Size] page Select a unit of access. Figure 5.33 [Trace Find] Dialog Box ([Size] Page) [Don't care]: Detects no size condition when this box is checked. [Setting]: Detects the specified size condition. [String]: Select a size condition (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.7.5 Section 5 Debugging Clearing the Trace Information When [Clear] is selected from the popup menu, the trace buffer that stores the trace information becomes empty. If several [Trace] windows are open, all [Trace] windows will be cleared as they all access the same buffer. 5.7.6 Saving the Trace Information in a File Select [Save...
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.7.9 Section 5 Debugging Temporarily Stopping Trace Acquisition To temporarily stop trace acquisition during execution of the user program, select [Halt] from the popup menu. This stops trace acquisition and updates the trace display. Use this method to check the trace information without stopping execution of the user program. 5.7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Set filtering conditions and then press the [OK] button. This starts filtering according to the conditions. Clicking the [Cancel] button closes the [Trace Filter] dialog box, which holds the settings at the time when the dialog box was opened. In filtering, only the trace information that satisfies one or more filtering conditions set in the above pages will be displayed in the [Trace] window.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers [Start PTR]: [End PTR]: Section 5 Debugging Enters a PTR value to start filtering. Enters a PTR value to end filtering. Note: Along with setting the range for filtering, PTR values to start and end filtering can be set in the [Start PTR] and [End PTR] options, respectively. (2) [Address] page Set an address condition. Figure 5.35 [Trace Filter] Dialog Box ([Address] Page) [Don't care]: Detects no address when this box is checked.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging Note: Along with setting the address range, the start and end of the address range can be set in the [From] and [To] options, respectively. (3) [Data] page Set a data condition. Figure 5.36 [Trace Filter] Dialog Box ([Data] Page) [Don't care]: Detects no data when this box is checked. [Setting]: Detects the specified data. [Point]: Specifies single data (not available when [Don’t care] has been checked).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (4) [R/W] page Select the type of access cycles. Figure 5.37 [Trace Filter] Dialog Box ([R/W] Page) [Don't care]: Detects no read/write condition when this box is checked. [Setting]: Detects the specified read/write condition. READ: Detects read cycles when this box is checked (not available when [Don’t care] has been checked).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (5) [Type] page Select the type of Trace information. The selection is not available when a time stamp is acquired. Figure 5.38 [Trace Filter] Dialog Box ([Type] Page) [Don't care]: Detects no type condition when this box is checked. [Setting]: Detects the specified type condition (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging (6) [Size] page Select a unit of the access. Figure 5.39 [Trace Filter] Dialog Box ([Size] Page) [Don't care]: Detects no size condition when this box is checked. [Setting]: Detects the specified size condition (not available when [Don’t care] has been checked). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.7.11 Section 5 Debugging Analyzing Statistical Information Choose [Statistic…] from the popup menu to open the [Statistic] dialog box and analyze statistical information under the specified conditions. Figure 5.40 [Statistic] Dialog Box [Statistic Analysis]: Setting required for analysis of statistical information. [Default]: Sets a single input value or character string. [Range]: Sets the input value or character string as a range.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging [End]: Specify the end value if a range has been set (only available when [Range] has been selected). [Set]: Adds a new condition to the current one. [New]: Creates a new condition. [Result] button: Obtains the result of statistical information analysis. [Clear]: Initializes the settings. [Result] list box: Displays all conditions and results of statistical information analysis. [Close]: Closes this dialog box.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.7.12 Section 5 Debugging Extracting Function Calls from the Acquired Trace Information To extract function calls from the acquired trace information, select [Function Call…] from the popup menu. The [Function Call Display] dialog box will be displayed. Figure 5.41 [Function Call Display] Dialog Box [Setting]: Selects whether or not to extract function calls. [Enable]: Extracts function calls.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 5.8 Section 5 Debugging Analyzing Performance Use the performance analysis function to measure execution performance. The performance analysis function does not affect the realtime operation because it measures execution performance in the specified range by using the on-chip circuit for performance measurement. These settings are not common to the High-performance Embedded Workshops for CPU0 and CPU1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 5 Debugging It is possible to hide any column not necessary in the [Performance Analysis] window. Selecting a column you want to hide from the popup menu displayed by clicking the right-hand mouse button on the header column hides that column. To display the hidden column, select the column from the said popup menu again. 5.8.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Section 6 Tutorial [SH-2A] 6.1 Introduction A tutorial program is provided to introduce the main functions of the emulator. Operation in [Parallel] mode is described with the aid of this program. Explanations where something else is not stated apply to operations of the High-performance Embedded Workshop for CPU1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.2 Section 6 Tutorial [SH-2A] Running the High-performance Embedded Workshop Selects [Renesas] → [High-performance Embedded Workshop] → [High-performance Embedded Workshop from the [Program] item in the [Start] menu. 6.3 Setting up Synchronized Debugging 1. The [Welcome!] dialog box is displayed. Figure 6.1 [Welcome!] Dialog Box Click the [Cancel] button here. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 2. Section 6 Tutorial [SH-2A] Select the [Synchronized debug] from the [Debug] menu to open the dialog box shown below. Figure 6.2 [Synchronized Debug] Dialog Box 3. Click on [New…] and enter the [Setting name for the Synchronized Debug]; for this tutorial, we have used SH2A-DUAL_Tutorial. 4. Click on the [Add] button to open the [Add debugger] dialog box.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.3 [Add Debugger] Dialog Box Note: In case of failure to read the workspace, open the workspace and then read it, in accord with the procedure described in section 3.9, System Check. 5. Click on the [Add] button again to open the [Add debugger] dialog box. Check whether the workspace which was read previously to the [Workspace file] is displayed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.4 [Synchronized Debug] Dialog Box Click on the [Synchronized Debug] button and start up the High-performance Embedded Workshop according to the procedure in section, 3.9 System Check. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.4 Section 6 Tutorial [SH-2A] Setting up the Emulator The clocks which are used for data communications must be set up on the emulator before the program is downloaded. • AUD clock A clock used in acquiring AUD traces. If its frequency is set too low, complete data may not be acquired during realtime tracing. Set the frequency not to exceed the upper limit for the MPU’s AUD clock.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.5 Section 6 Tutorial [SH-2A] Setting the [Configuration] Dialog Box • Select [Emulator] then [Systems…] from the [Setup] menu in the High-performance Embedded Workshop for CPU1 to set a communication clock. The [Configuration] dialog box is displayed. Figure 6.5 [Configuration] Dialog Box • Set appropriate values in the [AUD clock] and [JTAG clock] combo boxes. The clock also operates with the default value.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.6 Section 6 Tutorial [SH-2A] Checking the Operation of the Target Memory for Downloading Check that the destination memory area for downloading is operating correctly. When the destination memory is SDRAM or DRAM, a register in the bus controller of the CPU must be set before downloading. Set the bus controller correctly in the [IO] window according to the memory type to be used.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.7 [Memory] Window • Placing the mouse cursor on a point in the display of data in the [Memory] window and double-clicking allows the values at that point to be changed. Data can also be directly edited around the current position of the text cursor. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.7 6.7.1 Section 6 Tutorial [SH-2A] Downloading the Tutorial Program Downloading the Tutorial Program Download the object program to be debugged. To proceed with source-level debugging with the High-performance Embedded Workshop for CPU0 or the High-performance Embedded Workshop for CPU1, download the debugging information file for the corresponding CPU. • Select [Download module] from [Tutorial.abs] under [Download modules]. Figure 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.7.2 Section 6 Tutorial [SH-2A] 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] in the High-performance Embedded Workshop for CPU1. Figure 6.9 [Editor] Window (Displaying the Source Program) Select a font and size that are legible from the [Format…] option in the [Setup] menu if necessary.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Initially the [Editor] window shows the start of the user program, but the user can use the scroll bar to scroll through the user program and look at the other statements. 6.8 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.10 [Editor] Window (Setting a PC Breakpoint) The symbol • will appear on the line containing the sort function. This shows that a PC breakpoint has been set. Note: The PC breakpoint cannot be set in the ROM area. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.9 Section 6 Tutorial [SH-2A] 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 in the High-performance Embedded Workshop for CPU0 and CPU1. The [Register] window is displayed. Figure 6.11 [Register] Window R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • To change the value of the program counter (PC), double-click the value area in the [Register] window with the mouse. The following dialog box is then displayed, and the value can be changed. Set the program counter to H’00000800 in this tutorial program, and click the [OK] button. Figure 6.12 [Register] Dialog Box (PC) • Change the value of the stack pointer (SP) in the same way.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.15 [Editor] Window (Break State) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] 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.16 [Status] Window Note: The items that can be displayed in this window differ according to the product.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.11 Section 6 Tutorial [SH-2A] 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 of the High-performance Embedded Workshop for CPU1. The [Event] window is displayed. Select the [Breakpoint] sheet. Figure 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.12 Section 6 Tutorial [SH-2A] Referring to Symbols The [Label] window can be used to display the information on symbols in modules. Select [Label] from the [Symbol] submenu of the [View] menu of the High-performance Embedded Workshop for CPU1. The [Label] window is displayed so that the user can refer to the addresses of symbols in modules. Figure 6.18 [Label] Window R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.13 Section 6 Tutorial [SH-2A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.14 Section 6 Tutorial [SH-2A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The user can also add variables to the [Watch] window by specifying those 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. Enter variable p_sam. Figure 6.23 [Add Watch] Dialog Box • Click the [OK] button. The [Watch] window will now also show the instance p_sam. Figure 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The user can click mark ‘+’ at the left side of array a in the [Watch] window to watch all the elements. Figure 6.25 [Watch] Window (Displaying Array Elements) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.15 Section 6 Tutorial [SH-2A] Displaying Local Variables The user can display local variables in a function using the [Locals] window. For example, we will examine the local variables in the main function, which declares four local variables: a, j, i, and p_sam. • Select [Locals] from the [Symbol] submenu of the [View] menu of the High-performance Embedded Workshop for CPU1. The [Locals] window is displayed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.16 Section 6 Tutorial [SH-2A] Stepping Through a Program The High-performance Embedded Workshop provides a range of step menu commands that allow efficient program debugging. Table 6.1 Step Option Menu Command Description Step In Executes each statement, including statements within functions. Step Over Executes a function call in a single step.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.28 [Editor] Window (Step In) • The highlighted line moves to the first statement of the sort function in the [Editor] window in the High-performance Embedded Workshop for CPU1. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.16.2 Section 6 Tutorial [SH-2A] 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 in the High-performance Embedded Workshop for CPU1, or click the [Step Out] button on the toolbar. Note: It takes time to execute this function.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.30 [High-performance Embedded Workshop] Window (Step Out) The data of variable a displayed in the [Watch] window is sorted in ascending order. According to the position in the source code at the start of synchronization of the session for CPU0, stepping out on the CPU0 side may not be completed. In such cases, complete stepping out by selecting the [STOP] button on the toolbar. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.16.3 Section 6 Tutorial [SH-2A] 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. • Move to the change function following the procedures described in section 6.16.2, Executing [Step Out] Command.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.32 [High-performance Embedded Workshop] Window (Step Over) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.17 Section 6 Tutorial [SH-2A] 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 in the High-performance Embedded Workshop for CPU1, or the [Go] button on the toolbar. Figure 6.33 [Go] Button • The program goes into an endless loop.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.18 Section 6 Tutorial [SH-2A] 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 [Event condition] sheet. An overview and setting of the break function are described below. 6.18.1 PC Break Function The emulator can set up to 255 PC breakpoints.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • Click the [Event] window with the right-hand mouse button and select [Add…] from the popup menu. • Enter H'00101060 in the [Address] edit box. Figure 6.36 [Breakpoint] Dialog Box Note: This dialog box differs according to the product. For the items of each product, refer to the online help. • Click the [OK] button. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The PC breakpoint that has been set is displayed in the [Event] window. Figure 6.37 [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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The program runs, and stops at the set PC breakpoint. Figure 6.38 [Editor] Window at Execution Stop (PC Break) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The [Status] window displays the following contents. Figure 6.39 Displayed Contents of the [Status] Window (PC Break) 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. 6.19 Hardware Break Function A method is given below in which the address bus condition is set under Ch1 (IA_OA_DT_CT) as hardware break conditions.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers • Section 6 Tutorial [SH-2A] Select a line of Ch1 (IA_OA_DT_CT) in the [Event] window. When highlighted, doubleclick this line. Figure 6.40 [High-performance Embedded Workshop] Window ([Ch1 (IA_OA_DT_CT]) • The [Event condition1] dialog box is displayed. • Clear the [Don't care] check box in the [Address] page. • Select the [Only program fetched address] radio button and enter H'00101050 as the value in the [Address] edit box.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.41 [Address] Page ([Event condition1] Dialog Box) Note: The items that can be set in this dialog box differ according to the product. For details on the settings for each product, refer to the online help. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • Click the [OK] button. • The first point display in the State line changes from Disable to Enable. • The first point display in the Condition line changes from None to Address = H’00101050 (tutorial.cpp/45) pc Core Select: CPU1 Break (CPU1). Break (CPU1) is displayed for the first point in the Action line.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.42 [Editor] Window at Execution Stop ([Ch1 (IA_OA_DT_CT)]) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The [Status] window displays the following contents. Figure 6.43 Displayed Contents of the [Status] Window ([Ch1 (IA_OA_DT_CT]) 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. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.19.1 Section 6 Tutorial [SH-2A] Setting the Sequential Break Condition The emulator has sequential break functions. Set hardware break conditions as follows: Ch1 (IA_OA_DT_CT): accessed. A break condition is satisfied immediately after address H'00101050 is Ch2 (IA_OA_DT): A break condition is satisfied immediately after address H'00101042 is accessed. Follow the setting method described in the previous section.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] When the setting is completed, the [Event] window will be as shown in figure 6.41. Figure 6.45 [Event condition] Page Soon after set the [Combination action (Sequential or PtoP)], Ch1 (IA_OA_DT_CT) or Ch2 (IA_OA_DT) will be invalid. Select Ch1 (IA_OA_DT_CT) or Ch2 (IA_OA_DT) individually, and click the [Event] window with the right-hand mouse button and select [Enable].
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The program runs and then stops at the condition specified as Event Condition 1. Figure 6.46 [Editor] Window at Execution Stop (Sequential Break) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] The [Status] window displays the following contents. Figure 6.47 Displayed Contents of the [Status] Window (Sequential Break) 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. • The sequential break conditions that have been previously set are deleted.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.20 Section 6 Tutorial [SH-2A] Trace Functions The emulator has two branch-instruction trace functions. • Internal Trace Function Refer to section 5.7, Viewing the Trace Information, to see the setting and displayed contents. • AUD Trace Function This is the large-capacity trace function that is enabled when the AUD pin is connected to the emulator.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.48 [Acquisition] Dialog Box R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Note: The items that can be set in this dialog box differ according to the product. For details on the settings for each product, refer to the online help. Run the program as shown in the example of section 6.19, Hardware Break Function. The trace results are displayed in the [Trace] window after the program execution is completed. Figure 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.50 [Acquisition] Dialog Box R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Note: This dialog box cannot be used in a product that does not support the AUD trace function. The items that can be set in this window differ according to the product. For details on the settings for each product, refer to the online help. The following table shows the options.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] (2) Displaying the trace result • Run the program as shown in the example of section 6.19, Hardware Break Function. The trace results are displayed in the [Trace] window after the program execution is completed. Figure 6.51 [Trace] Window (Example) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.21 Section 6 Tutorial [SH-2A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • Set the same program counter and stack pointer values (PC = H’00000800 and R15 = H’FFF90000) as were set in section 6.8, Setting Registers (again, use the [Register] windows in the High-performance Embedded Workshops for CPU0 and CPU1). After that, click on the [Go] buttons in the High-performance Embedded Workshops for CPU0 and CPU1. The internal RAM area differs according to the MCU.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.22 Section 6 Tutorial [SH-2A] Performance Measurement Function The emulator has performance measurement functions. • Performance measurement function This function applies a counter in the MPU to measure the number of times various events have occurred and cycle count. A start and end condition for counting can be set. Various items that can be measured differ according to the supported MPU. 6.22.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.55 [Performance Analysis] Window Note: The items that can be displayed in this window differ according to the product. For details on the settings for each product, refer to the online help. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 6.23 Section 6 Tutorial [SH-2A] Download Function to the Flash Memory Area The emulator enables downloading to the external flash memory area. This function requires a program for programming the flash memory (hereinafter referred to as a write module), a program for erasing the flash memory (hereinafter referred to as an erase module), and the RAM area for downloading and executing these modules. Notes: 1.
Section 6 Tutorial [SH-2A] SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Table 6.2 Module Interface Module Name Argument Return Value Write module R4(L): Write address R0(L): End code Normal end = 0, Abnormal end = other than 0 R5(L): Access size 0x4220 = byte, 0x5720 = word, 0x4C20 = longword R6(L): Write data Erase module R4(L): Access size 0x4220 = byte, 0x5720 = word, 0x4C20 = longword None Note: The (L) means the longword size.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • Flash memory download method For downloading to the flash memory, set the items on the [Loading flash memory] page in the [Configuration] dialog box, which is opened from [System…], then [Emulator] from the [Setup] menu. Figure 6.56 [Loading flash memory] Page R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Table 6.3 shows the options for the [Loading flash memory] page. Table 6.3 [Loading flash memory] Page Options Option Description [Loading flash memory] radio button Sets Enable for flash memory downloading. [Erasing flash memory] radio button Sets Enable for erasing before the flash memory is programmed. [File name] edit box Sets the file name of the S-type load module including the write and erase modules.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] • Notes on using the flash memory download function The following are notes on downloading to the flash memory. ⎯ When the flash memory download is enabled, downloading to areas other than the flash memory area is disabled. ⎯ Downloading is only enabled to the flash memory area. Perform memory write or PC break only to the RAM area. ⎯ When the flash memory erase is enabled, the [Stop] button cannot stop erasing.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] SHxxxx Flash memory (32 Mbytes) A2-A24 FIA bus buffer A0-A22 CS0 FPGA CE0 CE1,2 CS2 GND OE RD FIA bus buffer WE0 WE 0-7 D0-D7 D0-D31 FD bus buffer D8-D15 8-15 D0-D7 D8-D15 16-23 D0-D7 D8-D15 D0-D7 24-31 D8-D15 Figure 6.57 Flash Memory Wiring Table 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 6 Tutorial [SH-2A] Figure 6.58 [Loading flash memory] Page Notes: 1. When the data has already been written in the flash memory, be sure to select [Enable] for [Erasing flash memory]. If [Disable] is selected, a verify error occurs. 2. When [Erasing flash memory] is selected, it takes about one minute to erase the flash memory (in this example). • Select the object for downloading to the flash memory area. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Section 7 Tutorial [SH-4A] 7.1 Introduction This section describes the main functions of the emulator by using a tutorial program. Explanations where something else is not stated apply to operations of the High-performance Embedded Workshop for CPU0.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.2 Section 7 Tutorial [SH-4A] Running the High-performance Embedded Workshop Selects [Renesas] → [High-performance Embedded Workshop] → [High-performance Embedded Workshop from the [Program] item in the [Start] menu. 7.3 Setting up Synchronized Debugging (1) The [Welcome!] dialog box is displayed. Figure 7.1 [Welcome!] Dialog Box Click the [Cancel] button here.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.2 [Synchronized Debug] Dialog Box (3) Click on [New…] and enter the [Setting name for the Synchronized Debug]; for this tutorial, we have used SH4AM_Tutorial. (4) Click on the [Add] button to open the [Add debugger] dialog box. Click on the [Browse] button then find and read in: : \WorkSpace\Tutorial\E10A-USBM\SH4AM\Tutorial\SH4AM_Internal\SH4AM_Internal.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.3 [Add Debugger] Dialog Box Note: In case of failure to read the workspace, open the workspace and then read it, in accord with the procedure described in section 3.9, System Check. (5) Click on the [Add] button again to open the [Add debugger] dialog box. Check whether the workspace which was read previously to the [Workspace file] is displayed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.4 [Synchronized Debug] Dialog Box Click on the [Synchronized Debug] button and start up the High-performance Embedded Workshop by following the procedure in section, 3.9 System Check. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.4 Section 7 Tutorial [SH-4A] Setting up the Emulator The clocks which are used for data communications must be set up on the emulator before the program is downloaded. • AUD clock A clock used in acquiring AUD traces. If its frequency is set too low, complete data may not be acquired during realtime tracing. The frequency setting must also not exceed the supported device’s upper limit for the AUD clock.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.5 Section 7 Tutorial [SH-4A] Setting the [Configuration] Dialog Box • Select [Emulator] then [Systems…] from the [Setup] menu in the High-performance Embedded Workshop for CPU0 to set a communication clock. The [Configuration] dialog box is displayed. Open the [Common Setting] page. Figure 7.5 [Configuration] Dialog Box • Set appropriate values in the [AUD clock] and [JTAG clock] combo boxes.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Note: The items that can be set in this dialog box differ according to the product. For details on the settings for each product, refer to the online help. • Click the [OK] button to set a configuration. 7.6 Checking the Operation of the Target Memory for Downloading Check that the destination memory area for downloading is operating correctly.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.7 [Memory] Window • Placing the mouse cursor on a point in the display of data in the [Memory] window and doubleclicking allows the values at that point to be changed. Data can also be directly edited around the current position of the text cursor. 7.7 7.7.1 Downloading the Tutorial Program Downloading the Tutorial Program Download the object program to be debugged.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.8 Downloading the Tutorial Program R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.7.2 Section 7 Tutorial [SH-4A] 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] in the High-performance Embedded Workshop for CPU0. Figure 7.9 [Editor] Window (Displaying the Source Program) Select a font and size that are legible from the [Format…] option in the [Setup] menu if necessary.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Initially the [Editor] window shows the start of the user program, but the user can use the scroll bar to scroll through the user program and look at the other statements. 7.8 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.10 [Editor] Window (Setting a PC Breakpoint) The symbol • will appear on the line containing the sort function. This shows that a PC breakpoint has been set. Note: The PC breakpoint cannot be set in the ROM area. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.9 Section 7 Tutorial [SH-4A] 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 in the High-performance Embedded Workshop for CPU0 and CPU1. The [Register] window is displayed. Figure 7.11 [Register] Window R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • 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. For the tutorial program, set the program counters to H’00000800 on the CPU0 side and H’00100800 on the CPU1 side, and then click on the [OK] button. Figure 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.15 [Editor] Window (Break State) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] 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 7.16 [Status] Window Note: The items that can be displayed in this window differ according to the product.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.11 Section 7 Tutorial [SH-4A] 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 of the High-performance Embedded Workshop for CPU0. The [Event] window is displayed. Select the [Breakpoint] sheet. Figure 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.12 Section 7 Tutorial [SH-4A] Referring to Symbols The [Label] window can be used to display the information on symbols in modules. Select [Label] from the [Symbol] submenu of the [View] menu of the High-performance Embedded Workshop for CPU1. The [Label] window is displayed so that the user can refer to the addresses of symbols in modules. Figure 7.18 [Label] Window R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.13 Section 7 Tutorial [SH-4A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.14 Section 7 Tutorial [SH-4A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The user can also add variables to the [Watch] window by specifying those 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. Enter variable p_sam. Figure 7.23 [Add Watch] Dialog Box • Click the [OK] button. The [Watch] window will now also show the instance p_sam. Figure 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The user can click mark ‘+’ at the left side of array a in the [Watch] window to watch all the elements. Figure 7.25 [Watch] Window (Displaying Array Elements) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.15 Section 7 Tutorial [SH-4A] Displaying Local Variables The user can display local variables in a function using the [Locals] window. For example, we will examine the local variables in the main function, which declares four local variables: a, j, i, and p_sam. • Select [Locals] from the [Symbol] submenu of the [View] menu of the High-performance Embedded Workshop for CPU0. The [Locals] window is displayed.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.16 Section 7 Tutorial [SH-4A] Stepping Through a Program The High-performance Embedded Workshop provides a range of step menu commands that allow efficient program debugging. Table 7.1 Step Option Menu Command Description Step In Executes each statement, including statements within functions. Step Over Executes a function call in a single step.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.28 [Editor] Window (Step In) • The highlighted line moves to the first statement of the sort function in the [Editor] window in the High-performance Embedded Workshop for CPU0. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.16.2 Section 7 Tutorial [SH-4A] 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 in the Highperformance Embedded Workshop for CPU0, or click the [Step Out] button on the toolbar. Note: It takes time to execute this function.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The data of variable a displayed in the [Watch] window is sorted in ascending order. Stepping out on the CPU1 side might not be completed. Whether it is or is not depends on the location in the source code when synchronization of High-performance Embedded Workshop for CPU1 is started. In such cases, complete stepping out by selecting the [STOP] button on the toolbar. 7.16.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.32 [High-performance Embedded Workshop] Window (Step Over) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.17 Section 7 Tutorial [SH-4A] 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 in the High-performance Embedded Workshop for CPU0, or the [Go] button on the toolbar. Figure 7.33 [Go] Button • The program goes into an endless loop.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.18 Section 7 Tutorial [SH-4A] 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 [Event condition] sheet. An overview and setting of the break function are described below. 7.18.1 PC Break Function The emulator can set up to 255 PC breakpoints.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • Click the [Event] window with the right-hand mouse button and select [Add…] from the popup menu. • Enter H'000010A8 in the [Address] edit box. Figure 7.36 [Breakpoint] Dialog Box Note: This dialog box differs according to the product. For the items of each product, refer to the online help. • Click the [OK] button. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The PC breakpoint that has been set is displayed in the [Event] window. Figure 7.37 [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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The program runs, and stops at the set PC breakpoint. Figure 7.38 [Editor] Window at Execution Stop (PC Break) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The [Status] window displays the following contents. Figure 7.39 Displayed Contents of the [Status] Window (PC Break) 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. 7.19 Hardware Break Function A method is given below in which the address bus condition is set under Ch1 (IA_OA) as hardware break conditions.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers • Section 7 Tutorial [SH-4A] Select a line of Ch1 (IA_OA) in the [Event] window. When highlighted, double-click this line. Figure 7.40 [High-performance Embedded Workshop] Window ([Ch1 (IA_OA]) • The [Ch1 (IA_OA)] dialog box is displayed. • Clear the [Don't care] check box in the [Address] page. • Select the [Prefetch address break before executing] radio button and enter H'0000108C as the value in the [Address] edit box.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.41 [Address] Page ([CPU Event 1] Dialog Box) Note: The items that can be set in this dialog box differ according to the product. For details on the settings for each product, refer to the online help. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • Click the [OK] button. • The first point display in the State line changes from Disable to Enable. • The first point display in the Condition line changes from None to Address = H’0000108C (tutorial.cpp/45). • The first point display in the Action line displays as Break).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.42 [Editor] Window at Execution Stop ([Ch1 (IA_OA)]) R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The [Status] window displays the following contents. Figure 7.43 Displayed Contents of the [Status] Window ([Ch1 (IA_OA]) 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. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.20 Section 7 Tutorial [SH-4A] Trace Functions The emulator has three branch-instruction trace functions. Trace function can acquired the event shown in below. (a) Branch generation information The branch source and branch destination addresses are acquired. (b) Memory access information within the specified range Memory access in the specified range can be acquired by trace.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] 7.20.2 AUD Trace Function This is the large-capacity trace function that is enabled when the AUD pin is connected to the emulator. When an event for which trace information is to be acquired occurs, trace information is output through the AUD pins in realtime.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] (2) Trace display contents When the program breaks, the following trace results are displayed in the [Trace] window. • PTR: The trace-buffer pointer (+0 from the last instruction to have been executed) • IP: Indicates the number of cycles that have elapsed since the latest trace information was gathered. For branch instructions, the branch source and destination are counted together as one.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Table 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.44 [Trace mode] Page R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] The following table shows the options. Trace Acquisition Mode Type Mode Description Continuous trace occurs Realtime trace When trace information is being generated so intensely that the output from the memory is incapable of keeping up, all the information may not be output. The user program can be executed in realtime, but some trace information will be lost.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.45 [Trace] Window (Example) 7.20.4 Useful Functions of the [Trace] Window The trace window provides the following useful functions. (1) Searches for the specified data. (2) Extracts the specified data. (3) Filters and displays again the specified data. (4) Supplements the information from the branch destination address to the next branch source address. For the usage of those functions, refer to section 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.21 Section 7 Tutorial [SH-4A] MMU Support This function can be used when the supported MPU has an MMU. • TLB window In the emulator, the contents of the TLB table can be easily displayed and edited by selecting [CPU -> TLB] from the [View] menu. For details, refer to the online help. • VP_MAP translation function The MPU, which has an MMU, translates internal addresses (virtual addresses) to actual memory addresses (physical addresses).
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Example: 1. Create VP_MAP tables for translating virtual addresses H'10000 to H'10fff to physical addresses H'4000000 to H'4000fff and virtual addresses H'11000 to H'11fff to physical addresses H'0 to H'fff. >vs 10000 10fff 4000000 (RET) >vs 11000 11fff 0 (RET) >vd (RET) 00010000 00010fff 04000000 00011000 00011fff 00000000 DISABLE 2. Then, enable the VP_MAP tables.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] How to translate addresses depends on the settings of the radio buttons of the [Memory area] group in the [Configuration] dialog box. The following shows how to translate addresses in each setting state. • When the Normal radio button is selected: The VP_MAP table has a priority over the TLB.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Table 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.22 Section 7 Tutorial [SH-4A] 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • Set the same program counter and stack pointer values (CPU0: PC = H’00000800 and R15 = H’00010000, CPU1: PC = H’00100800 and R15 = H’00110000) as were set in section 7.9, Setting Registers (again, use the [Register] windows in the High-performance Embedded Workshops for CPU0 and CPU1). After that, click on the [Go] buttons in the High-performance Embedded Workshops for CPU0 and CPU1.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.23 Section 7 Tutorial [SH-4A] Performance Measurement Function The emulator has performance measurement functions. • Performance measurement function This function applies a counter in the MPU to measure the number of times various events have occurred and cycle count. A start and end condition for counting can be set. Various items that can be measured differ according to the supported MPU. 7.23.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • The [Performance Analysis] window will be displayed. • Place the mouse cursor anywhere within this window, click the right-hand mouse button, and then select [Set] from the popup menu. The [Performance Analysis] dialog box will open. The events to be measured and measuring conditions can be set in this dialog box. Note: The items that can be displayed in this dialog box differ according to the product.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 7.24 Section 7 Tutorial [SH-4A] Download Function to the Flash Memory Area The emulator enables downloading to the external flash memory area. This function requires a program for programming the flash memory (hereinafter referred to as a write module), a program for erasing the flash memory (hereinafter referred to as an erase module), and the RAM area for downloading and executing these modules. Notes: 1.
Section 7 Tutorial [SH-4A] SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Table 7.5 Module Interface Module Name Argument Return Value Write module R4(L): Write address R0(L): End code Normal end = 0, Abnormal end = other than 0, R5(L): Access size 0x4220 = byte, 0x5720 = word, 0x4C20 = longword R6(L): Write data Erase module R4(L): Access size 0x4220 = byte, 0x5720 = word, 0x4C20 = longword None Note: The (L) means the longword size.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • Flash memory download method For downloading to the flash memory, set the items on the [Loading flash memory] page in the [Configuration] dialog box, which is opened from [System…], then [Emulator] from the [Setup] menu. Figure 7.51 [Loading flash memory] Page R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Table 7.6 shows the options for the [Loading flash memory] page. Table 7.6 [Loading flash memory] Page Options Option Description [Loading flash memory] radio button Sets Enable for flash memory downloading. [Erasing flash memory] radio button Sets Enable for erasing before the flash memory is programmed. [File name] edit box Sets the file name of the S-type load module including the write and erase modules.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] • Notes on using the flash memory download function The following are notes on downloading to the flash memory. ⎯ When the flash memory download is enabled, downloading to areas other than the flash memory area is disabled. ⎯ Downloading is only enabled to the flash memory area. Perform memory write or PC break only to the RAM area. ⎯ When the flash memory erase is enabled, the [Stop] button cannot stop erasing.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] SHxxxx Flash memory (32 Mbytes) A2-A24 FIA bus buffer A0-A22 CS0 FPGA CE0 CE1,2 CS2 GND OE RD FIA bus buffer WE0 WE 0-7 D0-D7 D0-D31 FD bus buffer D8-D15 8-15 D0-D7 D8-D15 D0-D7 16-23 D8-D15 D0-D7 24-31 D8-D15 Figure 7.52 Flash Memory Wiring Table 7.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 7 Tutorial [SH-4A] Figure 7.53 [Loading flash memory] Page Notes: 1. When the data has already been written in the flash memory, be sure to select [Enable] for [Erasing flash memory]. If [Disable] is selected, a verify error occurs. 2. When [Erasing flash memory] is selected, it takes about one minute to erase the flash memory (in this example). • Select the object for downloading to the flash memory area. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Section 8 Maintenance and Guarantee Section 8 Maintenance and Guarantee This section describes maintenance, guarantee, repair provisions, and how to request for repair of the emulator. 8.1 User Registration When you purchase our product, be sure to register as a user. For user registration, refer to the section of ‘User Registration’ (p. iii) of this user's manual. 8.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 8.4 Section 8 Maintenance and Guarantee Repair Provisions (1) Repair with Extra-Charge The products elapsed more than one year after purchase can be repaired with extra-charge. (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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 8.5 Section 8 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. Make sure that information in the Repair Request Sheet is written in as much detail as possible to facilitate repair.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix A Troubleshooting Appendix A Troubleshooting 1. I have a text file open in the editor but syntactic color-coding is not being displayed. Ensure that you have named the file (i.e. saved it) and that the “Syntax coloring” check box is set on the “Editor” tab of the “Options” dialog box, which is launched via [Setup -> Options...].
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix B Menus Appendix B Menus Table B.1 shows GUI menus. Table B.1 GUI Menus Toolbar Button Menu Option Shortcut View Disassembly Ctrl + D Opens the [Disassembly] window. Command Line Ctrl + L Opens the [Command Line] window. TCL toolkit Shift + Ctrl + L Opens the [Console] window. Workspace Alt + K Opens the [Workspace] window. Output Alt + U Opens the [Output] window.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix B Menus Table B.1 GUI Menus (cont) Menu Option View (cont) Code Remarks Ctrl + E Opens the [Event] window. Trace Ctrl + T Opens the [Trace] window. Stack Trace Ctrl + K Opens the [Stack Trace] window. Image… Shift + Ctrl + G Opens the [Image] window. Waveform… Shift + Ctrl + V Opens the [Waveform] window. Performance Performance Analysis Shift + Ctrl + P Opens the [Performance Analysis] window.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix B Menus Table B.1 GUI Menus (cont) Option 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. Reset CPU Resets the target hardware and sets the PC to the reset vector address. Remarks Go F5 Starts executing the user program at the current PC.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix B Menus Table B.1 GUI Menus (cont) Menu Option Debug (cont) Step Mode Shortcut Remarks Auto Steps only one source line when the [Source] window is active. When the [Disassembly] window is active, stepping is executed in a unit of assembly instructions. Assembly Executes stepping in a unit of assembly instructions. Source Steps only one source line. Halt Program Esc Stops the execution of the user program.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes Appendix D Notes 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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes ⎯ Variable name specification When a name other than a variable name, such as a symbol name or function name, is specified, no data is displayed. Example: The function name is main. main = 5. Line Assembly ⎯ Input radix Regardless of the Radix setting, the default for line assembly input is decimal. Specify H’ or 0x as the radix for a hexadecimal input. 6.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes 8. Load of Motorola S-type Files This HEW does not support Motorola S-type files with only the CR code (H'0D) at the end of each record. Load Motorola S-type files with the CR and LF codes (H'0D0A) at the end of each record. 9. Note on [Register] Window Operation During Program Execution The register value cannot be changed in the [Register] window during program execution.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes 15. Memory Access during User Program Execution When a memory is accessed from the memory window, etc. during user program execution, the user program is resumed after it has stopped in the emulator to access the memory. Therefore, realtime emulation cannot be performed. The stopping time of the user program is as follows: Environment: ® Host computer: 3 GHz (Pentium 4) SH7265R: System clock frequency 66.6 MHz JTAG clock: 2.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes 21. Sleep States for the PC While the Emulator is in Use Do not place the PC in sleep or hibernation states while the emulator is in use. Once the PC has entered those states, the emulator is unusable. If the PC does enter the sleep or hibernation state while the emulator is in use, reconnect the emulator after the PC has recovered from the given state. 22.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix D Notes The procedure for manually installing the USB driver is given below. 1. Double click on : \drivers\Renesas_E_Series_USB\dpinst.exe‚ and execute dpinst.exe. 2. The [User Account Control] dialog box is displayed. Even though the message "An unidentified program wants access to your computer.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix E Diagnostic Test Procedure Appendix E Diagnostic Test Procedure For the diagnostic test procedure using the emulator test program, refer to the test program manual for the emulator (file name: E10A-USBMTME.pdf) on the CD-R (E10A-USB Emulator for Multicore Microcomputers). R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix E Diagnostic Test Procedure . R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix F Repair Request Sheet Appendix F Repair Request Sheet Thank you for purchasing the E10A-USB emulator (HS0005KCU04, HS0005KCU14H). In the event of a malfunction, fill in the repair request sheet on the following pages and send it to your distributor. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers 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 occurred Month/Day/Year {at system initiation, in system operation} *Circle either of items in the braces { }. 2. Frequency of generation of the malfunction ( ) times in ( ) {day(s), week(s), or month(s)} 3.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers Appendix F Repair Request Sheet Item Symptom 4. Settings when the malfunction occurred (1) MCU: Type number: (2) Operating frequency: MHz 5. Failure phenomenon 6. Error in debugging 7. Error in the diagnostic program 8. The High-performance Embedded Workshop does not link-up with the emulator. Content of the error message For errors other than the above, fill in the box below. R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers R20UT0363EJ0500 Rev. 5.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers User’s Manual Publication Date: Rev.5.
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.
SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers User’s Manual R20UT0363EJ0500