HS0005KCU04H Renesas Electronics America, HS0005KCU04H Datasheet
HS0005KCU04H
Specifications of HS0005KCU04H
Related parts for HS0005KCU04H
HS0005KCU04H Summary of contents
Page 1
To our customers, Old Company Name in Catalogs and Other Documents st On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the ...
Page 2
All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm ...
Page 3
... SuperH™ Family E10A-USB Emulator for Multi-core Microcomputers User’s Manual Renesas Microcomputer Development Environment System SuperH™ Family E10A-USB HS0005KCU04HE Rev.2.00 2009.11 ...
Page 4
Rev. 2.00 Nov. 19, 2009 Page REJ10J1766-0200 ...
Page 5
Notes regarding these materials 1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of ...
Page 6
Rev. 2.00 Nov. 19, 2009 Page REJ10J1766-0200 ...
Page 7
IMPORTANT INFORMATION • 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, ...
Page 8
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, ...
Page 9
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 ...
Page 10
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 ...
Page 11
Observe the precautions listed below. Failure 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 not ...
Page 12
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. Always switch OFF the host computer and user system before connecting or ...
Page 13
The High-performance Embedded Workshop is a powerful development environment for embedded applications targeted at Renesas microcontrollers. The main features are: • A configurable build engine that allows you to set-up compiler, assembler and linker options via an easy to use ...
Page 14
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 ...
Page 15
When you have purchased the emulator represented in this user's manual, be sure to register it. As the H/W Tool Customer Registration Sheet is included with this product, fill it in and send the same contents to the following address ...
Page 16
Rev. 2.00 Nov. 19, 2009 Page xiv of xx REJ10J1766-0200 ...
Page 17
Section 1 Overview..............................................................................................1 1.1 Warnings........................................................................................................................... 3 1.2 Environmental Conditions ................................................................................................ 4 1.3 Components ...................................................................................................................... 5 Section 2 Emulator Functions..............................................................................7 2.1 Overview........................................................................................................................... 7 2.2 Trace Functions................................................................................................................. 10 2.2.1 Internal Trace Function........................................................................................ 10 2.2.2 AUD Trace Function............................................................................................ 10 2.2.3 Memory Output Function ...
Page 18
Creating a Project for Synchronized Debugging............................................................... 57 4.2.1 Adding a New Project.......................................................................................... 57 4.2.2 Adding an Existing Project .................................................................................. 59 4.3 Setting at Emulator Activation.......................................................................................... 60 4.3.1 Setting at Emulator Activation............................................................................. 60 4.3.2 Downloading a Program ...................................................................................... 62 4.4 ...
Page 19
Hiding the [Monitor] Window ............................................................................. 94 5.4.7 Managing the [Monitor] Window ........................................................................ 95 5.5 Viewing the Current Status ............................................................................................... 96 5.6 Using the Event Points...................................................................................................... 97 5.6.1 PC Breakpoints .................................................................................................... 97 5.6.2 Event Conditions.................................................................................................. 97 5.6.3 Opening the [Event] ...
Page 20
Temporarily Stopping Trace Acquisition ............................................................ 131 5.7.10 Extracting Records from the Acquired Information ............................................ 131 5.7.11 Analyzing Statistical Information ........................................................................ 138 5.7.12 Extracting Function Calls from the Acquired Trace Information ........................ 140 5.8 Analyzing Performance .................................................................................................... 141 5.8.1 Opening ...
Page 21
Internal Trace Function........................................................................................ 189 6.20.3 AUD Trace Function............................................................................................ 191 6.21 Stack Trace Function ........................................................................................................ 195 6.22 Performance Measurement Function ................................................................................ 197 6.22.1 Performance Measurement Function ................................................................... 197 6.23 Download Function to the Flash Memory Area................................................................ 199 Section 7 Tutorial ...
Page 22
Performance Measurement Function ................................................................................ 261 7.23.1 Performance Measurement Function ................................................................... 261 7.24 Download Function to the Flash Memory Area................................................................ 263 Section 8 Maintenance and Guarantee ................................................................271 8.1 User Registration .............................................................................................................. 271 8.2 Maintenance...................................................................................................................... 271 8.3 Guarantee.......................................................................................................................... 271 8.4 Repair ...
Page 23
The High-performance Embedded Workshop provides a graphical user interface that eases the development and debugging of applications written in the C/C++ programming languages or assembly language for Renesas microcomputers. Its aim is to provide a powerful yet intuitive way of ...
Page 24
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 ...
Page 25
Warnings 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. ...
Page 26
Environmental Conditions Observe the conditions listed in tables 1.1 and 1.2 when using the emulator. Failure will cause illegal operation in the user system, the emulator product, and the user program. Table 1.1 Environmental Conditions Item ...
Page 27
... Monitor resolution: 1024 x 768 or higher Power voltage 5.0 ± 0.25 V (USB-bus power type) Current consumption HS0005KCU04H: 500 mA (max.) CD-ROM drive Required to install the High-performance Embedded Workshop for the emulator or refer to the emulator user’s manual. Microsoft, Windows, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries ...
Page 28
Rev. 2.00 Nov. 19, 2009 Page 6 of 294 REJ10J1766-0200 ...
Page 29
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 ...
Page 30
Table 2.1 Emulator Functions No. Item 1 User program execution function 2 Reset function 3 Trace functions 4 Break functions Rev. 2.00 Nov. 19, 2009 Page 8 of 294 REJ10J1766-0200 Function • Executes a program with the operating frequency within ...
Page 31
Table 2.1 Emulator Functions (cont) No. Item 5 Performance measurement function 6 Memory access functions 7 General/control register access function 8 Internal I/O register access function 9 Source-level debugging function 10 Command line function 11 Help function Note: The [IO] ...
Page 32
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 ...
Page 33
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 ( variable name compiled and linked beforehand. ...
Page 34
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 ...
Page 35
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. • PTR: The trace-buffer pointer (+0 ...
Page 36
Table 2.4 [Trace Window] Display Contents Trace Type Type Column *1 Branch trace BRANCH DESTINATION No display Memory-range MEMORY access trace Software trace S_TRACE System bus MEMORY trace *2 Data lost LOST CPU wait CPU-WAIT *2 generation Notes: 1. Not ...
Page 37
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 ...
Page 38
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 ...
Page 39
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 ...
Page 40
Therefore, an operation such as memory write or BREAKPOINT should be set only for the RAM area and the internal flash memory. When the memory area can be read by the MMU, do not perform memory write, BREAKPOINT setting, ...
Page 41
Section 3 Preparation before Use 3.1 Emulator Preparation Unpack the emulator and prepare it for use as follows: READ the reference sections shaded in figure 3.1 before using the emulator product. Incorrect operation will damage the user system and the ...
Page 42
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 ...
Page 43
The names of each section of the emulator are explained next. 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 ...
Page 44
Core switch LED: 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: ...
Page 45
... User-side connector: A user system interface cable is connected. Emulator Bottom View: (a) Label for product management: (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 ...
Page 46
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 Dlls Microsoft Drivers E10A-USB ...
Page 47
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 ...
Page 48
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 Figure 3.7 System Configuration when Connecting the Emulator to the ...
Page 49
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 disconnect them when moving the emulator or the user system. 1. Check ...
Page 50
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 14-pin connector 2514-6002 38-pin connector 2-5767004-2 Notes: 1. When designing the 14-pin ...
Page 51
User System Figure 3.9 Connecting the User System Interface Cable to the User System when the 38-pin Type Connector is Used Pin 1 Figure 3.10 Connecting the User System Interface Cable to the User System when the 14-pin Type Connector ...
Page 52
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 MPU’s pin assignments. 2. The range of communication ...
Page 53
Connecting System Ground Separate the frame ground from the signal ground at the user system. Failure will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in ...
Page 54
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 ...
Page 55
Emulator control circuit Figure 3.13 Interface Circuits in the Emulator (H-UDI) 3.3V 74LVC2T45 VccB VccA 22 Ω 74LVC2T45 VccB VccA 22 Ω 74LVC2T45 VccA VccB 22 Ω 74LVC2T45 VccA VccB 22 Ω ...
Page 56
Emulator control circuit Figure 3.14 Interface Circuits in the Emulator (AUD) Rev. 2.00 Nov. 19, 2009 Page 34 of 294 REJ10J1766-0200 Reference voltage SN65LVDS33 22 Ω SN65LVDS33 22 Ω SN65LVDS33 22 Ω SN65LVDS33 22 Ω H-UDI port connector UVCC_AUD 10 ...
Page 57
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 ...
Page 58
When the [Open workspace] dialog box is opened, specify the following directory: <Drive where the OS is installed>: \WorkSpace\Tutorial\E10A-USB\MULTI-xxxx\xxxx\CPU0 (xxxx represents the device group name). After the directory has been specified, select the following file and click the [Open] button. ...
Page 59
The [CPU Select] dialog box or [Select Emulator mode] dialog box is displayed. 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, ...
Page 60
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 ...
Page 61
The [Connecting] dialog box is displayed and connection of the emulator starts. 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 ...
Page 62
Figure 3.21 Dialog Box to Confirm Updating of the SHxxxx Emulator Firmware 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 ...
Page 63
Input the reset signal from the user system, and click the [OK] button. 15 reset signal is detected, the following dialog box is displayed. Figure 3.24 [Can not find /RESET signal] Dialog Box 16. If the "Connected" ...
Page 64
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 ...
Page 65
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 ...
Page 66
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 ...
Page 67
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 ...
Page 68
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]. The [Open a recent project workspace] ...
Page 69
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] ...
Page 70
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. Rev. ...
Page 71
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 ...
Page 72
Creating a New Workspace (Toolchain Used 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. Rev. 2.00 Nov. 19, ...
Page 73
The Project Generator is started. If you have purchased the toolchain, the following dialog box is displayed. Figure 4.7 [New Project Workspace] Dialog Box [Workspace Name] edit box: [Project Name] edit box: [CPU family] drop-down list box: Select the ...
Page 74
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 ...
Page 75
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 ...
Page 76
Connecting the emulator after the setting at emulator activation Select [Debug settings] from the [Debug] menu to open the [Debug Settings] dialog box possible to register the download module or the command chain that is automatically executed ...
Page 77
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. In the [Welcome!] dialog box that is displayed when the ...
Page 78
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 ...
Page 79
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] ...
Page 80
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). Rev. 2.00 Nov. ...
Page 81
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 ...
Page 82
Setting at Emulator Activation 4.3.1 Setting at Emulator Activation When the emulator is activated, the command chain can be automatically executed also possible to register multiple load modules to be downloaded. The registered load modules are displayed ...
Page 83
Figure 4.17 [Debug Settings] Dialog Box ([Options] Page) The command chain that is automatically executed at the specified timing is registered. The following four timings can be specified: • At connecting the emulator • Immediately after reset • Immediately before ...
Page 84
Downloading a Program A download module is added under [Download modules] in the [Workspace] window. Open the load module of [Download modules] in the [Workspace] window by clicking the right- hand mouse button and select [Download module] to start ...
Page 85
Debug Sessions The High-performance Embedded Workshop stores all of your builder options into a configuration similar way, the High-performance Embedded Workshop stores your debugger options in a session. The debugging platforms, the programs to be downloaded, and ...
Page 86
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 ...
Page 87
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 ...
Page 88
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 ...
Page 89
Specify the location to save the new file 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 ...
Page 90
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 ...
Page 91
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 ...
Page 92
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 ...
Page 93
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.07 of ...
Page 94
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] [Options] [Type] [Workspace] [Session] Note not mix up session ...
Page 95
Group Box In the [Synchronization style] group box, set the direction of synchronization operations. Lists that can be set are shown below. [None] [Synchronization at all debugger] [Master debugger] Synchronization is not performed. All sessions operate individually. ...
Page 96
Group Box In the [Synchronization style] group box, select the operations for synchronization. The available items are as listed below. [Reset] [Go] [Break/Halt] [Step] [Connect] [Download Modules] [Initialize] Note: The functions that can be set in this ...
Page 97
Options 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. ...
Page 98
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 ...
Page 99
Figure 5.3 [Configuration] Dialog Box ([General] Page) Rev. 2.00 Nov. 19, 2009 Page 77 of 294 REJ10J1766-0200 ...
Page 100
Items that can be displayed in the sheet are listed below. [Mode] [Step option] [Reset assert (Auto Connect)] Note: Includes the interrupts during a break. Do not to use the [Reset assert (Auto Connect)] option unless the port connector is ...
Page 101
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 ...
Page 102
Rev. 2.00 Nov. 19, 2009 Page 80 of 294 REJ10J1766-0200 Indicates the device name. Selects the mode of emulation for user programs. Normal: Normal execution of emulation for the ...
Page 103
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. Note: The effective items and items that can be set in this dialog box ...
Page 104
Figure 5.5 [Configuration] Dialog Box ([Loading flash memory] Page) Rev. 2.00 Nov. 19, 2009 Page 82 of 294 REJ10J1766-0200 ...
Page 105
Items that can be displayed in the sheet are listed below. [Loading flash memory] [Erasing flash memory] [File name] [Bus width of flash memory] [Flash memory erasing time] [Entry point] Sets Enable for flash memory downloading. At Enable, when the ...
Page 106
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 ...
Page 107
In this window, the following items are shown on the left as line information. The first column (Source address column): Address information The second column (Event column): Event information (event condition) The third column (S/W breakpoint column): PC, bookmark, and ...
Page 108
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 ...
Page 109
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 ...
Page 110
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. The address, machine code, and disassembled instruction are displayed. Enter the new ...
Page 111
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] ...
Page 112
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 ...
Page 113
Figure 5.12 [Monitor Setting] Dialog Box [Name]: Decides the name of the monitor window. [Options]: Sets monitor conditions. [Address]: [Size]: [Access]: Sets the start address for monitoring. Sets the range for monitoring. Sets the access size to be displayed in ...
Page 114
Initial Value]: [Color]: Sets the method to update monitoring and the attribute of colors. [Change Indicator]: [Foreground]: [Background]: [Mayfly]: [Detail]: Not supported in the emulator. [History]: Displays the previous settings. Note: Selection of the foreground ...
Page 115
During user program execution, the display is updated according to the setting value of the auto- update 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 ...
Page 116
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 ...
Page 117
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 ...
Page 118
Viewing the Current Status Choose [View -> CPU -> Status] or click the [View Status] toolbar button ( [Status] window and see the current status of the debugging platform. The [Status] window has three sheets: • [Memory] sheet Contains ...
Page 119
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 ...
Page 120
Opening the [Event] Window Select [View -> Code -> Eventpoints] or click the [Eventpoints] toolbar button ( [Event] window. The [Event] window has the following two sheets: [Breakpoint] sheet: Displays the settings made for PC breakpoints also ...
Page 121
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 breakpoints can only ...
Page 122
Delete All Removes all breakpoints. 5.6. Source Only enabled when one breakpoint is selected. Opens the [Source] window at the address of the breakpoint. 5.6.12 [Breakpoint] Dialog Box This dialog box specifies break conditions. A breakpoint address ...
Page 123
When [Value] is selected 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 ...
Page 124
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 ...
Page 125
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 ...
Page 126
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 ...
Page 127
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 ...
Page 128
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 Selecting the [Set…] menu in the popup ...
Page 129
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) ...
Page 130
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 ...
Page 131
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 C assembler source code [Source] [Label] Label information ...
Page 132
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 ...
Page 133
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 ...
Page 134
Refer to the additional document ″Supplementary Information on Using the SHxxxx″ or the online help for the specifications of devices. Rev. 2.00 Nov. 19, 2009 Page 112 of 294 REJ10J1766-0200 ...
Page 135
Sets trace acquisition conditions. Figure 5.24 [Acquisition] Dialog Box ([Trace mode] Page) Rev. 2.00 Nov. 19, 2009 Page 113 of 294 REJ10J1766-0200 ...
Page 136
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. • [Trace mode] page for ...
Page 137
Figure 5.25 [Acquisition] Dialog Box (when I-trace has been selected) Rev. 2.00 Nov. 19, 2009 Page 115 of 294 REJ10J1766-0200 ...
Page 138
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 ...
Page 139
CPU1] [None] [Acquisition] : Set the conditions for acquisition of the internal trace information. [Read] [Write] [PC relative addressing] [Branch] [Software] [Data access] [Instruction Fetch] [When trace : Specify the operation when the trace buffer is completely full. buffer ...
Page 140
AUD trace ([AUD function] selected) Figure 5.26 [Acquisition] Dialog Box (when AUD function has been selected) Rev. 2.00 Nov. 19, 2009 Page 118 of 294 REJ10J1766-0200 ...
Page 141
When [AUD function] has been selected [AUD mode1] : Selection of realtime or non-realtime trace acquisition [Realtime trace] [Non realtime trace] [AUD mode2] : Specify the operation when the trace buffer is completely full. [Trace continue] [Trace stop] [AUD trace ...
Page 142
Trace(CPU0)] or [AUD Trace(CPU1)] page Figure 5.27 [Acquisition] Dialog Box ([AUD Trace (CPU0)] Page) Rev. 2.00 Nov. 19, 2009 Page 120 of 294 REJ10J1766-0200 ...
Page 143
The settings of either the AUD trace (CPU0) or the AUD trace (CPU1) 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 ...
Page 144
A] [Bus state] [Channel B] Set the conditions to acquire the AUD trace. [Read/Write] [Start address] [End address] [Bus state] Rev. 2.00 Nov. 19, 2009 Page 122 of 294 REJ10J1766-0200 : Sets a bus to acquire the window trace. ...
Page 145
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 ...
Page 146
Set the range for searching. Figure 5.28 [Trace Find] Dialog Box ([General] Page) [Trace search range]: Sets the range for searching. [No]: [Upper search]: [Start pointer]: [End pointer]: Note: Along with setting the range for searching, PTR ...
Page 147
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 ...
Page 148
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] ...
Page 149
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 ...
Page 150
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 ...
Page 151
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 ...
Page 152
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 ...
Page 153
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 ...
Page 154
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 ...
Page 155
PTR]: [End PTR]: 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 ...
Page 156
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) ...
Page 157
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 ...
Page 158
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]: ...
Page 159
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 ...
Page 160
Analyzing Statistical Information Choose [Statistic…] from the popup menu to open the [Statistic] dialog box and analyze statistical information under the specified conditions. [Statistic Analysis]: Setting required for analysis of statistical information. [Default]: Sets a single input value or ...
Page 161
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 ...
Page 162
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 ...
Page 163
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 ...
Page 164
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 ...
Page 165
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 ...
Page 166
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. Click the [Cancel] button ...
Page 167
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 ...
Page 168
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 ...
Page 169
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. Rev. 2.00 Nov. 19, 2009 Page 147 of 294 REJ10J1766-0200 ...
Page 170
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 ...
Page 171
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 ...
Page 172
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 ...
Page 173
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 ...
Page 174
Downloading the Tutorial Program 6.7.1 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 ...
Page 175
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 ...
Page 176
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 ...
Page 177
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. ...
Page 178
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 ...
Page 179
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 ...
Page 180
Executing the Program Execute the program as described in the following: • Since the [Go] check box under [Synchronization options] in the [Synchronized debug] dialog box is selected, execute the program by selecting [Go] from the [Debug] menu of ...
Page 181
Figure 6.15 [Editor] Window (Break State) Rev. 2.00 Nov. 19, 2009 Page 159 of 294 REJ10J1766-0200 ...
Page 182
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 ...
Page 183
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 ...
Page 184
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 ...
Page 185
Viewing Memory When the label name is specified, the user can view the memory contents that the label has been registered in the [Memory] window. For example, to view the memory contents corresponding to _main in word size: • ...
Page 186
Watching Variables As the user steps through a program possible to watch that the values of variables used in the user program are changed. For example, set a watch on the long-type array a declared at the ...
Page 187
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 ...
Page 188
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) Rev. 2.00 Nov. 19, 2009 Page 166 of 294 REJ10J1766-0200 ...
Page 189
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 and p_sam. • ...
Page 190
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 Description Command Step In Executes each statement, including statements within functions. Step Over Executes ...
Page 191
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. Rev. 2.00 Nov. 19, 2009 Page 169 of 294 REJ10J1766-0200 ...
Page 192
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 ...
Page 193
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 ...
Page 194
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, ...
Page 195
Figure 6.32 [High-performance Embedded Workshop] Window (Step Over) Rev. 2.00 Nov. 19, 2009 Page 173 of 294 REJ10J1766-0200 ...
Page 196
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 ...
Page 197
Break Function The emulator has PC and hardware break functions. With the High-performance Embedded Workshop breakpoint can be set using the [Breakpoint] sheet of the [Event] window, and a hardware break condition can be set using the ...
Page 198
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. Note: This dialog box differs according to the product. For the items of each product, ...
Page 199
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 ...
Page 200
The program runs, and stops at the set PC breakpoint. Figure 6.38 [Editor] Window at Execution Stop (PC Break) Rev. 2.00 Nov. 19, 2009 Page 178 of 294 REJ10J1766-0200 ...