Home

H8S, H8SX Family E10A-USB Emulator User`s Manual

image

Contents

1. Figure 4 16 New Project Workspace Dialog Box Rev 12 00 Aug 28 2009 Page 69 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging b Select the target MCU and click the Finish button Setting the Target System for Debugging r Targets MH8S xxxx E104 USB SYSTEM CPU H85 2117F E10A USB SYSTEM GPU H8S 2125F E104 USB SYSTEM CPU H8S 2153F E10A USB SYSTEM GPU CJH8S 2158F E104 USB SYSTEM GPU H8S 2164F E104 USB SYSTEM GPU H8S 2168F E104 USB SYSTEM GPU JH8S 2172F E104 USB SYSTEM GPU _JH8S 2189RF E104 USB SYSTEM GPL _JH8S 2215RF E104 USB SYSTEM GPL Miuoc 99100 CNAID CYCTCM f ODII Bs i Target type All Targets Finish Cancel Figure 4 17 Setting the Target System for Debugging Dialog Box c The Select Emulator mode dialog box is displayed Select Emulator mode Device H857 RRR X Mode C E10A USB Emulator Figure 4 18 Select Emulator mode Dialog Box Rev 12 00 Aug 28 2009 Page 70 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging Select the Program Flash mode Note The contents to be displayed differ from each device This is dedicated mode for each device and is incorporated in the internal ROM This is not available for ROM less products Normal debugging is not possible d If the dialog box shown below is displayed turn on the target board and press the OK button h
2. Figure 3 1 Emulator Preparation Flow Chart Rev 12 00 Aug 28 2009 Page 13 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 2 Emulator Hardware Configuration As shown in figure 3 2 the emulator consists of an emulator a USB cable and a user system interface cable The emulator is connected to the host computer via USB 1 1 and also to the USB port conforming to USB 2 0 USB cable E10A USB emulator Figure 3 2 Emulator Hardware Configuration when the 14 pin Type Connector is Used Rev 12 00 Aug 28 2009 Page 14 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use The names of each section of the emulator are explained next Emulator Top View Wi Ww wo 2 Figure 3 3 Emulator Top View a E10A USB logo plate A yellow plate for HSOOOSKCUO1H or a red plate for HS0005KCU02H dedicated for the emulator is provided to be easily distinguished from other E series emulators b Sliding switch cover A cover to protect switches for setting the emulator which is closed to prevent incorrect operation Be sure to close this cover during emulation c ACTION LED Marked ACT When this LED is lit the ELOA USB control software is in operation d Host connector Marked A connector for the host computer is provided at the side of this mark e User connector Marked USER I F A connector for the user system interface cable is provided at the side
3. A Figure 3 11 DIP Switches Rev 12 00 Aug 28 2009 Page 26 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use Table 3 3 shows the relationships between settings and functions of DIP switches 1 to 3 Use the settings depending on the usage of the user system CAUTION Use only the settings shown in table 3 3 Use of other settings will not activate the emulator The USER PROGRAM will be LOST e Settings for use of the 14 pin user interface cable Description The settings of the UVCC pin of the user interface connector apply to SW2 In the H8S H8SX family E10A USB emulator connect the UVCC pin to the VCC power supply that is connected to the VCC pin of the microcomputer for the user system Table 3 3 Switch Settings of the EL0A USB Switch Settings State of the E10A USB swi SW2 SW3 UVCC Condition 0 off 1 1 The emulator is set up 1 on 1 on 1 on 1 8 V to 5 0 V Normal Note The range differs depending on the MCU Rev 12 00 Aug 28 2009 Page 27 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 9 Interface Circuits in the Emulator Figure 3 12 shows interface circuits in the emulator Use them as a reference to determine the value of the pull up resistance Note The 74LVC2G125 operates at VCC 1 8 to 5 0 V from the user system connector User system connector Emulator control circuit on the user system SN74LVC2G125 PI74AVC164245 4 RES i
4. An area occupied by the E10A USB emulator program An instruction in which Break Condition 1 is satisfied Rev 12 00 Aug 28 2009 Page 100 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging During step execution a software breakpoint is disabled A condition set at Break Condition 1 is disabled immediately after starting execution when an instruction at a software breakpoint is executed A break does not occur even if a condition of Break Condition 1 is satisfied immediately after starting the execution When execution resumes from the breakpoint address after the program execution stops at the software breakpoint single step execution is performed at the address before execution resumes Therefore realtime operation cannot be performed Settings of software breakpoint and Break Condition 1 are invalid while the STEP OVER function is being used Rev 12 00 Aug 28 2009 Page 101 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 3 13 Setting Break Conditions On the Breakcondition sheet the settings for break conditions are displayed modified and added wt Event Break condition 1 Disable None Break condition 2 Disable None gt Breakpoint Breakcondition Figure 5 10 Event Window Breakcondition Sheet Note The items that can be set in this window differ depending on the product For details on the settings for each product refer to the online help This window displays and sets the bre
5. CANCEL Figure 3 37 Dialog Box to Confirm Setting up of the Emulator Firmware Rev 12 00 Aug 28 2009 Page 44 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use AN H8S 104 USB emulator firmware will be updated Once you have pressed the OK button do not disconnect the USB cable until Loading is finished Incorrect operation will damage the emulator product i CANCEL Figure 3 38 Dialog Box to Confirm Updating of the H8S Emulator Firmware CAUTION The USB cable must not be disconnected until writing is complete Early disconnection may damage the emulator Note The above dialog boxes are only displayed if you are using the HS0005KCU01H serial No 03311C or later or HSOOOS5KCU02H serial No 04146E or later emulator hardware In this case follow the procedure described in section 3 10 1 Setting up at Purchasing the Emulator or Updating the Version of Software 9 The dialog box is displayed as shown in figure 3 39 or figure 3 40 heu xxxx ad The user system is not supplied with power Turn the power on and click on the OK button Cancel Figure 3 39 Turn Power on Message Box Rev 12 00 Aug 28 2009 Page 45 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use E heuxxxx Figure 3 40 Dialog Box of the Power on Request Message 10 Turn on the user system 11 When using the H8S family microcomputer the dialog box shown in figure 3 41
6. Modify _ Finish Cancel Figure 4 5 Debugger Options Dialog Box This is the end of the emulator setting Click the Finish button to exit the Project Generator The High performance Embedded Workshop is activated 5 After the High performance Embedded Workshop has been activated the emulator is automatically connected For operation during connection refer to section 3 11 System Check Rev 12 00 Aug 28 2009 Page 57 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 1 2 Creating the New Workspace Toolchain Used 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Create a new project workspace radio button and click the OK button Welcome Options Cancel C Open a recent project workspace Administration C Browse to another project workspace Figure 4 6 Welcome Dialog Box Rev 12 00 Aug 28 2009 Page 58 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging 2 The Project Generator is started If you have purchased the toolchain the following dialog box is displayed New Project Workspace Projects Ae Workspace Name S Application ftest E Assembly Application Project Name BT Demonstration fest i SOOSCS Q Empty Application r t5 Import Makefile Directory Library C WorkSpace test Browse gt Debugger only H8S 2112F E G
7. Note Ifa mode is illegally set the error message shown in above figure will be displayed Rev 12 00 Aug 28 2009 Page 49 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use b The following dialog box is displayed when an incorrect ID code has been input For security the flash memory is completely erased heu xxxx A The flash memory has been erased because the ID code was incorrect Figure 3 46 ID code error Dialog Box c The following dialog box is displayed when the MCU cannot communicate with the emulator The MCU may not operate correctly check the MCU settings A Failed to boot up the emulator Figure 3 47 Error H UDI boot Dialog Box d Ifthe following dialog box is displayed check that the user system connector on the user system is correctly connected heuxxxx A Communications between the emulator and the MOU have failed Figure 3 48 Check the connection Dialog Box Rev 12 00 Aug 28 2009 Page 50 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use e If the following dialog box is displayed the version of the firmware in the emulator may be old Set up the firmware by using the setup tool For the usage of the setup tool refer to section 3 10 Setting up the Emulator heu xxxx The current firmware of the E1QA USB emulator is not for the H8S Rewrite the firmware by using the setup tool Figure 3 49 Emulator firmware error 3 Dialog Box
8. of the JTAG clock Selects whether or not the contents of the flash memory are acquired by the emulator when the user program is stopped or the position where the PC break is set is put back as the original code When the flash memory is not reprogrammed by the user program its contents need not be acquired by the emulator If there is no problem with the state that the program in the flash memory has been replaced as the PC break code the position where the PC break is set needs not be put back as the original code e Disable Read or program is not performed for the flash memory except when the emulator is activated the flash memory area is modified and the settings of the PC break to the flash memory area are changed e PC to flash memory When the user program is stopped the specified PC break code is replaced as the original instruction Select this option if there is a problem with the state that the program in the flash memory has been replaced as the PC break code Flash memory to PC When the user program is stopped the contents of the flash memory are read by the emulator Select this option if the flash memory is reprogrammed by the user program PC to flash memory Flash memory to PC When the user program is stopped the contents of the flash memory are read by the emulator and the specified PC break code is replaced as the original instruction Select this option if the flash memory is reprogrammed by the use
9. 7 User system connector Fa Figure 1 1 System Configuration with the Emulator Rev 12 00 Aug 28 2009 Page 1 of 188 RENESAS REJ10J1140 1200 Section 1 Overview The emulator provides the following features Excellent cost performance emulator Compactness and connection to the USB are obtained Realtime emulation Realtime emulation of the user system is enabled at the maximum operating frequency of the CPU Excellent operability Using the High performance Embedded Workshop on the Microsoft Windows 2000 Microsoft Windows XP or Microsoft Windows Vista operating system enables user program debugging using a pointing device such as a mouse The High performance Embedded Workshop enables high speed downloading of load module files Various debugging functions Various break and trace functions enable efficient debugging Breakpoints and break conditions can be set by the specific window trace information can be displayed on a window and command line functions can be used Debugging of the user system in the final development stage The user system can be debugged under conditions similar to the actual application conditions Compact debugging environment When the emulator is used a laptop computer can be used as a host computer creating a debugging environment in any place Rev 12 00 Aug 28 2009 Page 2 of 188 REJ10J1140 1200 RENESAS Section 1 Overview 1 1 Warnings CAUTION READ the
10. BES long H 00001770 FF long H 00001770 FF long H 00001770 FF long H O00a FFEF7A int H OOO01770 FF long Watch1 Watch2 h Watch3 h Watch4 j Figure 6 19 Watch Window Displaying Array Elements Rev 12 00 Aug 28 2009 Page 142 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 13 Stepping Through a Program The High performance Embedded Workshop provides a range of step menu commands that allow efficient program debugging Table 6 2 Step Option Menu Command Description Step In Executes each statement including statements within functions Step Over Executes a function call in a single step Step Out Steps out of a function and stops at the statement following the statement in the program that called the function Step Steps the specified times repeatedly at a specified rate 6 13 1 Executing Step In Command The Step In command steps into the called function and stops at the first statement of the called function e To step through the sort function select Step In from the Debug menu or click the Step In button on the toolbar Y Figure 6 20 Step In Button Rev 12 00 Aug 28 2009 Page 143 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial a ala Line Sourc Event S W Breakpoints Source O00ee8 O00ef0 O00ef8 ooofod ooofos ooof10 Ooof18 ooof20 O00f2c O00f3E long t int i j k gap O
11. Branch trace conditions and the number of branches differ depending on the device 4 Break functions Hardware break function functions and the number of functions differ depending on the device PC break function 255 points Forced break function Rev 12 00 Aug 28 2009 Page 7 of 188 RENESAS REJ10J1140 1200 Section 2 Emulator Functions Table 2 1 Emulator Functions cont No Item Function 5 Memory access functions Downloading to RAM Downloading to flash memory Single line assembly Reverse assembly disassembly Reading of memory Writing to memory Automatic updating of a display of selected variables during user program execution Fill Search Move Copy 6 General control register access function Reads or writes the general control registers 7 Internal I O register access function Reads or writes the internal I O registers 8 Source level debugging Various source level debugging functions function 9 Command line function Supports command input Batch processing is enabled when a file is created by arranging commands in input order 10 Help function Describes the usage of each function or command syntax input from the command line window The specific functions of the emulator are described in the next section Note The number of hardware break conditions trace conditions branches and internal trace functions differs depending on the MCU For the spec
12. In command line interface a file that has the same name as the output file is overwritten without asking the user 22 Usage with Other Products To install the SuperH RISC engine C C compiler package or H8 H8 300 series C C compiler package after installing the emulator software for High performance Embedded Workshop select High performance Embedded Workshop as the component to be installed in Select Components during installation of the compiler package 23 Download of Load Modules When load modules are downloaded select Debug gt Download gt All Download modules 24 Program Flash Mode When microcomputers are continuously programmed be sure to turn the target on or off 25 Memory Access in the Program Flash Mode Memory cannot be accessed in the Program Flash mode In this mode values displayed in the Memory or IO window are dummy 26 Memory Access during Flash Memory Programming During flash memory programming e g user program execution operation for memory accessing such as opening the Memory window is not allowed Values displayed here are dummy Access the memory again after flash memory programming has been completed 27 Download of Programs When programs are downloaded the verify function of memory is not available 28 Manual Navigator Use the following procedure before running a program on Windows Vista 1 Be logged on as an administrator 2 Open the properties of
13. 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 Connect g Connects the debugging a platform Initialize Disconnects the debugging platform and connects it again Disconnect Disconnects the debugging platform This option cannot be used in some products Download Modules Downloads the object program Unload Modules Unloads the object program Rev 12 00 Aug 28 2009 Page 174 of 188 REJ10J1140 1200 RENESAS 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 Rev 12 00 Aug 28 2009 Page 175 of 188 RENESAS REJ10J1140 1200 Appendix C Command Line Functions Rev 12 00 Aug 28 2009 Page 176 of 188 REJ10J1140 1200 RENESAS Appendix D Notes on High performance Embedded Workshop Appendix D Notes on High performance Embedded Workshop 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 Source Level Execution Source file Do no
14. list box Note Here no program has been downloaded For downloading refer to section 5 2 Downloading a Program 4 Click the Options tab Rev 12 00 Aug 28 2009 Page 66 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging Debug Settings PR SessionH8S_xxxx _E10A USB_SYSTEM_ v Target Options Command batch file load timine testi At target connection Command line batch processing IV Disable batch file execution when downloading debug information V Download modules after build Remove breakpoints on download F Disable memory access until after target connection command file execution I Limit disassembly memory access I Do not perform automatic target connection Reset GPU after download module Disable memory access by GUI when target is executing set Figure 4 14 Debug Settings Dialog Box Options Page The command batch file that is automatically executed at the specified timing is registered The following four timings can be specified e At connecting the emulator At target connection e Immediately before downloading Before download of modules e Immediately after downloading After download of modules e Immediately after reset After reset Specify the timing for executing the command batch file in the Command batch file load timing drop down list box In addition register the command batch file to be executed with the specified timing in the Command Line Batch
15. and how to request for repair of the emulator 7 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 7 2 Maintenance 1 If dust or dirt collects on any equipment of this product wipe the board dry with a soft cloth Do not use thinner or other solvents because these chemicals can cause the equipment s surface coating to separate 2 When you do not use this product for a long period for safety purposes disconnect the power cable from the power supply 7 3 Guarantee If your product becomes faulty within one year after its purchase while being used under good conditions by observing IMPORTANT INFORMATION described in this user s manual we will repair or replace your faulty product free of charge Note however that if your product s fault is raised by any one of the following causes we will repair it or replace it with new one with extra charge e Misuse abuse or use under extraordinary conditions e Unauthorized repair remodeling maintenance and so on e Inadequate user s system or misuse of it e Fires earthquakes and other unexpected disasters In the above cases contact your local distributor If your product is being leased consult the leasing company or the owner Rev 12 00 Aug 28 2009 Page 165 of 188 RENESAS REJ10J1140 1200 Section 7 Maintenance and Guarantee 7 4 Repai
16. check the Maintain link check box 6 Click the Save button Rev 12 00 Aug 28 2009 Page 80 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging Release Source a SessionH8 Sheen _E10A USB_SYSTEMhsf Save as type Sessions hsf 7 Cancel I Maintain link Z Figure 4 32 Save Session Dialog Box 4 3 3 Saving Session Information gt To save a session Select File gt Save Session Rev 12 00 Aug 28 2009 Page 81 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 4 Connecting the Emulator Select either of the following two ways to connect the emulator 1 Connecting the emulator after the setting at emulator activation Select Debug settings from the Debug menu to open the Debug Settings dialog box It is possible to register the download module or the command batch file that is automatically executed at activation For details on the Debug Settings dialog box refer to section 4 2 Setting at Emulator Activation When the dialog box is closed after setting the Debug Settings dialog box the emulator will automatically be connected 2 Connecting the emulator without the setting at emulator activation Connect the emulator by simply switching the session file to one in which the setting for the emulator use has been registered Eile Edd Yew Propct Baki Debug Setyp Jools Teg Wirdow Hel D ewe ia BD stackecth ID typecetine Figure 4
17. close and restart or exit the workspace To write the same data to the MCU continuously select Debug gt Initialize and go back to step c displaying Select Emulator mode To exit close the workspace Figure 4 27 Message for Restarting or Exiting Program Flash Mode Rev 12 00 Aug 28 2009 Page 75 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 3 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 This means that multiple sessions can share the same download module and avoid unnecessary program rebuilds Each session s data should be stored in a separate file in the High performance Embedded Workshop project Debug sessions are described in detail below 4 3 1 Selecting a Session The current session can be selected in the following two ways e From the toolbar Select a session from the drop down list box figure 4 28 in the toolbar Debug DetautSession Pai ECs eh a E Figure 4 28 Toolbar Selection Rev 12 00 Aug 28 2009 Page 76 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging e From the dialog box 1 Se
18. f If the following dialog box is displayed the version of the firmware in the emulator may be old Set up the firmware by using the setup tool heu xxxx The version of the E104 USB emulator firmware is incorrect Rewrite the firmware by using the setup tool Figure 3 50 Emulator version error Dialog Box Rev 12 00 Aug 28 2009 Page 51 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use g If the following dialog box is displayed the MCU selected on activating the emulator does not match the actual MCU Select the correct MCU heuxxxx A Failed to identify the MCU Figure 3 51 MCU identification error Dialog Box 3 If an incorrect driver has been selected the following dialog box will appear heu xxxx Driver Communications error f Failed to restore the previous driver settings Will attempt to detect the emulator Figure 3 52 Driver Communications error Dialog Box heu xxxx Driver Communications error Failed to restore the previous driver settings No emulator has been detected Figure 3 53 Driver Communications error Dialog Box Rev 12 00 Aug 28 2009 Page 52 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging Section 4 Preparations for Debugging 4 1 Method for Activating High performance Embedded Workshop This section describes the ways to create and modify workspaces using H8S family H8S xxxx E10A USB SYSTEM Replace H8S xxxx E10A USB
19. window Gra Image Shift Ctrl m Opens the Image window phic G Waveform Shift Ctrl Opens the Waveform window V Setup Radix Hexadecimal 16 Uses a hexadecimal for displaying a radix in which the numerical values will be displayed and entered by default Decimal 10 Uses a decimal for displaying a radix in which the numerical values will be displayed and entered by default Octal Uses an octal for displaying a radix in which the numerical values will be displayed and entered by default Binary Uses a binary for displaying a radix in which the numerical values will be displayed and entered by default Emu System t Opens the Configuration dialog lator box allowing the user to modify the debugging platform settings Start Stop Function Displays the Start Stop function Settings settings dialog box Save Break Opens the Save Break condition condition fz dialog box Load Break Opens the Load Break condition condition gt dialog box Rev 12 00 Aug 28 2009 Page 172 of 188 REJ10J1140 1200 RENESAS Table B 1 Window Functions cont Menu Option Shortcut Appendix B Window Functions Toolbar Button Remarks Debug Debug Sessions Opens the Debug Sessions dialog box to list add or remove the debug session Debug Settings Opens the Debug Settings dialog box to set the debugging conditions or download modules Reset CPU jut Res
20. 3 Click the Properties button to display the Session Properties dialog box figure 4 31 Rev 12 00 Aug 28 2009 Page 79 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging Session Properties Name SessionE104 USB_SYSTEM Location CA hew3 Tools Renesas DebugeComp Platform E104 USB Last modified 11 12 42 Thursday July 31 2003 I Read only Figure 4 31 Session Properties Dialog Box e To make a session read only 1 Select Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 2 Select the session you would like to make read only 3 Click the Properties button to display the Session Properties dialog box figure 4 31 4 Check the Read only check box to make the link read only This is useful if you are sharing debugger setting files and you do not want data to be modified accidentally 5 Click the OK button e To save a session with a different name 1 Select Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 Select the session you would like to save Click the Save as button to display the Save Session dialog box figure 4 32 Specify the location to save the new file AN tie ES 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
21. Message for Driver Selection Click the OK button The following dialog box will appear Rev 12 00 Aug 28 2009 Page 116 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging Driver Details Driver SGI AA v Details Interface hd Channel v Close Figure 5 17 Driver Details Dialog Box 1 Rev 12 00 Aug 28 2009 Page 117 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Select Renesas E Series USB Driver from the Driver drop down list box and open the Channel drop down list box Channel information for two emulators is displayed in the Channel drop down list box as shown in figure 5 18 Driver Details Driver Renesas E Series USB Driver X Details hterface USB interface Channel 45812af45138082 5812at45f38082 081 bOad 7268082 Borren Close Figure 5 18 Driver Details Dialog Box 2 Information displayed in figure 5 18 is the information of the USB connector to which the emulators are connected Note The displayed character strings of the information differ according to the host computer s environment Check which of the character strings of information show emulators Select lt no driver selected gt in the Driver drop down list box and disconnect one emulator from the USB connector After that select Renesas E Series USB Driver in the Driver drop down list box Only information on the USB connector that the emulator is connected to is
22. Repair Request Sheet eeseeeeeeeeeeseeseseessersresressrserrrrrnserseerresseese 185 Rev 12 00 Aug 28 2009 Page xviii of xviii REJ10J1140 1200 2ENESAS Section 1 Overview Section 1 Overview 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 accessing observing and modifying the debugging platform on which the application is running The E10A USB emulator hereafter referred to as the emulator is a support tool for developing the hardware and software of application systems running 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 The emulator enables debugging anywhere indoors or out The host computer for controlling the emulator must be an IBM PC compatible machine with USB 1 1 2 0 Full Speed Figure 1 1 shows the system configuration using the emulator Connected to USB cable 1 5 m a the USB connector cable 1 5 m a V a Host computer with USB interface gest N Ez E CD R ww wo SS User system High performance Connected to Embedded Workshop the USB connector f
23. USB SYSTEM GPU H8S xxxx E104 USB SYSTEM GPU Target type 2000 E Target GPU AI CPUs 7 lt Back ne gt Finish Cancel Figure 4 8 New Project 7 9 Setting the Target System for Debugging Dialog Box Check H8S xxxx E10A USB SYSTEM and click the Next button Mark other products as required Rev 12 00 Aug 28 2009 Page 60 of 188 REJ10J1140 1200 ztENESAS 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 New Project 8 9 Settine the Debugger Options Target name 85 7 xxxx E1IOA USB SYSTEM CPU 2000 lt sinele core gt Configuration name Debue_H8S_ xxxx 104 USB_SYSTEM_ m Detail options Item Setting l hitial session lt Back Next gt Finish Cancel 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 The High performance Embedded Workshop is activated Rev 12 00 Aug 28 2009 Page 61 of 188 7tENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 5 After the High performance Embedded Workshop has been activated connect the emulator However it is not needed to connect the emulator immediately after the High performance Embedded Workshop has been activated To co
24. and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp its affiliated companies and their officers directors and employees against any and all damages arising out of such applications 9 You should use the products described herein within the range specified by Renesas especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges 10 Although Renesas endeavors to improve the quality and reliability of its products IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Please be sure to implement safety measures to guard against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other applicable measures Among others since the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you 11 In c
25. be unchanged This is the same even if the source file contains assembly codes Rev 12 00 Aug 28 2009 Page 95 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 2 5 Viewing a Specific Address When you are viewing your program in the Disassembly window you may wish to look at another area of your program s code Rather than scrolling through a lot of code in the program you can go directly to a specific address Select Set Address from the popup menu and the dialog box shown in figure 5 7 is displayed Set Address Address main Cancel Figure 5 7 Set Address Dialog Box Enter the address in the Address edit box and either click on the OK button or press the Enter key A label name can also be specified as the address The Disassembly window will be updated to show the code at the new address When an overloaded function or a class name is entered the Select Function dialog box opens for you to select a function 5 2 6 Viewing the Current Program Counter Address Wherever you can enter an address or value into the High performance Embedded Workshop you can also enter an expression If you enter a register name prefixed by the hash character the contents of that register will be used as the value in the expression Therefore if you enter the expression pc in the Set Address dialog box the Editor or Disassembly window will display the current PC address It also allows the offset of the cu
26. clock Flash memory synchronization when the user program is stopped Disable Step Over option Executes the step over and step out by using the breakpoint Flash memory write after download Disable Short break Enable Note The range of frequency for the JTAG clock differs depending on the supported device Click the OK button to set a configuration Rev 12 00 Aug 28 2009 Page 125 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 5 Checking the Operation of RAM Check that RAM is operating correctly Display and edit the contents of the memory in the Memory window to check that the memory is operating correctly Note The memory can be installed on the board in some microcomputers In this case however the above way of checking the operation of memory may be inadequate It is recommended that a program for checking the memory be created e Select Memory from the CPU submenu of the View menu and enter the RAM address in the Display Address edit box Here enter H FFC000 Then enter H 000000 and HA FFFFFF in the Scroll Start Address and Scroll End Address edit boxes respectively Display Address Display Address FFCOOO x g Scroll Start Address joo0000 Scroll End Address FFFFFF a Figure 6 2 Display Address Dialog Box Note The settings of the RAM area differ depending on the product For details refer to the hardware manual e Click t
27. cycles Non user mask radio button Does not set mask conditions Mask enabled radio button Sets mask conditions Mask edit box Sets a value to be masked when Mask enabled is selected For masked bits the break condition is satisfied for any values The Bus state group box sets the bus state conditions Option Description Data check box Sets the execution cycle as break conditions Dtc check box Specifies DTC cycle as break conditions Dma check box Specifies DMA cycle as break conditions The Read Write group box sets the read write cycle conditions Option Description Read Write radio button Sets the read write cycle conditions as break conditions Read radio button Sets read cycles as break conditions Write radio button Sets write cycles as break conditions The Count group box sets the break condition satisfaction conditions Option Description Don t care check box Sets no satisfaction count conditions Numbers edit box Sets the satisfaction count as a break condition The maximum count is 65 535 Breaks when the conditions set by the Break Condition dialog box for the specified times are satisfied The default is H 1 Rev 12 00 Aug 28 2009 Page 110 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 4 Viewing the Trace Information For the description on the trace function refer to section 2 2 Trace Functions 5 4 1 Opening the Trace
28. 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 2 Environmental Conditions 4 When moving the host computer or user system take care not to vibrate or damage it 5 After connecting the cable check that it is connected correctly For details refer to section 3 Preparation before Use 6 Supply power to the connected equipment after connecting all cables Cables must not be connected or removed while the power is on Rev 12 00 Aug 28 2009 Page 3 of 188 RENESAS REJ10J1140 1200 Section 1 Overview 1 2 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 1 Environmental Conditions Item Specifications Temperature Operating 10 C to 35 C Storage 10 C to 50 C Humidity Operating 35 RH to 80 RH no condensation Storage 35 RH to 80 RH no condensation Vibration Operating 2 45 m s max Storage 4 9 m s max Transportation 14 7 m s max Ambient gases No corrosive gases may b
29. from the signal ground at the user system Failure to do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY The emulator s signal ground is connected to the user system s signal ground In the emulator the signal ground and frame ground are connected In the user system connect the frame ground only do not connect the signal ground to the frame ground figure 3 10 If it is difficult to separate the frame ground from the signal ground in the user system set the GND for DC power input AC adapter of the host computer and the frame ground of the user system as the same potential If the GND potential is different between the host computer and the user system an overcurrent will flow in the low impedance GND line and thin lines might be burned Signal ground E10A USB emulator User system Signal Figure 3 10 Connecting System Ground Rev 12 00 Aug 28 2009 Page 25 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 8 Setting the DIP Switches AWARNING Do not change switches SW2 and SW3 while the emulator and the user sytem are turned on The changing of switches SW2 and SW3 will result in a FIRE HAZARD and will damage the user system and the emulator product The USER PROGRAM will be LOST The emulator incorporates three switches set all of them to 1 in general and set SW1 to 0 only when the emulator is set up
30. from those given in this section 6 2 Running the High performance Embedded Workshop To run the High performance Embedded Workshop refer to section 3 11 System Check 6 3 Setting up the Emulator This section describes the basic settings of the emulator Rev 12 00 Aug 28 2009 Page 123 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 4 Setting the Configuration Dialog Box Select Emulator then Systems from the Setup menu for the basic settings of the emulator The Configuration dialog box is displayed Configuration General Device 2 Emulation mode Norm sist Step option Disables interrupts during single step execution v JTAG clock 1OMHz ba Elash memory Disse synchronization Disable Step Over option Programming of the flash memory Flash memory write m Disable EEE after download LZ Short break F Disable Er Enable Figure 6 1 Configuration Dialog Box Note The items that can be set in this dialog box differ depending on the product For details on the settings for each product refer to the online help Rev 12 00 Aug 28 2009 Page 124 of 188 REJ10J1140 1200 RENESAS Set options as follows Table 6 1 General Page Options Option Section 6 Tutorial Value Default Device H8S xxxx Emulation mode Normal normal execution Step option Disables interrupts during single step execution JTAG clock Sets the frequency of the JTAG
31. is displayed Input the system clock value The system clock is the input clock System Glock Please input System Glock zl MHz sam Figure 3 41 System Clock Dialog Box 12 Set an eight digit hexadecimal ID code as a security code for the flash memory To read the data that has been written to the internal flash memory input this ID code when the E10A USB Emulator is selected in the Select Emulator mode dialog box and the New ID code check box is unselected on activating the emulator If the ID code is not matched or the New ID code check box is selected the flash memory contents are erased Rev 12 00 Aug 28 2009 Page 46 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use Please input ID Code DOODET04 V New ID code Cancel Figure 3 42 ID Code Dialog Box Rev 12 00 Aug 28 2009 Page 47 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 13 When Connected is displayed in the Output window of the High performance Embedded Workshop the emulator initiation is completed C Tutorial High performance Embedded Workshop JE File Edit View Project Build Debug Setup Tools Test Window Help Doe B amp w w e GR Se es A Debug Hason 108 sessions ox _e10aus z gt t 2 Beare P eos 22 S Gt e aanne B BAA ala p e s r amp Assembly sourc C header file sbrk h sorth E stackscth J source file E dbscte fe
32. j 0008ae ali j 0008de p_sam gt sort a 0008ec p_sam gt changela 0008fc p_sam gt s0 a 0 00090c p_sam gt sl a 1 00091e p_sam gt s2 a 2 000330 p_sam gt s3 a 3 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 000366 p_sam gt s6 a 6 000978 p_sam gt s7 a 7 00098a p_sam gt s8 a 8 00099c p_sam gt s9 a 9 0009ae delete p_sam O003ba 0009c4 void abort void 0009ca Figure 6 30 Editor Window Setting a PC Breakpoint Rev 12 00 Aug 28 2009 Page 151 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial e When the PC breakpoint is set in the Event window click the Event window with the right hand mouse button and select Add from the popup menu Set Break Address Address HOOD0DsFC gl Figure 6 31 Set Break Dialog Box e Click the OK button Note The address values described in this section will differ depending on the tutorial for each product Rev 12 00 Aug 28 2009 Page 152 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial The PC breakpoint that has been set is displayed in the Event window w Event Action Breakpoint Enable Address O0008FC Tutorial cpp 47 Break gt Breakpoint 4 Breakcondition j Figure 6 32 Event Window PC Breakpoint Setting Note The items that can be displayed in this window differ according to the product For the items that can be displayed refer to the online help To stop the
33. 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 Ox for the H8 series microcomputers and xxxxh for the R8C series microcomputers as the radix for a hexadecimal input 6 Command Line Interface Batch file To display the message Not currently available while executing a batch file enter the sleep command Adjust the sleep time length which differs according to the operating environment Example To display Not currently available during memory_fill execution sleep d 3000 memory_fill 0 ffff 0 File specification by commands The current directory may be altered by file specifications in commands It is recommended to use absolute paths to specify the files in a command file so that the current directory alteration is not affected Example FILE_LOAD C HEW Tools Renesas DebugComp Platform E10A USB Tutorial Debug_H8S_xxxx_E10A USB_SYSTEM Tutorial abs 7 Memory Save During User Program Execution Do not execute saving verifying comparing or searching of memory during user program execution 8 Load of Motorola S type Files This High performance Embedded Workshop does not support Motorola S type files with only the CR code H OD at the end of each record Load Motorola S type files with the CR and LF codes H ODOA at the end of each record Rev 12 00 Aug
34. of this mark Note Even if the LED is not lit the USB is not disconnected or malfunctioned Rev 12 00 Aug 28 2009 Page 15 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use Emulator Host side View Figure 3 4 Emulator Host side View a Host side connector A USB connector for the host computer Be sure to connect the provided USB cable Rev 12 00 Aug 28 2009 Page 16 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use Emulator User side View Figure 3 5 Emulator User side View a User side connector A user system interface cable is connected Rev 12 00 Aug 28 2009 Page 17 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use Emulator Bottom View MODEL HSO0005KCU01H HSO0005KCU01H SERIAL No 00001A This device complies with Part 15 of the FCC Rules Operation is subject to the following 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 ee soe Tes CE sH 3 NewSH Mobild Hesx saa sma mes _ sH 4a_ sHh4a pse MADE IN JAPAN Figure 3 6 Emulator Bottom View a Label for product management The serial number revision and safety standard etc of the emulator are written to The contents differ depending on the time when you purchased the product Only one device group can be set up u
35. sessionh8s_1wooc_e10aus v At 4 pau aes e lt 60g 2 eh E HOP Dt H Aid A a a ie S q atx Tutorial ala Tutorial amp Assembly source file Line Sourc Event S W Breakpoints Source C header file 5 aa a cate Sat sorth 00088c j rand _ 2 stackscth 000898 if lt 0 C source file 0008a0 i j j j eis 0008ae ali j amp O source file 0008dc p_sam gt sort a resetpre cpp 0008ec p_sam gt change a sorte a aa 008fc eS ee a 00090c p_sam gt sl a 1 Gq Download modules 00091e p_sam gt s2 a 2 D Tutorialabs 00000000 000930 p_sam gt s3 a 3 amp Dependencies 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 000966 p_sam gt s6 a 6 000978 p_sam gt s a 7 000984 p_sam gt s8 a 8 000990 p_sam gt s9 a 9 0009ae delete p_sam 0009ba 000904 void abort void 0009ca 0009cc z an Eire SORT OPP asx G e Al t 21 21 2 a Value Type Flash memory write end FFEF80 ilong 10 STOP ADDRESS 0 H 00001770 FF long hee pe END T as memory writing 1 H 00001770 FF long Flash memory write end 2 H 00001770 FF long STOP ADDRESS 3 H O0001770 FF To watchs watcha watchs A watcha ST ET Build Debug FindinFiles Macro Test Version Control STOP ADDRESS E Defaulti desktop Read write 47 64 13 N ilong Figure 6 25 High performance Emb
36. 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 To connect the emulator when the saved state information does not include connection to the emulator refer to section 4 4 Connecting the Emulator Rev 12 00 Aug 28 2009 Page 65 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 2 Setting at Emulator Activation 4 2 1 Setting at Emulator Activation A batch file of commands can be specified for automatic execution when the emulator is activated It is also possible to register multiple load modules to be downloaded The registered load modules are displayed on the workspace window 1 Select Debug Settings from the Debug menu to open the Debug Settings dialog box Debug Settings SessionH8S_xxxx_E104 USB_SYSTEM_ v Target Options Target G test H8S xxxx E10A USB SYSTEM GPU 2000 Core Debug format Elf Dwarf2 Download modules Filename Offset Address Format CONFIGDL 00000000 Elt Dwarf2 seth Figure 4 13 Debug Settings Dialog Box Target Page 2 Select the product name to be connected in the Target drop down list box 3 Select the format of the load module to be downloaded in the Default Debug Format drop down list box then register the corresponding download module in the Download Modules
37. status bar The program will be executed up to the breakpoint that has been set and an arrow will be displayed in the S W breakpoint column to show the position that the program has halted with the message BRI EAKPOINT in the status bar Note When the source file is displayed after a break a path of the source file may be inquired The location of the source file is as follows lt Drive where the OS has been installed gt WorkSpace Tutorial E10A USB H8S xxxx Tutorial Here xxxx mea ns the target product group tENESAS Rev 12 00 Aug 28 2009 Page 133 of 188 REJ10J1140 1200 Section 6 Tutorial Event S W Breakpoints Source 000878 p_sam new Sample 000884 for i 0 i lt 10 i 00088c j rand 000898 lt 0 0008a0 joe j 0008ae alil jis O008dc 0008ec p_sam gt change aj 0008fc p_sam gt s0 a 0 00090c p_sam gt sl al1 O0091e p_sam gt s2 a 2 000930 p_sam gt s3 a 3 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 000966 p_sam gt s6 a 6 00888 p lass Sampler Oe2aeazaat 00099c p_sam gt s9 a 9 O009ae delete p_sam O009ba 0009c4 void abort void 0009ca 0009cc a Tutorialcop Figure 6 10 Editor Window Break State Rev 12 00 Aug 28 2009 Page 134 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial The user can see the cause of the break that occurred last time in the Status window e Select Status fro
38. the data bus with a number Low byte radio button Sets data access size as the lower 8 bit access High byte radio button Sets data access size as the upper 8 bit access Word radio button Sets data access size as the word access The Read Write group box sets the read write cycle conditions Option Description Read Write radio button Sets the read write cycle conditions as break conditions Read radio button Sets read cycles as break conditions Write radio button Sets write cycles as break conditions Rev 12 00 Aug 28 2009 Page 107 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Break condition 1 condition i fe Address Only program fetched address Only program fetched address after Address H O Non user mask C User mask a Data V Don t care Cl Bus cycle v Data Read Write Read Write Count V Don t care meen mw Figure 5 12 Break condition 1 Dialog Box H8SX This page sets the address bus data bus and read write cycle conditions Note The items that can be set in this dialog box differ depending on the MCU For details on the settings for each MCU refer to the online help Rev 12 00 Aug 28 2009 Page 108 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging The Address group box sets address bus conditions Option Description Don t care check box Does not set address conditions Address radio button Sets
39. the man_navi exe file in the Manuals folder which is under the folder where the High performance Embedded Workshop has been installed 3 Select Run this program as an administrator on the Compatible tabbed page Note The 64 bit editions of Windows Vista have not been supported Rev 12 00 Aug 28 2009 Page 181 of 188 RENESAS REJ10J1140 1200 Appendix D Notes on High performance Embedded Workshop Rev 12 00 Aug 28 2009 Page 182 of 188 REJ10J1140 1200 RENESAS Appendix E Diagnostic Test Procedure Appendix E Diagnostic Test Procedure For the diagnostic test procedure using the emulator test program refer to the ELOA USB Emulator Test Program Manual file name E1OA USBTME PDF in the E10A USB Emulator software CD Rev 12 00 Aug 28 2009 Page 183 of 188 RENESAS REJ10J1140 1200 Appendix E Diagnostic Test Procedure Rev 12 00 Aug 28 2009 Page 184 of 188 REJ10J1140 1200 RENESAS Appendix F Repair Request Sheet Appendix F Repair Request Sheet Thank you for purchasing the E1OA USB emulator HSOOO05KCU01H or HS0005KCU02H In the event of a malfunction fill in the repair request sheet on the following pages and send it to your distributor Rev 12 00 Aug 28 2009 Page 185 of 188 RENESAS REJ10J1140 1200 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 Ye
40. 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 e Select Memory from the CPU submenu of the View menu and enter the RAM address in the Display Address edit box Here enter H FFC000 Then enter H 000000 and H FFFFFF in the Scroll Start Address and Scroll End Address edit boxes respectively Display Address Display Address main gl Scroll Start Address 000000 l Scroll End Address FFFFFF omei Figure 6 13 Display Address Dialog Box Rev 12 00 Aug 28 2009 Page 137 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial e Click the OK button The Memory window showing the specified area of memory is displayed abc i 3 do de Address Label Register 2 000850 Lmain O0086C 00087C 00088C 00039C OO008AC _0008BC o008cc O008DC OOO8EC OO08FC 00030C 00091C 00092C 00093C 00094C Figure 6 14 Memory Window Rev 12 00 Aug 28 2009 Page 138 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 12 Watching Variables As the user steps through a program it is possible to watch that the values of variables used in the user program are changed For example set a watch on the long type array a declared at the beginning of the program by using the following procedure e Click the left of displayed array a in the Editor window to position the cur
41. 0 5 7 1 Saving and Loading Hardware Break Settings 0 0 eee eeeeesceseeeseeeseeeeeees 120 5 7 2 How to Save Hardware Break SettingS cece eeeeeceseceeeeeseeseeeaeeeseeeeesseesees 120 5 7 3 How to Load Hardware Break Settings 00 0 eeeeeeceeeeceeseeeseeeeeeseeeneesees 120 Section 6 TUTON all 15 4 beraeicazcanccceezantrefaaarcsnatesectesceaseeecceseesetarasanchracanwredsnceeeusaaiess 123 61 Gat OM ag das os asec cs sued saa aceasta de hs acd aE ht E les hea EENE ARNE 123 6 2 Running the High performance Embedded Workshop 0 ecceeceeseesseeseeeseeeseeeseeeneeaes 123 6 3 Setting Up the Fm ators cccsics vac taussascsucdbavcevstcasesnes she ysbesaedssyeseessebesses Slade tes tagesagnebadescsstedebeies 123 6 4 Setting the Configuration Dialog BOX eee eeeeseeeneeeseeeseeeseeeeseesseeeaeesaetenetaes 124 6 5 Checking the Operation Of RAM 000 ee eeeeeseceessceeseeeseeeaeceaeeeecseeeseeeseesaeseaessnesseeaes 126 6 6 Downloading the Tutorial Program 00 eee eee cece cece eeeeeeeeseeeaeceaecseecseeeseeeaeseaeseeeaes 128 6 6 1 Downloading the Tutorial Program occ ese cese cece ceceeeeeseeeaeeeseesseesseeaees 128 6 6 2 Displaying the Source Program 0 eee eeeeseeseeeeceseseeeceeeseeeaeeeaeeneeesseeeeeaees 129 6 7 Sette a PC Breakpoint eonan E a EE R EE EEEE 130 6 6 Setting Registers nosene ipaa a E i AE A aN 131 6 9 Executing the Progra mueira e a SE a E aE lunes 133 Rev 12 00 Aug 28 2009 Page xvii of xviii RENESAS REJ10J114
42. 0 1200 6 10 Reviewing Breakpont ercis arr nia eE ents EE EERE EEE 136 6 11 Viewing Memory itis siseris 5iciiisssrsecesspeneiselecks spcdeeas E aa A RS 137 6 12 Watching V arlables csicscsscveccessevsceciersctpexscsrevaes n aE AO EEEE AEE AEREE AS PERIERE EEE 139 6 13 Stepping Through a Progrann i cccacccicsessessessescteessepessnssinessesssendoasctaceneseseserescsacanbies sipevens 143 6 13 1 Executing Step In Command eee ee eececeeesseeeeeeseeeseeeaeseneseeeseeeeaeeeseee 143 6 13 2 Executing Step Out Command ou eee eee cess eeeeseeeeeeteeeeseseeeteeeteeeeeeeeaeee 145 6 13 3 Executing Step Over Commando eee ceeeeseeeeeseeeseeeaeeeaeseaeteneseeeeseeeaeee 146 6 14 Forced Breaking of Program Executions 00 0 eee eseeseeeseeeseeeeeseeeeseeeaeeeaeeeaeeeaeesseeseeeaees 148 6 15 Displaying Local Variables ec eee eeccesceseeeeeeseseneccecseeeaeeeaeenaeeeeeeeeaeeeaeeeaeeeaeesees 149 6 16 Break Funct On sasn onsets scies cuts tute E A E E ween hive d ae 150 6 161 PE Break FUnCt On issgsiicesss claviices loci vageseeletpelices dieu oulsciseyscdiauivetene ree etvend pnts ss 150 6 17 Hardwate Break FUNC ON y y sss adscsoacavss sousaessasesepysusevedyseeusaysceansexedsenepvensinsdyedoatooueneansuyees 156 6 18 Trace FU Ct ons siisi iy ics ties cdes stan she Savages sdodestes levee igh E A Misia gad see tees 161 6 18 1 Displaying the Trace Window 000 eee eeeeseeeeeeceeseeeeeeseeeseceaeeeseseeeeeeeseeeaeees 161 6 19 St ck
43. 009 Page xiv of xviii REJ10J1140 1200 zENESAS Contents Section A COVER VIEW scissione jundentstencp cde iaag iag ea aada EAS a aada ai 1 Mel Warning Sesiono e a p a E A E RANA 3 1 2 Environmental Conditions seision enrenar onn E NAA EE 4 Ld COmPOnents eompar ia E ER a ee eg a 5 Section 2 Emulator Functions sssseseseeeeseesessteeresrersereresresstrsrsresstessteeresresseeee 7 A E E a A E E E E A E sea Mebubeateetlensd bevasead cues eebtion 7 2 2 Trace FUMCUONS sssrinin enina r E a E AE E a E 9 2 21 Branch Trace F n ti iissss nosece A 9 Qed Break FUMCHOM senere soer a E EEEE E ENSE 10 24 Memory Access FUnctiOns siscisccevccsscscsacsacsivscassstavcsscevasesesteveccasousecvacsdvastbevdsssucabesscnsstaeastes 11 2D Stack Trace PUNCH ON se ssecse ies Asseve sx evassip sesevses ETE E E EE S dsssb sh sevebeup eats 12 26 Olam Helprint Haak gsc sds esasssie cde R E Gah csaee eel one ii 12 Section 3 Preparation before Use essessssssessssscssssssesssssessssesesrsseesssesoesssenosseest 13 3 1 Emulator Preparations enoe E E E S EE dies EE A AE 13 3 2 Emulator Hardware Configuration eseeseeseerssessrerrseeresresrnresrrstrsrrsresrnsrerrnsrerrsesrestesreet 14 33 CD Rs ais eect gp eis a he i ede lage Ae ae ce 19 3 4 Installing Emulator s SoftWare scccccecscssspescessipessnsessseecicepessestasutiessapcssesebscdeeseopesenseeses 19 3 5 Connecting the Emulator to the Host Computer eee eeeeeeeneceeeeseesseeseetseeeae
44. 00f 48 gap il 53 ooofso while gap gt 0 Ooof54 for k 0 k lt gap kt O00f5e for itktgap i lt 10 ititgap ooof70 for j i gap j gt k j j gap ooofs2 if alj gt alitgap O00f as t alj 000fbe ali alitgap 000fde aljtgap t else O00ffa break 001018 00104a gap gap 2 001060 001062 ANIAN nee t seob ee ee lamo ho X Figure 6 21 Editor Window Step In e The highlighted line moves to the first statement of the sort function in the Editor window Rev 12 00 Aug 28 2009 Page 144 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 13 2 Executing Step Out Command The Step Out command steps out of the called function and stops at the next statement of the calling statement in the main function e To step out of the sort function select Step Out from the Debug menu or click the Step Out button on the toolbar Note It takes time to execute this function When the calling source is clarified use Go To Cursor P Figure 6 22 Step Out Button Tutoriol High performance Embedded Workshop gt Eile Edt Vew Project Duid Debue Setp Toole Tert D kbg o he Ho A E Debug HES cox E104 9 ieron 00x el0su v A OM lt s ar SOF eves 2 FF GK A E x EBA BS PSB aa amp Taral i Tutorial GB Assembly source file iC hoster file Event S W Breakponte Scarce GBC sorce lie CUTI 2 cbscte 1 B strke H E Cee source fie 00
45. 01056 17F4 EXTS L ER4 001058 0FCO WOY L ER4 ER0 00105A 1030 SHLL L ERO OO105C 1030 SHLL L ERO 00105E 0ABO ADD L ER3 ERO 001060 01006985 MO L ER5 ERO 001064 0B54 INC W 1 R4 gt resetpre cpp 3 sortcepp 2 Tutorial cpp Figure 5 5 Disassembly Window Rev 12 00 Aug 28 2009 Page 94 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 2 4 Modifying the Assembly Language Code You can modify the assembly language code by double clicking on the instruction that you want to change The Assembler dialog box will be opened Asse mbler Address Code 001060 01006985 a Cancel Mnemonic MOL ERS ERO Figure 5 6 Assembler Dialog Box The address instruction code and mnemonic are displayed Enter the new instruction or edit the old instruction in the Mnemonics field Pressing the Enter key will replace the memory content with the new instruction and move on to the next instruction Clicking the OK button will replace the memory content with the new instruction and close the dialog box Clicking the Cancel button or pressing the Esc key will close the dialog box without modifying the memory contents Note The assembly language code being displayed is the current memory content If the memory contents are changed the Assembler dialog box and the Disassembly window will show the new assembly language code but the source file displayed in the Editor window will
46. 08dc a revetrecee 5 0008ec a sortepo pi a des 0031o D Tutoristabs 00000000 000339 E Dependencies 000942 2 000954 000868 0008060 0005be I 0008e4 00088 O088ce Solorarar wari a S a 7 Flash memory urate end Prerao lo y DPRAK POINT 00003770 PP Plash memory writing eases flash menory write end 4 00001770 PP kios ADDRESS H 00001770 rr ONE STEP END a 13 1 00001770 FF Tah waens A wane h waa h wa 7 STAT eit oeio FndnFis J Mro Test A Veran Control 7 Ready E EE ni desktop Festns 45 64 UM Figure 6 23 High performance Embedded Workshop Window Step Out Rev 12 00 Aug 28 2009 Page 145 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial The data of variable a displayed in the Watch window is sorted in ascending order 6 13 3 Executing Step Over Command The Step Over command executes a function call as a single step and stops at the next statement of the main program e To step through all statements in the change function at a single step select Step Over from the Debug menu or click the Step Over button on the toolbar TP Figure 6 24 Step Over Button Rev 12 00 Aug 28 2009 Page 146 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial Tutorial High performance Embedded Workshop Tutorial cpp oR 5 File Edit View Project Build Debug Setup Tools Test Window Help 8X DHS g EESSI JA R D Debug_H8S_yo00 E104
47. 0aus v At amp A AEE EE E PS ANa 2 Aa Siew E Tutorial 5 amp E Tutorial a e z E Assembly sourt Sourc Event S W Breakpoints Source C header file E sbrkh sorth H stackscth 00088c source file 000898 condition dbsct c 000880 Address 0008ae 0008de SS Only program fetched address after 0008ec Address Herc 0008fc 00090c Non user mask C User mask 00091e 000930 000942 000954 000986 000978 000988 00099c 0009ae 0009ba 000304 0009ca olor al at 21 21 7 T 2 Connected gt Tutorial c 7 peaBreak Break Break Break Break I gt Breakcondition A Buld Debug A FindinFiles Macro J Test _ Version Control E Default desktop Read write 148 64 fl INS Figure 6 35 High performance Embedded Workshop Window Break condition 1 e The Break condition 1 dialog box is displayed e The data condition can be set besides the address condition Rev 12 00 Aug 28 2009 Page 157 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial Break condition 1 condition Address e Address Only program fetched address after Address H8FC a Non user mask C User mask Mask Read Write Cc Cancel Apply Figure 6 36 condition Page Break condition 1 Dialog Box e Click the OK button e The content that has been set is reflected in the Event window e The first point display in the St
48. 2 00 Aug 28 2009 Page 159 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial The Status window displays the following contents Status H8S xxxx E1OA USB SYSTEM CPU 2000 Renesas E Series USB Driver H8S xxxx Ready BREAK CONDITION 1 O000hO00min000s047ms Normal Advanced mode Single chip mode Big v gt Platform A Events F Figure 6 38 Displayed Contents of the Status Window Break Condition 1 Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help Rev 12 00 Aug 28 2009 Page 160 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 18 Trace Functions The emulator has a branch instruction trace function In H8S family the four channel branch source addresses mnemonics operands source lines and labels are displayed In H8SX family the eight channel branch source or destination addresses mnemonics operands source lines and labels are displayed 6 18 1 Displaying the Trace Window Select Trace from the Code submenu of the View menu Run the program as shown in the example of section 6 16 1 PC Break Function The trace results are displayed in the Trace window after the program execution is completed PTR IP Address Instruction Source Label 000003 0003 00001106 BLT H 10c c 8 000002 0002 00001106 eee H 10cc 8 000001 0001 00001108 H 110A 8 Figure 6 39
49. 28 2009 Page 1780f188 ti ti i OSOSO O S S S S REJ10J1140 1200 RENESAS 9 10 1 j 12 1 Ww 14 Appendix D Notes on High performance Embedded Workshop I O Window Display and modification Do not change values in the I O Registers window because the emulator uses the address break controller Note that the emulator does not support the display of the invalid module or bit information in the I O window Note on Register Window Operation During Program Execution The register value cannot be changed in the Register window during program execution Even if the changed value is displayed the register contents are not changed actually Break Functions When the PC breakpoint is set in the flash memory area the program is written to the flash memory each time the user program is executed At this time note that the number of rewritable times will be decreased BREAKPOINT cancellation When the contents of the BREAKPOINT address are modified during user program execution the following message is displayed when the user program stops Checking of data at the address of the breakpoint where the user program execution stopped has failed This is because the data at the address has been changed or writing or reading was not successful So the original data has not been written back to the address Address H xxxx Number of BREAKPOINT and Stop At Settings in the Run Menu The maximum n
50. 33 Selecting the Session File Rev 12 00 Aug 28 2009 Page 82 of 188 REJ10J1140 1200 7tENESAS Section 4 Preparations for Debugging In the list box that is circled in figure 4 33 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 For details on the session file refer to section 4 3 Debug Sessions 4 5 Reconnecting the Emulator When the emulator is disconnected use the following way for reconnection Select Debug gt Connect or click the Connect toolbar button E The emulator is connected Note The emulator must be selected in the Target drop down list box of the Debug Settings dialog box that is opened by selecting Debug settings from the Debug menu see 4 2 1 Setting at Emulator Activation Rev 12 00 Aug 28 2009 Page 83 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 6 Ending the Emulator When using the toolchain the emulator can be exited by using the following two methods e Canceling the connection of the emulator being activated e Exiting the High performance Embedded Workshop 1 Canceling the connection of the emulator being activated Select Disconnect from the Debug menu o
51. 40 1200 Section 5 Debugging Note The contents to be displayed differ depending on the MCU Items that can be displayed in the sheet are listed below Note The items to be set differ between H8S H8SX family and MCUs For functions to be set in each MCU refer to the online help Device combo box Emulation mode combo box Step option combo box Displays the MCU name Selects the emulation mode at user program execution e Normal Performs normal emulation e No break Temporarily disables breakpoint settings and executes user program e Sequential Break Condition 2 1 Program is halted when Break Condition 2 and Break Condition 1 are satisfied in that order e Sequential Break Condition 3 2 1 Program is halted when Break Condition 3 Break Condition 2 and Break Condition 1 are satisfied in that order e Sequential Break Condition 4 3 2 1 Program is halted when Break Condition 4 Break Condition 3 Break Condition 2 and Break Condition 1 are satisfied in that order Enables or disables interrupts during step operation e Disables interrupts during single step execution Interrupts during step operation are masked e Enables interrupts during single step execution Interrupts during step operation are released Rev 12 00 Aug 28 2009 Page 86 of 188 REJ10J1140 1200 2eENESAS JTAG clock combo box Flash memory synchronization combo box Section 5 Debugging Sets the frequency
52. 5 a 5 0010c2 p_sam gt s6 a 6 0010ce p_sam gt s al7 0010da p_sam gt s8 a 8 0010e6 p_sam gt s9 a 9 Oo1f2 delete p_sam Oo1fs 2 resetpre cpp lt 23 gt sortcpp lt gt Tutorialcpp Figure 5 2 Editor Window Rev 12 00 Aug 28 2009 Page 91 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging In this window the following items are shown on the left as line information The first column Line number column Source line information The second column Source address column Address information The third column Event column Event information break condition The fourth column S W breakpoint column PC bookmark and breakpoint information Line number column The line number that corresponds to the source file is displayed Source address column When a program is downloaded an address for the current source file is displayed on the Source address column These addresses are helpful when setting the PC value or a breakpoint Event column The Event column displays the following item An address condition as a break condition only one such a position can be set This is also set by using the popup menu The bitmap symbol above is shown by double clicking the Event column This is also set by using the popup menu Add BG2 gt _ Figure 5 3 Popup Menu Notes 1 The contents of the Event column are erased when conditions other than the address condition are added to each cha
53. 8 Break condition 1 Dialog BOX eeeeeesceceseeseneeeeseeceeeceeeceeeseeeseeeeeneeeens 106 5 4 Viewing the Trace Information sssini eisite iioii pinseri 111 5 4 1 Opening the Trace Window sssssesesseesessesreresstsressesrrsresrenresrnrrnsenresresresresreeees 111 5 4 2 Acquiring Trace Information ieee eeeeseeeseeeseceseseeecseecseeeseeeaeeeaeesseeseeeaees 111 5 4 3 Clearing the Trace Information eeeeeeeseeeseeeeeseeeceeeeseceaeeeaecsseeseeeneeenees 112 5 4 4 Saving the Trace Information in a File oe eee eee ceeeeeeeeseeeseeeaeeeeeseeenees 112 5 4 5 Viewing the Editor WindOw ceceeeeeeeneeeeneceseeeeaeecsaeeceeeceeeseeeseeeeneeeee 113 9 4 6 Trimming the Sorceres oien aN a ETE E EREE E 113 5 5 Using the Start Stop FUnCtiOnN ssissicissiisissiissinsssnseecisiieriseiissrisessesiioiivieri vied ioririikiesie koreniko 113 5 5 1 Opening the Start Stop Function Setting Dialog BOX ssssssessessessereerrersrrerrerree 113 5 5 2 Specifying the Routine to be Executed sssssseseesesseeresresresrsrrsrrsrrnresresresrnsreere 115 5 5 3 Restrictions on the Start Stop FUNction eee eee ceseeeeeseeeeeeeeseeeaeeeaeeseesseeaees 115 5 6 Operation with Multiple Debugging Platforms ee ee eee eeseceseeeeeeseeeseeteeeseenaeenas 116 5 6 1 Distinguishing Two Emulators 00 eee ee eeseeeseeeeeeseceeeceeeeaeeeaeeesecsseenseeseeesees 116 5 7 Saving of Hardware Break Settings cece ceeceeeeseeeseeeseeeaecesecseecseeseeeaeeeaeenaeeaes 12
54. Appendix B Window Functions This section describes the window functions that can be used with the E10A USB emulator High performance Embedded Workshop Here the High performance Embedded Workshop common functions are omitted and only the emulation functions are described Table B 1 Window Functions Toolbar Menu Option Shortcut Button Remarks View Disassembly Ctrl D Opens the Disassembly window Command Line Ctrl L Opens the Command Line window TCL toolkit Shift Opens the Console window Cri l Workspace Alt K p Opens the Workspace window Output Alt U A Opens the Output window Difference gn Opens the Difference window CPU Registers Ctrl R E Opens the Register window Memory Ctrl M Opens the Memory window IO Ctrl I pa Opens the IO window Status Ctrl U re Opens the Status window Sym Labels Shift za Opens the Labels window bol Ctrl A Watch Ctrl W F Opens the Watch window Locals Shift Fal Opens the Locals window Ctrl W Rev 12 00 Aug 28 2009 Page 171 of 188 RENESAS REJ10J1140 1200 Appendix B Window Functions Table B 1 Window Functions cont Toolbar Menu Option Shortcut Button Remarks View Code Eventpoints Ctrl E fm Opens the Event window cont Trace Ctrl T Opens the Trace window Stack Trace Ctrl K 7 Opens the Stack Trace
55. Break Conditions Select a break condition and choose Enable from the popup menu to enable the selected break condition 5 3 24 Disabling Break Conditions Select a break condition and choose Disable from the popup menu to disable the selected break condition When a break condition is disabled the break condition will remain in the list but an event will not occur when the specified conditions have been satisfied Rev 12 00 Aug 28 2009 Page 104 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 3 25 Deleting Break Conditions Select a break condition and choose Delete from the popup menu to remove the selected break condition To retain the break condition but not have it cause an event when its conditions are met use the Disable option see section 5 3 24 Disabling Break Conditions 5 3 26 Deleting All Break Conditions Choose Delete All from the popup menu to remove all break conditions 5 3 27 Viewing the Source Line for Break Conditions Select a break condition and choose Go to Source from the popup menu to open the Editor or Disassembly window at the address of the break condition The Go to Source menu is only available when break conditions that have the corresponding source file are selected Rev 12 00 Aug 28 2009 Page 105 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 3 28 Break condition 1 Dialog Box Break condition 1 condition Address ets C Addres Only program fe
56. ENESAS REJ10J1140 1200 Appendix F Repair Request Sheet Rev 12 00 Aug 28 2009 Page 188 of 188 REJ10J1140 1200 RENESAS H8S H8SX Family E10A USB Emulator User s Manual HS0005 KCU01H HS0005 KCU02H Publication Date Rev 1 00 January 5 2004 Rev 12 00 August 28 2009 Published by Sales Strategic Planning Div Renesas Technology Corp Edited by Customer Support Department Global Strategic Communication Div Renesas Solutions Corp 2009 Renesas Technology Corp All rights reserved Printed in Japan Renesas Technology Corp Sales Strategic Planning Div Nippon Bldg 2 6 2 Ohte machi Chiyoda ku Tokyo 100 0004 Japan 2CENESAS RENESAS SALES OFFICES http www renesas com Refer to http www renesas com en network for the latest and detailed information Renesas Technology America Inc 450 Holger Way San Jose CA 95134 1368 U S A Tel lt 1 gt 408 382 7500 Fax lt 1 gt 408 382 7501 Renesas Technology Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel lt 44 gt 1628 585 100 Fax lt 44 gt 1628 585 900 Renesas Technology Shanghai Co Ltd Unit 204 205 AZIACenter No 1233 Lujiazui Ring Rd Pudong District Shanghai China 200120 Tel lt 86 gt 21 5877 1818 Fax lt 86 gt 21 6887 7858 7898 Renesas Technology Hong Kong Ltd 7th Floor North Tower World Finance Centre Harbour City Canton Road Tsimshatsui Kowloon Hong Kong Te
57. Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics C 7 D Po on lt D D tENESAS H8S H8SX Family E10A USB Emulator User s Manual HS0005 KCU01H HS0005 KCU02H Renesas Microcomputer Development Environment System H8S H8SX Family E10A USB HS0005KCU01HE H8S Renesas Electronics Rev 12 00 2009 08 Rev 12 00 Aug 28 2009 Page ii of xviii REJ10J1140 1200 2ENESAS Notes regarding these materials This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document 2 Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document including but not limited to product data diagrams charts programs alg
58. Express BB Manual Navigator Help end Support p gt Remote Assistance e Windows Media Player Windows Messenger Settings Run Log Off RSO TOOL KAI Windows XP Professional J Turn Off Computer Figure 3 15 Start Menu tup tool for H8S E104 USB Emulator Device group of the emulator firmware Yersion number of the emulator firmware l 0 0 00 000 Version number of the setup program l 0 0 00 000 Start setting up the emulator Setup Figure 3 16 Setup Tool for Emulator a Device group of the emulator firmware Name of the device group currently set b Version number of the emulator firmware The version number of software for controlling the H8S Device Group in the emulator This item is displayed only when the H8S Device Group is available c Version number of the setup program The version number of the setup program Rev 12 00 Aug 28 2009 Page 31 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use Notes 1 If the version numbers shown in b and c are the same setup of the emulator is not required Setup the emulator only when is shown in b or the version number of b is older than that of c 2 If an emulator other than the H8S xxxx E10A USB is connected the following error message will be displayed to exit the setup tool Setup tool for H8S E1O4 USB Emulator Figure 3 17 Error Message 1 3 Ifthe following error message is displayed the
59. LCE iiie E EEA E E REENE ES 99 5 3 12 Set Break Dialog BOX eee eescceesceesnceeeeeesaceeeaeeseaeeeeaeecsaeeeeaeecseeceeeeeneesaes 100 5 3 13 Setting Break Conditions ee eeeeceecenseeneeccesccesesesseerersceesesseersesenesonseessees 102 33AN Edit era ag Sessa ests e gstactessustvgtenosesectesthes e E E 103 DSL Enables hua sage sods alten eras end date sev ens 103 3 316 Disable Sa n ssees ashe evens RE E E REN E dee sees atoesban sae 103 5 3 17 Delete enap a S E E OE 103 DAS Delete Alisse esiseina aaae cd leeds aE EAEN TERENS 103 Rev 12 00 Aug 28 2009 Page xvi of xviii REJ10J1140 1200 2RENESAS SAO GOA SOURCE a aa nes Meebiuezbiaviscebesiess evs eee eee 104 9 3 20 Sequential Conditions spesis pse en sectarian EEE EE aS E Ri 104 53 21 Editing Break Condition Sispisisssi ressis ananira EE A 104 5 3 22 Modifying Break Conditions 00 eee eeeeseeseeeeeseecenecceceeeeaeeeaeeneeeneeeneeeneeenees 104 5 3 23 Enabling Break Conditions 000 0 ceceeceeseeseeeeeeeseeeseseeececeeaeesaeeeaeenaeenseeseeesaes 104 5 3 24 Disabling Break Condittons cc sscscescasssussesedscevastescsysbebadeenstopetenbenscssaseupseetvaans 104 5 3 25 Deleting Break Conditions siies cscsc ci cecus ca scesseosscnsevscnestesccestanecteunassecseseeseuseeeunes 105 5 3 26 Deleting All Break Conditions ieee eeeeeeceeeeeeeceaeceseseeeeseeeeeeaeeeaeeeneeeaes 105 5 3 27 Viewing the Source Line for Break Conditions 20 0 0 ieee eee eee eeeeeeeeeseeeneeeeees 105 5 3 2
60. Only Unload Download A New Module 7 Precs Debug Settings Configure View Allow Docking Hide Properties Figure 6 4 Downloading the Tutorial Program Rev 12 00 Aug 28 2009 Page 128 of 188 REJ10J1140 1200 2tENESAS Section 6 Tutorial 6 6 2 Displaying the Source Program The High performance Embedded Workshop allows the user to debug a user program at the source level e Double click tutorial cpp under C source file amp Tutorial Tutorial z E Assembly source file Line Sourc Event S W Breakpoints Source C header file sbrk h 000878 p_sam new Sample h 000884 for i 0 i lt 10 itt Df sort 000880 j rand stackscth 000898 ifGi lt oof source file 0008a0 he sj la dbscte 000836 ali j C source file 0008de p_sam gt sort a resetpre cpp 0008ec p_sam gt change a l potep o00sf gt s0 a 0 E RTA c p_sam gt s0 a 0 TEES 000906 pIsan gt s1 a 1 SQ Download modules 0009le p_sam gt s2 a 2 Tutorialabs 00000000 000930 p_sam gt s3 a 3 Dependencies 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 000966 p_sam gt s6 a 6 000978 p_sam gt s al7 000984 p_sam gt s8 a 8 00099 p_sam gt s9 a 9 pocaae i delete p_sam a o009c4 void abort void 0009ca 0009cc fel te nea Ea test sie Tutorialepp Figure 6 5 Editor Window Displaying the Source Program e Se
61. POINT Run time count OO00hO00min000s047ms Emulation mode Normal PU operating mode Advanced mode Expanded mode Single chip mode Endian Big gt Memory A Platform i Events Figure 6 34 Displayed Contents of the Status Window PC Break Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help Rev 12 00 Aug 28 2009 Page 155 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 17 Hardware Break Function A method is given below in which the address bus condition is set under Break Condition as hardware break conditions e Select Eventpoints from the Code submenu of the View menu The Event window is displayed e The PC breakpoint that has been previously set is deleted Click the Event window with the right hand mouse button and select Delete All from the popup menu to cancel all PC breakpoints that have been set e Double click the Event column in the Editor window The specified address shows and a Break Condition is set e Click the Break condition tab e Select a line of Break condition 1 in the Event window When highlighted double click this line Rev 12 00 Aug 28 2009 Page 156 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial ESI utor ial High performance Embedded Workshop Tutorial cpp 5 File Edit D ng tre Hg Hi BS Debua H85_wox _E104 sessionh8s_woo_e1
62. PU family J gt Debueeer only H8S 2114FE Fasea F Debugger only H8S 2116F E H8S H8 300 gt gt Debugger only H8S 2117F E Tool chain Hitachi H8S H8 300 Standard Properties 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 CPU family drop down list box Select the target CPU family Tool chain drop down list box Select the target toolchain name when using the toolchain Otherwise select None Project type list box Select the project type to be used Note When Demonstration is selected in the emulator note the following The Demonstration is a program for the simulator When the generated program is used by the emulator delete the Printf statement Rev 12 00 Aug 28 2009 Page 59 of 188 RENESAS REJ10J1140 1200 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 New Project 7 9 Settine the Target System for Debugging r Tareets JH8S 20004 Simulator _ H8S 2000N Simulator JH8S 2112F E104 USB SYSTEM GPU JH8S 2114F E104 USB SYSTEM GPU CJH8S 2116F E104 USB SYSTEM GPU JH8S 2125F E104 USB SYSTEM GPU JH8S 2158F E104 USB SYSTEM GPU JH8S 2168F E104
63. Page 19 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 5 Connecting the Emulator to the Host Computer This section describes how to connect the emulator to the host computer For the position of each connector of the emulator refer to section 3 2 Emulator Hardware Configuration Notes 1 When Add New Hardware Wizard is displayed select the Search for the best driver for your device Recommended radio button and then the Specify a location check box to select the path to be searched for drivers The location must be specified as lt Drive gt DRIVERS lt Drive gt is the CD drive letter 2 Be sure to install the software for the emulator before putting the emulator in place A WARNING Always switch OFF the emulator product and the user system before connecting or disconnecting any CABLES except for the USB interface cable Failure to do so will result in a FIRE HAZARD and will damage the user system and the emulator product or will result in PERSONAL INJURY The USER PROGRAM will be LOST Rev 12 00 Aug 28 2009 Page 20 of 188 REJ10J1140 1200 RENESAS 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 computer E104 USB emulator USB cable 1 5 m Figure 3 7 System Configuration when Connecting the Emulator to the Host Computer
64. Page 38 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 5 When the following dialog box is displayed setting up the emulator is completed License tool for H8S E104 USB Emulator Eg A Setup was completed successfully Figure 3 30 Message for Completion of Setting up the Emulator 6 When setting up the emulator has been completed the following message will be displayed Turn the setup switch SW1 to 1 connect the USB cable again and click the OK button License tool for H8S E104 USB Emulator xi A Shift the switch SW1 for setting up the emulator to 1 and re insert the USB cable Figure 3 31 License tool for H8S E10A USB Emulator Dialog Box Notes 1 Be sure to turn the setup switch SW1 to 1 except when the license tool for adding device groups is used 2 To use the license tool for another device group in which the license has been installed in the emulator it is necessary to set up the firmware by using the setup tool or license tool that corresponds to the device group For details on the setup tool refer to section 3 10 Setting up the Emulator in this manual 3 After you have added a device group by using the license tool place the attached device group sticker onto the back of the emulator box Otherwise the emulator may not be considered as a target product when repair is required The license tool provides a license to use the target device group Be sure to acquire a li
65. Processing list box Rev 12 00 Aug 28 2009 Page 67 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 2 2 Downloading a Program A download module is added under Download modules in the Workspace window Open the load module of Download modules in the Workspace window by clicking the right hand mouse button and select Download module to start downloading the module tutorial cpp Download mode Download Debug Data Only Jnload Download amp New Module Debug Settings Configure View v Allow Docking Hide Properties Figure 4 15 Download Menu of the Workspace Window Projects Notes 1 When load modules are downloaded select Debug gt Download gt Al DownLoad Modules 2 The emulator downloads programs to the flash memory just before execution of the user program Rev 12 00 Aug 28 2009 Page 68 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging 4 2 3 Setting the Program Flash Mode The following describes the procedures when the emulator is used as the programming tool The load module to be downloaded to the new workspace is registered and programmed a Select the new project workspace New Project Workspace Projects Workspace Name ftest Project Name ftest Directory ox Hew3 test Browse CPU family H85 H8 300 v Tool chain None Me Properties
66. REJ10J1140 1200 RENESAS Section 5 Debugging 5 4 5 Viewing the Editor Window The Editor window corresponding to the selected trace record can be displayed in the following two ways e Select a trace record and choose View Source from the popup menu e Double click a trace record The Editor or Disassembly window opens and the selected line is marked with a cursor 5 4 6 Trimming the Source Choose Trim Source from the popup menu to remove the white space from the left side of the source When the white space is removed a check mark is shown to the left of the Trim Source menu To restore the white space choose Trim Source while the check mark is shown 5 5 Using the Start Stop Function The start stop functions are useful if you wish to control the user system in synchronization with the user program execution being started or stopped 5 5 1 Opening the Start Stop Function Setting Dialog Box The start stop functions are useful if you wish to control the user system in synchronization with the user program execution being started or stopped To open the Start Stop Function Setting dialog box select Setup gt Emulator gt Start Stop Function Setting or click on the Start Stop Function dialog box toolbar button 3 Rev 12 00 Aug 28 2009 Page 113 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Start Stop Function Settine V Run the specified routine just before the user program executi
67. 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 See the Renesas warranty booklet for details on the warranty period This warranty extends only to you the original Purchaser It is not transferable to anyone who subsequently purchases the emulator product from you Renesas is not liable for any claim made by a third party or made by you for a third party DISCLAIMER RENESAS MAKES NO WARRANTIES EITHER EXPRESS OR IMPLIED ORAL OR WRITTEN EXCEPT AS PROVIDED HEREIN INCLUDING WITHOUT LIMITATION THEREOF WARRANTIES AS TO MARKETABILITY MERCHANTABILITY FITNESS FOR ANY PARTICULAR PURPOSE OR USE OR AGAINST INFRINGEMENT OF ANY PATENT IN NO EVENT SHALL RENESAS BE LIABLE FOR ANY DIRECT INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY NATURE OR LOSSES OR EXPENSES RESULTING FROM ANY DEFECTIVE EMULATOR PRODUCT THE USE OF ANY EMULATOR PRODUCT OR ITS DOCUMENTATION EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES EXCEPT AS EXPRESSLY STATED OTHERWISE IN THIS WARRANTY THIS EMULATOR PRODUCT IS SOLD AS IS AND YOU MUST ASSUME ALL RISK FOR THE U
68. Rev 12 00 Aug 28 2009 Page 21 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 6 Connecting the Emulator to the User System Use the procedure below to connect the emulator to the user system with the user system interface cable or to disconnect them when moving the emulator or the user system 1 Check that the host computer is turned off or the emulator is not connected to the host computer with the USB cable 2 Connect the user system interface cable to the user side connector of the emulator 3 Connect the USB cable to the host side connector of the emulator Figure 3 8 shows the position of the connector Connector for user system interface cable Figure 3 8 Position of the Connector Rev 12 00 Aug 28 2009 Page 22 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 1 The user system connector must be installed to the user system Table 3 2 shows the recommended user system connector for the emulator Table 3 2 Recommended User System Connector Connector Type Number Manufacturer Specifications 14 pin connector 2514 6002 3M Limited 14 pin straight type Note When designing the 14 pin connector layout on the user board do not place any components within 3 mm of the user system connector 2 The pin assignments of the user system connector are shown in section 1 in the additional document Supplementary Information on Using the H8S xxxx or Supplementary Information on Us
69. SE AND RESULTS OBTAINED FROM THE EMULATOR PRODUCT Rev 12 00 Aug 28 2009 Page vi of xviii REJ10J1140 1200 RENESAS 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 The Warranty is Void in the Following Cases Renesas shall have no liability or legal responsibility for any problems caused by misuse abuse misapplication neglect improper handling installation repair or modifications of the emulator product without Renesas prior written consent or any problems caused by the user system All Rights Reserved This user s manual and emulator product are copyrighted and all rights are reserved by Renesas No part of this user s manual all or part may be reproduced or duplicated in any form in hard copy or machine readable form by any means available without Renesas prior written consent Other Important Things to Keep in Mind 1 Circuitry and other examples described herein are meant merely to indicate the characteristics and performance of Renesas semiconductor products Renesas assumes no responsibility for any intellectual property claims or other problems that may result from applications based on the examples described herein 2 No license is granted b
70. SYSTEM in the description including figures as H8SX xxxx E10A USB SYSTEM when you use H8SX family To activate the High performance Embedded Workshop follow the procedure listed below 1 Connect the emulator to the host computer and the user system then turn on the user system 2 Select High performance Embedded Workshop from Renesas High performance Embedded Workshop of Programs in the Start menu 3 The Welcome dialog box is displayed Welcome Options Cancel Open a recent project workspace Administration C Browse to another project workspace Figure 4 1 Welcome Dialog Box Create a new project workspace radio button Creates a new workspace Open a recent project workspace radio button Uses an existing workspace and displays the history of the opened workspace Browse to another project workspace radio button Uses an existing workspace this radio button is used when the history of the opened workspace does not remain Rev 12 00 Aug 28 2009 Page 53 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging In this section we describe the following three ways to start up the High performance Embedded Workshop e Create a new project workspace a toolchain is not in use e Create a new project workspace a toolchain is in use e Browse to another project workspace The operation of Open a recent project workspace radio button is same as the opera
71. To our customers Old Company Name in Catalogs and Other Documents 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 old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http Awww renesas com inquiry 2CENESAS 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is gra
72. Trace Window If necessary adjust the column widths by dragging borders in the header bar immediately below the title bar Note The number of branch instructions that can be acquired by a trace and the trace display differ depending on the product For details on the specifications of each product refer to the online help Rev 12 00 Aug 28 2009 Page 161 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 19 Stack Trace Function The emulator uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing Note This function can be used only when the load module that has the Elf Dwarf2 type debugging information is loaded Such load modules are supported in H8C C compiler V3 0 or later e Double click the S W breakpoint column in the sort function and set a PC breakpoint Line Sourc Event S W Breakpoints Source O00ee8 s2 0 O00ef0 s3 05 O00efs s4 0 ooofoo s6 0 ooofos s6 0 ooofi0 s 0 ooofis s8 0 ooof20 s9 0 O00f2c OO0f36 ida Sample sort long a long t int i J k gap O00f 48 gap 5 Ooofs0 while gap gt 0 i O00f54 for k 0 k lt gap kt 000ffe for i ktgap i lt 10 i itgap ooof70 for j i gap j gt k j j gap O00f82 000f as t alj 000fbe alj a j gap 000fde i aljtgap t else O00ffa break 001018 Figure 6 40 Editor Window PC Bre
73. Trace Functions cen EE RE E NO eee Ness 162 6 20 What NEXT ii ccscccars oe scicacak space lett e e ee e a E a E VEN AE aE EEEE 163 Section 7 Maintenance and Guarantee eeeseeeeeeeeeseeeseserstesrerreeserertrreeseessrseesee 165 Tlo Usei REGISHALION iscriere i nr E E atesteuas 165 Fed Maintenances nnn a A E N E 165 T3 Guarantee essee ueria AIEE Ep a rE AEE ES TE E E E E aca nees 165 FA Repait Provision Siansa m scsi esii e aae e ieaiai EEE ae 166 TAA Repair with Extra Charge ss isc icccssevsecsveisessutcscosvsteestsviveses susetbsd tvedevenstvsestepivsseres 166 7 4 2 Replacement with Extra Charge oo ccc eecesecesecsseeseeeseeeseeesesseesseesseeeseeeaeees 166 7 4 3 Expiration of the Repair Period 0 eee ee eee ceeeseeeseeeseceaeceseseeeseeeeseeeaeenaeens 166 7 4 4 Transportation Fees at Sending Your Product for Repair eee eeeees 166 7 5 How to Make a Request for Repair eee eeceecceseeeseeeeceseceeeseeeeseeeseeeaeceseeseeeseesseeeaees 167 Appendix A Troubleshooting csicsacata2 aeaderstaneecccdaneonscanseoelaaniestaveateenedtacereceabece 169 Appendix B Window Functions eseesseeeeseessessessresresrtssrseeesresstssresessersresreeseese 171 Appendix C Command Line Functions sseeeseseeeseesessrsereeressresresressersresreeseese 175 Appendix D Notes on High performance Embedded Workshop 0 177 Appendix E Diagnostic Test Procedure eeseeseseeseseeeseresesressrserrrrrnserserrreeseese 183 Appendix F
74. Window To open the Trace window choose View gt Code gt Trace or click the Trace toolbar button 5 4 2 Acquiring Trace Information The acquired trace information is displayed in the Trace window The four channel branch source addresses are displayed in H8 family The eight channel branch source or branch destination addresses are displayed in H8SX family Trace Window Address Instruction Source Label 00002110 H 20EC 8 00002110 GH 20EC 8 00002116 Q spregld2 3 24 00001128 Figure 5 13 Trace Window H8S ui xl PTR Type Address __ Instruction Source Label 000015 BRANCH 000008F8 JSR operator aa 000014 DESTINATION 000009E4 MOV Le void ERO ERO ow operator delete void 000013 BRANCH 000009E8 JSR _free 24 mest 000012 DESTINATION 00000470 STH L ER4 ER6 SP ssia _free 000011 BRANCH 00000488 BNE H OASE 000010 DESTINATION O0000ASE CHP L ER1 ER6 000009 BRANCH 00000490 BCC H OAD4 000008 DESTINATION 00000AD4 a ERL ERS 000007 BRANCH 00000ADE H OAEZ 000006 DESTINATION OOOOOAEZ ERS ERG 000005 BRANCH OOOOOAEE H OADS 000004 DESTINATION g H 0004 16 ER5 ERO o CH DA DESTINATION 000001 BRANCH 00000800 000000 DESTINATION 00000820 a ERL ERO Figure 5 14 Trace Window H8SX Rev 12 00 Aug 28 2009 Page 111 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging This window displays the following trace information items PTR Pointer to a location in t
75. ak condition Notes on Setting the Break Condition 1 When Step In Step Over or Step Out is selected the settings of Break Condition 1 are disabled 2 Setting of Break Condition 1 is disabled when an instruction to which a BREAKPOINT has been set is executed 3 When step over function is used the settings of BREAKPOINT and Break Condition 1 are disabled Items that can be displayed in the sheet are listed below Type Break channel number State Whether the breakpoint is enabled or disabled Condition A condition that satisfies a break Rev 12 00 Aug 28 2009 Page 1020f188 i t lt i i i SOSOSOS S S OOOO REJ10J1140 1200 RENESAS Section 5 Debugging Action Operation of the emulator when a break condition is satisfied Break Breaks program execution When a Break condition 1 is double clicked in this window the Break condition 1 dialog box is opened and break conditions can be modified For details on the Break condition 1 dialog box refer to the online help for each product A popup menu containing the following options is available by right clicking within the window 5 3 14 Edit Only enabled when one break channel is selected Select a break channel to be edited and click this item The Break condition 1 dialog box will open and break conditions can be changed 5 3 15 Enable Enables the selected break channel s A break channel that the condition has not been se
76. akpoint Setting e Set the same program counter value PC H 400 as was set in section 6 8 Setting Registers again use the Register window Click the Go button Rev 12 00 Aug 28 2009 Page 162 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial e After the break in program execution select Stack Trace from the Code submenu of the View menu to open the Stack Trace window wz StackTrace Name Value Sample sort long OOOF82 tutoriali OOO8EC maini 000866 PowerON Reset 000424 Figure 6 41 Stack Trace Window Figure 6 41 shows that the position of the program counter is currently at the selected line of the sort function and that the sort function is called from the tutorial function 6 20 What Next This tutorial has described the major features of the emulator and the use of the High performance Embedded Workshop Sophisticated debugging can be carried out by using the emulation functions that the emulator offers This provides for effective investigation of hardware and software problems by accurately isolating and identifying the conditions under which such problems arise Rev 12 00 Aug 28 2009 Page 163 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial Rev 12 00 Aug 28 2009 Page 164 of 188 REJ10J1140 1200 RENESAS Section 7 Maintenance and Guarantee Section 7 Maintenance and Guarantee This section describes maintenance guarantee repair provisions
77. ancel C Open a recent project workspace Administration Browse to another project workspace Figure 3 33 Welcome Dialog Box Create a new project workspace radio button Creates a new workspace Open a recent project workspace radio button Uses an existing workspace and displays the history of the opened workspace Browse to another project workspace radio button Uses an existing workspace this radio button is used when the history of the opened workspace does not remain To use a workspace for the tutorial select the Browse to another project workspace radio button and click the OK button When the Open workspace dialog box is opened specify the following directory lt Drive where the OS has been installed gt WorkSpace Tutorial E10A USB H8S xxxx Tutorial Here xxxx means the target product group Note When the H8SX product group is used specify EIOA USB H8SX xxxx Tutorial The following explains the case of H8S Rev 12 00 Aug 28 2009 Page 41 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use After the directory has been specified select the following file and click the Open button Open Workspace GY Tutorialhws Files of type HEW Workspaces hws Cancel Figure 3 34 Open Workspace Dialog Box Rev 12 00 Aug 28 2009 Page 42 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 6 The Select Emulator mode dialog box is dis
78. and user system so that no cable is bent or twisted A bent or twisted cable will impose stress on the user interface leading to connection or contact failure Make sure that the host computer and the user system are placed in a secure position so that they do not move during use nor impose stress on the user interface Rev 12 00 Aug 28 2009 Page x of xviii REJ10J1140 1200 RENESAS Introduction The High performance Embedded Workshop is a powerful development environment for embedded applications targeted at Renesas microcontrollers The main features are A configurable build engine that allows you to set up compiler assembler and linker options via an easy to use interface An integrated text editor with user customizable syntax coloring to improve code readability A configurable environment to run your own tools An integrated debugger which allows you to build and debug in the same application Version control support The High performance Embedded Workshop has been designed with two key aims firstly to provide you the user with a set of powerful development tools and secondly to unify and present them in a way that is easy to use Rev 12 00 Aug 28 2009 Page xi of xviii RENESAS REJ10J1140 1200 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
79. ar 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 Enter the appropriate numbers in the parentheses and circle one of the three items in the braces 3 System configuration when the malfunction occurred System configuration of the emulator e E10A USB emulator HS0005KCU01H or HSO0005KCU02H Serial No Revision The above items are written on the label for product management at the bottom of the emulator unit the serial no is the five digit number and the revision is the string of letters following the number e Provided CD R HSOOO5KCU01 SR Version V Shown as V x xx release xx on the CD R x numeral e Host computer in use Manufacturer Type number OS Windows 2000 Windows XP or Windows Vista Rev 12 00 Aug 28 2009 Page 186 of 188 REJ10J1140 1200 zeENESAS Appendix F Repair Request Sheet Item Symptom 4 Settings when the malfunction 1 MCU Part number occurred 2 Operating frequency MHz 5 Failure phenomenon 6 Error in debugging 7 Error in the diagnostic program 8 The High performance Embedded Content of the error message Workshop does not link up with the emulator For errors other than the above fill in the box below Rev 12 00 Aug 28 2009 Page 187 of 188 R
80. ase Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed the risk of accident such as swallowing by infants and small children is very high You should implement safety measures so that Renesas products may not be easily detached from your products Renesas shall have no liability for damages arising out of such detachment 12 This document may not be reproduced or duplicated in any form in whole or in part without prior written approval from Renesas 13 Please contact a Renesas sales office if you have any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries Rev 12 00 Aug 28 2009 Page iii of xviii RENESAS REJ10J1140 1200 Rev 12 00 Aug 28 2009 Page iv of xviii REJ10J1140 1200 2ENESAS IMPORTANT INFORMATION READ FIRST e 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 Technology Corp excluding all subsidiary products e Emulator e User system interface cable The user system or a host computer is not included in this definition Purpose of the Emulator Product This emulator product
81. ate line changes from Disable to Enable e The first point display in the Condition line changes from None to Address H 00008FC Tutorial cpp 47 pcafter e Set the program counter value PC H 400 that was set in section 6 8 Setting Registers in the Register window Click the Go button Note The items that can be set in this page differ depending on the product For details on the settings for each product refer to the online help The address values described in this section will differ depending on the tutorial for each product Rev 12 00 Aug 28 2009 Page 1580f188 i tsts lt s si s lt a REJ10J1140 1200 RENESAS Section 6 Tutorial The program runs and then stops at the condition specified under Break Condition 1 Line Sourc Event S W Breakpoints Source 000878 p_sam new Sample 000884 fori i 0 i lt 10 i 00088c j rand 000838 IEG lt of 000840 E E 0008ae ali j 0008de p_sam gt sort a 0008ec p_sam gt change a O008fc gt i 00090c am gt sl all 00091e SAW Breakpoints tS co a 2 000930 p_sam gt s3 a 3 000342 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 OO0S6E p_sam gt s6 a 6 000378 p_sam gt s7 a 7 000984 p_sam gt s8 a 8 00099c p_sam gt s9 a 9 0009sae delete p_sam O009ba 0009c4 void abort void 0009ca 00039cc Figure 6 37 Editor Window at Execution Stop Break Condition 1 Rev 1
82. ater emulator hardware the below procedure may not be required follow the procedure only when the dialog box shown in figure 3 13 or 3 14 is displayed by using the procedure described in section 3 11 System Check The current firmware of the E104 USB emulator is not for the H8S Rewrite the firmware by using the setup tool The version of the E10A USB emulator firmware is incorrect Rewrite the firmware by using the setup tool Figure 3 14 Emulator firmware error 2 Dialog Box 1 Open the sliding switch cover and check that the switch SW1 for setting the emulator is turned to 1 2 Select Renesas gt High performance Embedded Workshop gt Setup tool for E10A USB Emulator gt H8S xxxx Device Group from Programs in the Start menu A tool for setting up the emulator is activated Note When the H8SX device group is used select H8SX Device Group Rev 12 00 Aug 28 2009 Page 30 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use Set Program Access and Defaults ee Windows Catalog Ro Windows Update Programs Accessories gt FA Documents a Fj High performance Embedded Workshop f Setup Tool for E10A USB Emulator H8S Device Group gt Multiple Install Manager YF High performance Embedded Workshop Internet Explorer 8 Renesas Tools HomePage E High performance Embedded Workshop Help search gt M8 MSN Explorer E High performance Embedded Workshop Read Me Q Outlook
83. 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 Rev 12 00 Aug 28 2009 Page 63 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 1 3 Selecting an Existing Workspace 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Browse to another project workspace radio button and click the OK button Welcome Options Cancel C Open a recent project workspace Administration Browse to another project workspace Figure 4 11 Welcome Dialog Box Rev 12 00 Aug 28 2009 Page 64 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging 2 The Open Workspace dialog box is displayed Select a directory in which you have created a workspace After that select the workspace file hws and press the Open button Open Workspace Look in Tutorial e a a Source E Tutorialhws Files of type HEW Workspaces hws Cancel Figure 4 12 Open Workspace Dialog Box Note In figure 4 12 xxxx means the name of the MCU 3 This activates the High performance Embedded Workshop and recovers the
84. but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers
85. ccess 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 Core 2 Duo 2 GHz H8S 2377F 33 MHz system clock frequency When a one byte memory is read from the command line window the stopping time will be about 65 ms the same result will apply to H8SX Internal Flash Memory The emulator is also available as the programming tool for mass production However the actual MCU which has been used by connecting to the emulator has been programmed to the flash memory at emulation and stressed Do not use the MCU that has been used for debugging for the mass products 19 Suspending Host Computer Operation while Using the Emulator Do not place the host computer in sleep mode or suspended mode while using the emulator The emulator is not usable when the host computer is in these modes Reconnect the emulator after the host computer has returned from sleep mode or suspended mode Rev 12 00 Aug 28 2009 Page 180 of 188 REJ10J1140 1200 RENESAS Appendix D Notes on High performance Embedded Workshop 20 Verification of Memory Use the FILE_VERIFY command to verify memory Do not use Verify Memory in the File menu 2 rare Overwrite of a File
86. cense for each of the E10A USB emulators being used with that device group Rev 12 00 Aug 28 2009 Page 39 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 11 System Check When the software is executed use the procedure below to check that the emulator is connected correctly Here use the workspace for a tutorial provided on the product Refer to section 4 Preparations for Debugging for the other activating method to create a new project or use an existing workspace 1 Connect the emulator to the host computer 2 Connect the user system interface cable to the connector of the emulator 3 Connect the user system interface cable to the user system connector 4 Select Renesas gt High performance Embedded Workshop gt High performance Embedded Workshop from Programs in the Start menu gt Fa Accessories gt gt Fa Startup ES High perf o High performance Embedded Workshop Help High performance Embedded Workshop Read Me 3 High performance Embede E Manual Navigator Setup Tool for E10A USB Emulator ip Shut Down Figure 3 32 Start Menu Note The High performance Embedded Workshop gt Tools is not displayed depending on the user s environment Rev 12 00 Aug 28 2009 Page 400f188 tt ttst lt s s i i s SSS REJ10J1140 1200 RENESAS Section 3 Preparation before Use 5 The Welcome dialog box is displayed Welcome Options C
87. d immediately before starting user program execution If no specified routine is executed immediately before starting user program execution do not select the The specified routine is executed immediately before execution of the user s program check box When the The specified routine is executed immediately after execution of the user s program check box is selected the routine specified in the starting address combo box which is below this check box is executed immediately after stopping user program execution If no specified routine is executed immediately before starting user program execution do not select the The specified routine is executed immediately after execution of the user s program check box 5 5 3 Restrictions on the Start Stop Function The start stop function has the following restrictions e AnRTS instruction must be written at the end of the user routine e The user routine must end e No break should occur within the user routine e No interrupt should be accepted in the user routine e The user routine to run immediately before the user program execution must end within 2 msec e The user routine to run after the user program execution is stopped must end within 30 sec e As the stack area for the routine specified for execution before the user program starts use the firmware stack of the emulator The stack area is no larger than H 80 bytes e The user stack should be used by the rou
88. der certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas
89. displayed in the Channel drop down list box The above procedures are used to discern which of the emulators are indicated by the displayed character strings of information in the Channel drop down list box Rev 12 00 Aug 28 2009 Page 1180f188 tt tst lt isCi i lt a a REJ10J1140 1200 RENESAS Section 5 Debugging When initiating the master High performance Embedded Workshop in the Channel drop down list box select the information on the USB connector of the emulator that is connected to the master CPU Initiate the High performance Embedded Workshop using the normal procedures When initiating the slave High performance Embedded Workshop in the Channel drop down list box select the information on the USB connector of the emulator that is connected to the slave CPU Display example e EI0OA USB Cont0 Port1 The emulator is connected to port 1 of USB controller 0 e E10A USB Cont4 Port7 Port3 The emulator is connected to general hub port 3 which has been connected to port 7 of USB controller 4 this is displayed when the USB hub is connected Note Connecting Two or More Emulators If two or more emulators are to be connected to a single personal computer the emulator that was connected earlier should be in the break state whenever you connect another emulator Rev 12 00 Aug 28 2009 Page 119 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 7 Saving of Hardwa
90. dition j Figure 5 8 Event Window Breakpoint Sheet This window displays and sets the breakpoints Items that can be displayed in the sheet are listed below Type Breakpoint State Whether the breakpoint is enabled or disabled 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 When a breakpoint is double clicked in this window the Set Break dialog box is opened and break conditions can be modified A popup menu containing the following options is available by right clicking within the window Rev 12 00 Aug 28 2009 Page 98 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 3 5 Add Sets breakpoints Clicking this item will open the Set Break dialog box and break conditions can be specified 5 3 6 Edit Only enabled when one breakpoint is selected Select a breakpoint to be edited and click this item The Set Break dialog box will open and break conditions can be changed 5 3 7 Enable Enables the selected breakpoint s 5 3 8 Disable Disables the selected breakpoint s When a breakpoint is disabled the breakpoint will remain in the list when specified conditions have been satisfied a break will not occur 5 3 9 Delete Removes the selected breakpoint To retain the details of the breakpoint but not have it cause a b
91. e emulator components refer to section 1 1 in the additional document Supplementary Information on Using the H8S xxxx and Supplementary Information on Using the H8SX xxxx If all of the components are not present contact your nearest Renesas sales office Rev 12 00 Aug 28 2009 Page 5 of 188 RENESAS REJ10J1140 1200 Section 1 Overview Rev 12 00 Aug 28 2009 Page 6 of 188 REJ10J1140 1200 RENESAS 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 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 Table 2 1 Emulator Functions No Item Function 1 User program execution e function Executes a program with the operating frequency within a range guaranteed by devices Reset emulation Step functions Single step one step one instruction Source level step one step one line source Step over a break did not occur in a subroutine Step out when the PC points to a location within a subroutine execution continues until it returns to the calling function 2 Reset function e Issues a power on reset from the High performance Embedded Workshop to the device during break 3 Trace functions Trace function incorporated in the device
92. e present Rev 12 00 Aug 28 2009 Page 4 of 188 REJ10J1140 1200 RENESAS Section 1 Overview Table 1 2 lists the acceptable operating environments Table 1 2 Operating Environments Item Operating system Host computer Description Windows 2000 Windows XP Built in Pentium III or higher performance CPU 1 GHz or higher recommended IBM PC or compatible machine with USB 1 1 2 0 Full Speed Windows Vista CPU Pentium Ill 1 GHz or higher recommended Pentium 4 3 GHz Core 2 Duo 1 GHz or higher recommended Minimum memory capacity 1 Gbyte or more recommended 1 5 Gbyte or more recommended at least 10 times the size of the load module file Hard disk capacity Installation disk capacity 600 Mbytes or more Prepare an area at least double the memory capacity four times or more recommended as the swap area Pointing device such as mouse Connectable to the host computer compatible with Windows 2000 Windows XP or Windows Vista Display Monitor resolution 1024 x 768 or higher Power voltage 5 0 0 25 V USB bus power type Current consumption HSOO05KCU01H 260 mA max HSO005KCU02H 420 mA max CD ROM drive 1 3 Components Required to install the High performance Embedded Workshop for the emulator or refer to the emulator user s manual Check that all of the components are present when unpacking the product For details on th
93. ecified amount of memory from the specified address can be saved in a file Select Save Memory from the Debug menu or select the Save item from the popup menu in the Memory window 4 Memory data downloading function The memory contents saved in a file can be downloaded Select Load from the popup menu in the Memory window 5 Displaying the variable contents The variable contents specified in the user program are displayed Rev 12 00 Aug 28 2009 Page 11 of 188 RENESAS REJ10J1140 1200 Section 2 Emulator Functions 6 Other memory operation functions Other functions are as follows e Memory fill e Memory copy e Memory save e Memory verify e Memory search e Internal I O display e Displaying label and variable names and their contents For details refer to the online help Note Memory access during user program execution When memory is accessed from the memory window etc during execution of the user program 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 Core 2 Duo 2 GHz H8S 2377F 33 MHz system clock frequency When a one byte memory is read from the command line window the stopping time will be about 65 ms 2 5 Stack Trace Function The emulator uses the information on the stack to display the names of functions in the se
94. edded Workshop Window Step Over Rev 12 00 Aug 28 2009 Page 147 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 14 Forced Breaking of Program Executions The High performance Embedded Workshop can force a break in the execution of a program e Cancel all breakpoints settings e To execute the remaining sections of the main function select Go from the Debug menu or the Go button on the toolbar Figure 6 26 Go Button e The program goes into an endless loop To force a break in execution select Halt from the Debug menu or the Stop button on the toolbar Figure 6 27 Stop Button Rev 12 00 Aug 28 2009 Page 148 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 15 Displaying Local Variables The user can display local variables in a function using the Locals window For example we will examine the local variables in the main function which declares four local variables a j i and p_sam e Select Locals from the Symbol submenu of the View menu The Locals window is displayed The Locals window shows the local variables in the function currently pointed to by the program counter along with their values Note however that the Locals window is initially empty because local variables are yet to be declared wz Locals FFEFSO long 10 H OOOOOff6 FFEF7 C long H 000a FFEF7A int OxO00ffcOd8 FFEF76 class Sample Figure 6 28 Locals Window e Clic
95. eeees 20 3 6 Connecting the Emulator to the User System 00 eee eee cecceeeeeseeeseeeaeeeseeseeeeeeaeeeaeeaees 22 3 7 Connecting System Ground wc cccceieis iced cca sees sn scansectecusuensceestnas cauavage E EREN a 25 3 8 Setting the DIP S Witches sexs eoriadur reene orik r Sea ea EI ESEESE eyes cxeeessedves 26 3 9 Interface Circuits in the Emulator oo ceeeeeeeseceeeceeececeeseeeseesseesaeesaesseesseeeaeenaes 28 3 10 Setting Up the Emulator ss ccsecaessoncscsccses sseessvece evgadsseu tes eere er ren renas EEE EENE EE EET 29 3 10 1 Setting up at Purchasing the Emulator or Updating the Version of Software 30 3 10 2 Setting up the Emulator by Using the License Tool to Add a Device Group 35 3 11 System Checks seen eye seers ane E E E E A RA Ea 40 Section 4 Preparations for Debugging e eesseseessesrrssiresrsrrssrsrrsrersressreererresseeeres 53 4 1 Method for Activating High performance Embedded Workshop eessereerereeeerrerereee 53 4 1 1 Creating the New Workspace Toolchain Not Used eee eeeeseeseeereteeeeee 54 4 1 2 Creating the New Workspace Toolchain Used seseeseeseeseeessreersrreresrrsrrernees 58 4 1 3 Selecting an Existing Workspace seeesesesseesesresrrsrsrrsreeresresrertsresrerrnrenresrnernes 64 42 Setting at Emulator Activation ssssiisisiiessisisiisseirisieu seise sainsdsro eseou eoii dienei sea 66 4 2 1 Setting at Emulator Activation sseesesssesssresrsesrrsrrsrsrenresresresresrsrenre
96. eenaeenseeeaeen 90 5 2 2 Viewing the Source Code xz cscicsscssecssenesabesesesescsasesebsdentoesesgeseehessserasesactoebeapensesess 91 5 2 3 Viewing the Assembly Language Code o00 eee eeceeceeseeseeeneeeseteneeeereeeeaeeeaeens 94 5 2 4 Modifying the Assembly Language Code eee ee eseeseeeseeseeeeeeeeteneeeneeeneeees 95 5 2 5 Viewing a Specific Address 5 cccvasecetas ci seevsecd seeusioastensecsseestevssceubesuecuabenosuateess 96 5 2 6 Viewing the Current Program Counter Address 00 eee eeseeseeeseeeeeteeeteeeeeeeaeens 96 X3 Using the Event Ponts inci cs ies eye rss siese oo diesen neoa aa eE a E AER ES s EE tiers 97 Dsl PE BreakporntS sorei eheesscs ehewtevevedes ouevesvostssverseasaghes E A E 97 5 3 2 Break COmaitions sisisi cesecbid tis a casei sdatasesstbevadsis Shit E 97 5 3 3 Opening the Event Window 2 00 cece eeeeceeeeeeeeeeeseeeaeceaesesesseeteeeaeeeaeenaeees 97 33 4 Setting PC Breakpointsiscccyscscsccscsesessssseosctossves to cesvsseodssecouseessielenevesesesupesvaetdmeeseeees 98 DISD Adieren EE REE EE ead ee pire ane d 99 5 3 6 Edite inre ead jeusdestey iuoduedacebeataparsaved Seve taplssdyedaas tes dubezseeees 99 5 3 7 Emable sie x ssitsetieastdscstieries A ieini E ER gotieein dete 99 5 38 DASable ssi ccsccssedscetansaspcses sche etsed canessasvineddedccpesseschactsed E E PS AEE E EEDE 99 53 9 Delete onessioii nian aN dion E E E R ERE E duane ae wn ee 99 DAO Delete All irisse iire ser AN E EEA E E 99 5 311 Go t SOU
97. ets the target hardware and sets the PC to the reset vector address Go F5 fut _ Starts executing the user program at the current PC Reset Go Shift F5 Resets the target microcomputer and executes the user program from the reset vector address Go To Cursor me Starts executing the user program at the current PC until the PC reaches the address indicated by the current text cursor position Set PC To Cursor Sets the PC to the address at the row of the text cursor Shift Ctrl Y Display PC Displays the current PC value PC Run Launches the Run Program dialog box allowing the user to enter the PC or PC breakpoint during executing the user program Step In F11 Executes a block of user program before breaking Step Over F10 Executes a block of user program before breaking If a subroutine call is reached then the subroutine will not be entered Step Out Shift F11 1P Executes the user program to reach the end of the current function tENESAS Rev 12 00 Aug 28 2009 Page 173 of 188 REJ10J1140 1200 Appendix B Window Functions Table B 1 Window Functions cont Toolbar Menu Option Shortcut Button Remarks Debug Step Launches the Step Program dialog box allowing the user to modify the settings for stepping Step Auto Steps only one source line when Mode the Editor window is active
98. eu xxxx Turn the power on and click on the OK button Cancel A The user system is not supplied with power Figure 4 19 Turn Power on Message Box EE heu xxxx Figure 4 20 Dialog Box of the Reset Request Message e Input the system clock value System Clock Please input System Clock MHz omea Figure 4 21 System Clock Dialog Box Rev 12 00 Aug 28 2009 Page 71 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging f Select Debug Setting from the Debug menu e_only High performance Embedded Workshop Edit View Project RASCH Setup Tools Test Window Help S k E _ Debue Sessions a 2 MORUE t E E E O PP D h we mR Shift F5 ec Display PC Ctrl Shift Y P Step h FIL TP Step Over FIO P Step Out Shift F11 Step Step Mode Halt Program hitialize connect _ Disconnect Save Memory Verify Memory Download Modules Unload Modules i aJa 3 1 ot at at 221 a e m 1E Buld Debug Findin Files Macro Test Version Control _ Edit debug settings EE E E E Default desktop Figure 4 22 High performance Embedded Workshop Window Rev 12 00 Aug 28 2009 Page 72 of 188 REJ10J1140 1200 ztENESAS Section 4 Preparations for Debugging g Select the download module with the Add button Debug Settings SessionH8S_xxxx_E104 USB_SYSTEM_ x Target Options Write_only Tareet H8S xxx
99. gging Load Break condition al 4 Cancel Figure 5 20 Load Break condition Dialog Box Select a file name from the File name combo box If you wish to specify a file that is not included in the list click on the button and enter the name of the file Clicking on the Load button loads the settings Rev 12 00 Aug 28 2009 Page 121 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Rev 12 00 Aug 28 2009 Page 122 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial Section 6 Tutorial 6 1 Introduction This section describes the main functions of the emulator by using a tutorial program The explanation of the tutorial program will be given in this section using the H8S device When the H8SX device is used the displays of some dialog boxes will differ However the operation similar to that of the H8S device can be performed The tutorial program is based on the C program that sorts ten random data items in ascending or descending order The tutorial program performs the following actions e The main function generates random data to be sorted e The sort function sorts the generated random data in ascending order e The change function then sorts the data in descending order The file tutorial cpp contains source code for the tutorial program of the H8S H8SX family devices The file Tutorial abs is a compiled load module in the Elf Dwarf2 format Note After recompilation the addresses may differ
100. he OK button The Memory window is displayed and shows the specified memory area Rev 12 00 Aug 28 2009 Page 126 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial s Memory FFCO00 abe d amp d de Address Label Register FFC000 FFC010 FFC020 FFC030 FFC040 FFC050 FFCO60 FFCO70 FFCO80 FFCOS0 FFCOAO FFCOBO FFCOCO FFCODO Figure 6 3 Memory Window e 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 Rev 12 00 Aug 28 2009 Page 127 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 6 Downloading the Tutorial Program 6 6 1 Downloading the Tutorial Program Download the object program to be debugged In this emulator it is enabled to download the program and set the PC breakpoint in the internal flash memory area For the method to set the PC breakpoint refer to section 6 16 1 PC Break Function e Select Download module by right clicking on Tutorial abs under Download modules wa Workspace re Tutorial Tutorial E Assembly source file E C header file sbrk h sorth stackscth amp C source file dbsctc sbrk c C source file resetpre cpp sort cpp tutorialcpp E Download modules 4 Tutorialabs 000 amp Dependencies D yad Download Debug Data
101. he trace buffer 0 for the last executed instruction IP The amount of acquired trace information Type Type of branch BRANCH branch source DESTINATION branch destination Address Instruction address Instruction Instruction mnemonic Source The C C or assembly language source program Label Label information It is possible to hide any column not necessary in the Trace 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 Note The number of branch instructions that can be acquired by a trace and the trace display differ depending on the product For details on the specifications of each product refer to the online help 5 4 3 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 4 4 Saving the Trace Information in a File Select Save from the popup menu to open the Save As file dialog box which allows the user to save the information displayed in the Trace window as a text file A range can be specified based on the PTR number Note that this file cannot be reloaded into the Trace window Rev 12 00 Aug 28 2009 Page 112 of 188
102. host computer is not connected to the emulator or the setup switch SW1 is turned to 0 Setup tool for H8S E1OA USB Emulator AN Shift the switch SW1 for setting up the emulator to 1 and re insert the USB cable CANCEL Figure 3 18 Error Message 2 If the setup switch SW1 is turned to 0 set it to 1 and connect the USB cable again 3 Clicking the Setup button displays the following dialog box Setup tool for H8S E104 USB Emulator A Shift the switch Sw for setting up the emulator to 0 and re insert the USB cable Once you have pressed the OK button do not disconnect the USB cable until Loading is finished Incorrect operation will damage the emulator product F CANCEL Figure 3 19 Setup tool for H8S E10A USB Emulator Dialog Box Rev 12 00 Aug 28 2009 Page 32 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 4 Turn the setup switch SW1 to 0 connect the USB cable again and click the OK button Setting up the emulator s firmware is started Notes 1 Ifthe following dialog message is displayed insert the USB cable again Setup tool for H8S E10A USB Em la It failed in the initialization Re insert the USB cable Cancel Figure 3 20 Setup tool for H8S E10A USB Emulator Dialog Box 3 2 When Add New Hardware Wizard is displayed select the Search for the best driver for your device Recommended radio button and then the S
103. ification of each MCU refer to the online help or the additional document Rev 12 00 Aug 28 2009 Page 8 of 188 REJ10J1140 1200 zeENESAS Section 2 Emulator Functions 2 2 Trace Functions The emulator has a trace function Note The number of branch instructions that can be acquired by a trace differs according to the product For the number that can be specified for each product refer to the online help 2 2 1 Branch Trace Function The branch source addresses mnemonics operands and source lines are displayed Since this function uses the trace buffer built into the device a realtime trace can be acquired Rev 12 00 Aug 28 2009 Page 9 of 188 RENESAS REJ10J1140 1200 Section 2 Emulator Functions 2 3 Break Function The emulator has the following three break functions 1 Hardware break function Break condition Uses a break controller incorporated in the device The access address instruction fetch address data or bus cycle condition can be set The logical address is the address condition This function can be also set from the Event column in the Editor or Disassembly window For the setting refer to section 5 2 Downloading a Program 2 PC break function BREAKPOINT Breaks when the dedicated instruction at the specified address that has been replaced is executed This function can be set in the Breakpoint page of the Event dialog box It can also be set when the S W breakpoint colu
104. ing the H8SX xxxx 3 Connect pins 8 9 10 12 13 and 14 when using the 14 pin user system interface cable of the user system connector to GND firmly on the PCB These pins are used as electrical GND and to monitor the connection of the user system connector Note the pin assignments of the user system connector User system interface cable GND line User system GND connection User system Figure 3 9 Connecting the User System Interface Cable to the User System when the 14 pin Type Connector is Used Rev 12 00 Aug 28 2009 Page 23 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use CAUTION Note that the pin number assignments of the user system connector differ from those of the connector manufacturer Notes 1 Connection of the signals differs depending on the package For details refer to the MCU pin assignments 2 To remove the 14 pin type user system interface cable from the user system pull the tab on the connector upward 3 The range of communication that the emulator operates at is different depending on the MCU used 4 To connect the signals from the connector refer to section in the additional document Supplementary Information on Using the H8S xxxx or Supplementary Information on Using the H8SX xxxx Rev 12 00 Aug 28 2009 Page 24 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 3 7 Connecting System Ground A WARNING Separate the frame ground
105. ion This shows that a PC breakpoint has been set Rev 12 00 Aug 28 2009 Page 130 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 8 Setting Registers Set values of the program counter and the stack pointer before executing the program e Select Registers from the CPU submenu of the View menu The Register window is displayed wz Register Name Value ERO ER ER2Z ER3 ER4 ERS ER6 ER PC CCR EZR oooo0000 ooooo000 ooo00000 oooo00000 ooooo0000 ooo00000 oooo0000 00000010 FEFEFE 10000000 01111111 Figure 6 7 Register Window Rev 12 00 Aug 28 2009 Page 131 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial e 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 400 in this tutorial program and click the OK button PG Set Value Value H 400 Radix Hex v Set As whole Register v geari Figure 6 8 Register Dialog Box PC Rev 12 00 Aug 28 2009 Page 132 of 188 REJ10J1140 1200 RENESAS 6 9 Executing the Program Execute the program as described in the following Section 6 Tutorial e To execute the program select Go from the Debug menu or click the Go button on the toolbar Figure 6 9 Go Button When the program execution is started RUNNING is displayed on the
106. is a software and hardware development tool for systems employing the Renesas microcomputer This emulator product must only be used for the above purpose Limited Applications This emulator product is not authorized for use in MEDICAL atomic energy aeronautical or space technology applications without consent of the appropriate officer of a Renesas sales company Such use includes but is not limited to use in life support systems Buyers of this emulator product must notify the relevant Renesas sales offices before planning to use the product in such applications Improvement Policy Renesas Technology Corp including its subsidiaries hereafter collectively referred to as Renesas pursues a policy of continuing improvement in design performance and safety of the emulator product Renesas reserves the right to change wholly or partially the specifications design user s manual and other documentation at any time without notice Target User of the Emulator Product This emulator product should only be used by those who have carefully read and thoroughly understood the information and restrictions contained in the user s manual Do not attempt to use the emulator product until you fully understand its mechanism It is highly recommended that first time users be instructed by users that are well versed in the operation of the emulator product Rev 12 00 Aug 28 2009 Page v of xviii RENESAS REJ10J1140 1200 LIMITED WARRANTY
107. k mark at the left side of array a in the Locals window to display the elements e When the user refers to the elements of array a before and after the execution of the sort function it is clarified that random data is sorted in descending order Rev 12 00 Aug 28 2009 Page 149 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 16 Break Function The emulator has PC and hardware break functions With the High performance Embedded Workshop a PC breakpoint can be set using the Breakpoint sheet of the Event window and a hardware break condition can be set using the Breakcondition sheet An overview and setting of the break function are described below 6 16 1 PC Break Function The emulator can set up to 255 PC breakpoints Other methods for setting a PC breakpoint than in section 6 7 Setting a PC Breakpoint are described below e Select Eventpoints from the Code submenu of the View menu The Event window is displayed e Select the Breakpoint sheet Condition amp Breakpoint Breakcondition F Figure 6 29 Event Window Before Setting a PC Breakpoint Rev 12 00 Aug 28 2009 Page 150 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial e Double click the S W breakpoint column on the Editor window A PC breakpoint is set Sourc Event S W Breakpoints Source 000878 p_sam new Sample 000884 for i 0 i lt 10 i 00088c j rand 000898 iffj lt of 0008a0 j
108. l lt 852 gt 2265 6688 Fax lt 852 gt 2377 3473 Renesas Technology Taiwan Co Ltd 10th Floor No 99 Fushing North Road Taipei Taiwan Tel lt 886 gt 2 2715 2888 Fax lt 886 gt 2 3518 3399 Renesas Technology Singapore Pte Ltd 1 Harbour Front Avenue 06 10 Keppel Bay Tower Singapore 098632 Tel lt 65 gt 6213 0200 Fax lt 65 gt 6278 8001 Renesas Technology Korea Co Ltd Kukje Center Bldg 18th FI 191 2 ka Hangang ro Yongsan ku Seoul 140 702 Korea Tel lt 82 gt 2 796 3115 Fax lt 82 gt 2 796 2145 Renesas Technology Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel lt 603 gt 7955 9390 Fax lt 603 gt 7955 9510 Colophon 6 2 H8S H8SX Family E10A USB Emulator User s Manual HS0005 KCU01H HS0005 KCU02H 2CENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1140 1200
109. lect Debug gt Debug Sessions This will open the Debug Sessions dialog box figure 4 29 Debug Sessions Debue sessions Remove Save as Properties Current session SessionHBS_yxxx_E10A USB_SYSTEM_ z Cancel Figure 4 29 Debug Sessions Dialog Box 2 Select the session you want to use from the Current session drop down list 3 Click the OK button to set the session Rev 12 00 Aug 28 2009 Page 77 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 4 3 2 Adding and Removing Sessions A new session can be added by copying settings from another session or removing a session e To add a new empty session 1 Select Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 Click the Add button to display the Add new session dialog box figure 4 30 Check the Add new session radio button Enter a name for the session Click the OK button to close the Debug Sessions dialog box This creates a file with the name entered in step 4 If a file with this name already exists an error is displayed Add new session C Use an existing session file Name Session file path aS Sa __ Browse r r Figure 4 30 Add new session Dialog Box Rev 12 00 Aug 28 2009 Page 78 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging e To import an existing session into a new session file 1 Se
110. lect Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 Click the Add button to display the Add new session dialog box figure 4 30 Check the Use an existing session file radio button Enter a name for the session eat gt cit Enter the name of an existing session file that you would like to import into the existing project or click the Browse button to select the file location If the Open and maintain link to session file check box is not checked the imported new session file is generated in the project directory If the Open and maintain link to session file check box is checked a new session file is not generated in the project directory but is linked to the existing session file If the Make session file link read only check box is checked the linked session file is used as read only 6 Click the OK button to close the Debug Sessions dialog box e To remove a session 1 Select Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 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 e To view the session properties 1 Select Debug gt Debug Sessions to display the Debug Sessions dialog box figure 4 29 2 Select the session you would like to view the properties for
111. lect the Display option from the Setup menu to set a font and size that are legible if necessary 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 Rev 12 00 Aug 28 2009 Page 129 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 7 Setting a PC Breakpoint A PC breakpoint is a simple debugging function The Editor window provides a very simple way of setting a PC breakpoint at any point in a program For example to set a PC breakpoint at the sort function call e Select by double clicking the S W breakpoint column on the line containing the sort function call Sourc Event S W Breakpoints Source 000878 p_sam new Sample 000884 for i 0 DE i Mi 00088c j rand 000838 ifGi lt Of 000880 i JESN 0008ae alld aug 0008dc p_sam gt sort a 0008ec p_sam gt change a 0008fc p_sam gt s0 a 0 00090c p_sam gt sl al 1 00091e p_sam gt s2 a 2 000930 p_sam gt s3 a 3 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 000966 p_sam gt s6 a 6 000978 p_sam gt s a 7 00098a p_sam gt s8 a 8 000990 p_sam gt s9 a 9 0003ae delete p_sam 0009ba 000904 void abort void 0009ca 0009cc pa Tutorialepp Figure 6 6 Editor Window Setting a PC Breakpoint The symbol e will appear on the line containing the sort funct
112. m 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 w Status Item Status onnected to H8S xxxx E1OA USB SYSTEM CPU 2000 Renesas E Series USB Driver PU H8S xxxx Run status Ready ause of last break BREAK POINT Run time count OO000h000min000s047ms Emulation mode Normal PU operating mode Advanced mode Expanded mode Single chip mode Endian Big lt Memory A Platform Events h Figure 6 11 Status Window Note The items that can be displayed in this window differ depending on the product For the items that can be displayed refer to the online help Rev 12 00 Aug 28 2009 Page 135 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial 6 10 Reviewing Breakpoints The user can see all the breakpoints set in the program in the Event window e Select Eventpoints from the Code submenu of the View menu The Event window is displayed Select the Breakpoint sheet wt Event Break gt Breakpoint Breakcondition j Figure 6 12 Event Window The popup menu opened by clicking the Event window with the right hand mouse button allows the user to set or change breakpoints add new breakpoints and delete enable or disable breakpoints Rev 12 00 Aug 28 2009 Page 136 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial 6 11 Viewing Memory When the label name is specified the user can view
113. mn for the line to be set is double clicked in the Source or Disassembly window 3 Forced break function Forcibly breaks the user program Rev 12 00 Aug 28 2009 Page 10 of 188 REJ10J1140 1200 RENESAS Section 2 Emulator Functions 2 4 Memory Access Functions The emulator has the following memory access functions 1 Memory read write function Memory window The memory contents are displayed in the window Only the amount specified when the Memory window is opened can be read Since there is no cache in the emulator read cycles are always generated If the memory is written in the Memory window read cycles in the range displayed in the Memory window will occur for updating the window When the Memory window is not to be updated change the setting in Lock Refresh from the popup menu me memory_edit command A command line function that reads or writes the specified amount of memory at the specified address 2 User program downloading function A load module registered in the workspace can be downloaded Such module can be selected from Download Module in the Debug menu Downloading is also possible by a popup menu that is opened by right clicking on the mouse at the load module in the workspace The user program is downloaded to the RAM or flash memory This function also downloads information required for source level debugging such as debugging information 3 Memory data uploading function The sp
114. n 2 7 RES out 3 Notes 1 In the H8S H8SX family these pin names differ depeding on the MCU Refer to each additional document 2 When the H8S H8SX family is connected the emulator outputs the reset signal to pin 4 Therefore pin 4 cannot be directly connected to pin RES of the MCU 3 When the H8S H8SX family is connected the emulator only monitors pin 7 Figure 3 12 Interface Circuits in the Emulator Rev 12 00 Aug 28 2009 Page 28 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 3 10 Setting up the Emulator Set up the emulator s firmware using the following procedures Here describes how to set up the H8S device group Note Only one device group can be set up using the setup tool when the emulator is purchased Be sure to check the device group you have selected on the label for product management attached to the back of the emulator box To use the emulator for another device group after set up purchase the license tool to add a device group CAUTION Do not disconnect the USB cable unless instructed to do so by an on screen message Incorrect operation will damage the emulator product Rev 12 00 Aug 28 2009 Page 29 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 3 10 1 Setting up at Purchasing the Emulator or Updating the Version of Software Note If you are using the HS0005KCU01H serial No 03311C or later or HS0005KCU02H serial No 04146E or l
115. n this case the High performance Embedded Workshop will open a source file browser dialog box to allow you to manually locate the file 5 2 1 Downloading a Program A load module to be debugged must be downloaded To download a program select the load module from Debug gt Download or select Download from the popup menu opened by clicking the right hand mouse button on the load module in Download modules of the Workspace window Note Before downloading a program it must be registered to the High performance Embedded Workshop as a load module For registration refer to section 4 2 Setting at Emulator Activation Rev 12 00 Aug 28 2009 Page 90 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 2 2 Viewing the Source Code Select a source file name in the Workspace window and click Open in the popup menu to make the High performance Embedded Workshop display the source file in the editor It is also possible to display your source files by double clicking on their names in the Workspace window Line Sourc Event S W Breakpoints Source long a 10 long j int I class Sample p_sam 001040 p_sam new Sample 001048 00104a j rand 001052 ifj lt OM 001054 1 eee 001056 ali J 00106c p_sam gt sort a 001076 p_sam gt change a 00107e p_sam gt s0 a 0 0010836 p_sam gt sl al 1 001092 p_sam gt s2 a 2 00109e p_sam gt s3 a 3 O010aa p_sam gt s4 a 4 0010b6 p_sam gt s
116. nnect the emulator use one of the methods a and b below For operation during connection refer to section 3 11 System Check 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 2 Setting at Emulator Activation After the Debug Settings dialog box has been set when the dialog box is closed the emulator is connected b Connecting the emulator without the setting at emulator activation The emulator can be easily connected by switching the session file that the setting for the emulator use has been registered Rev 12 00 Aug 28 2009 Page 62 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging i test High performance Embedded Workshop File Edit View Project Build Debug Setup Tools Test Window Help ps nglas ele a le amp A as foe p TDetautession SSF Default B Sl test B test a C source file E dbscte EJ intpre c 2 resetprec 2 sbrkc E testc E Dependencies E sbrkh E stackscth B typedefinet 3 ot or at at 21 8r 7 1 E Build Debug A FindinFiles A Macro A Test A Version Control E Default desktop Figure 4 10 Selecting the Session File In the list
117. nnel by using the Edit menu or in the Event window 2 The conditions for setting the break condition differ depending on the device For details refer to the online help Rev 12 00 Aug 28 2009 Page 92 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging S W breakpoint column S W breakpoint column displays the following items E A bookmark is set A breakpoint is set amp PC location gt To switch off a column in all source files 1 Click the right hand mouse button on the Editor window or select the Edit menu 2 Click the Define Column Format menu item 3 The Global Editor Column States dialog box is displayed 4 A check box indicates whether the column is enabled or not If it is checked the column is enabled If the check box is gray the column is enabled in some files and disabled in others Deselect the check box of a column you want to switch off 5 Click the OK button for the new column settings to take effect Global Editor Golumn States Disassembly Address Event Label Line Obj code S W Breakpoints S W Breakpoints ASM Figure 5 4 Global Editor Column States Dialog Box gt To switch off a column in one source file 1 Open the source file which contains the column you want to remove and right click on the Edit window 2 Click the Columns menu item to display a cascaded menu item The columns are displayed in this popup menu If a col
118. nreseesreeeees 66 Rev 12 00 Aug 28 2009 Page xv of xviii RENESAS REJ10J1140 1200 4 2 2 Downloading a Program oo eee cecceeeeseceseceseeeseeeseceeeseeeaeeeseeeaeenaeenesesseesaeeaees 68 4 2 3 Setting the Program Flash Mode cece cece eeceeeeeeeeeseceseeeseeseeeseeeeeeaeseaeeeaes 69 43 Debus SCSSIONS enseia ene e e EEE E ERKE NAE ER EEE AE E AEE EE 76 4 31 Selecting a Sessi scine raea ei r aN aE EE faces AEE ENEE rE aain 76 4 3 2 Adding and Removing Sessions sesessesseesesrerresrertsreerstesrenresrnrtsrestrstrsiesresrnrent 78 4 3 3 Saving Session Information c ccssscceceseneseseseeseceassessapesdeseds cedescapysendedacenessapesseseds 81 44 Connecting the Emulator sveciu rinira EEEa E ENEE NRTA 82 4 5 Reconmecting the Emulator 5 c icscascssecssessseescsecseassenctontedeodsnsesacdscsesenayascoacionbusesanasess 83 4 6 Ending the Emulatof ccccescoecessctustegiecss eas cctapeesiesteess cteetuas ee aE EE EEE AEE testator 84 Section 5 Debus sinisi vn ee ee nee EE pve Ree ene ener eee 85 5 1 Setting the Environment for Emulation 0 0 0 eee eeceeceeseceseceseseeeceeeeseeeaeeeaeeeaessseeseeesees 85 5 1 1 Opening the Configuration Dialog BOX oo ee eeeeseeseeeeeeeeteeeeeeeeaeeeaeees 85 SA2 Em latot Pat Ee eS E E EE 85 5 2 _ Downloading a Programmic i ecsscseecsdiciveiespsteescts slits concen sagusdedas evsceveaeg I E REE E 90 5 2 1 Downloading a Program ou eee eee eeeeseeesecesececececeesceeacesseeeaeseseseeesa
119. nsert the USB cable Figure 3 23 Setup Tool for H8S E10A USB Emulator Dialog Box Notes 1 Be sure to turn the setup switch SW1 to 1 except when the setup tool is used 2 To use the license tool for another device group it is necessary to set up the firmware by using the setup tool or license tool that corresponds to the device group To use the setup tool however the license tool must also be installed For details on the license tool refer to the following section Rev 12 00 Aug 28 2009 Page 34 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use 3 10 2 Setting up the Emulator by Using the License Tool to Add a Device Group In the license tool the emulator for the current product group can be used for debugging another product group device group such as SHxxxx Device Group H8S Device Group or H8SX Device Group that is supported by the emulator In this section the names of the device group that have already been installed and another device group to be added by the license tool are shown as SHxxxx Device Group and H8S Device Group respectively Replace these names according to your environment when you read this section The license tool to add a device group does not include software for the E10A USB emulator Install the software for your product group by using the CD R provided for the emulator or accessing the data on the web site Note If no product groups have been installed in the emulat
120. nted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part 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 When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document
121. office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions un
122. on is started Start address V Run the specified routine just after the user program execution is stopped i Fa Cancel Figure 5 15 Start Stop Function Setting Dialog Box The Start Stop Function Setting dialog box contains the following options Run the specified routine Select this box if you wish to run a user routine just before the just before the user program user program execution is started execution is started checkbox Start address Specify an address where a routine will start to run just before the user program execution is started You can also specify a label Run the specified routine Select this box if you wish to run a user routine just after the just after the user program user program execution is stopped execution is stopped Start address Specify an address where a routine checkbox will start to run just after the user program execution is stopped You can also specify a label Rev 12 00 Aug 28 2009 Page 114 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 5 2 Specifying the Routine to be Executed It is possible to specify the respective routines immediately before starting and immediately after halting the user program execution When the The specified routine is executed immediately before execution of the user s program check box is selected the routine specified in the starting address combo box which is below this check box is execute
123. or at the time of purchase do not use the license tool Refer to section 3 10 1 Setting up at Purchasing the Emulator or Updating the Version of Software and use the setup tool 1 Installing the emulator Inserting the CD R into the CD ROM drive automatically activates the installation wizard to prevent automatic activation insert the CD R by pressing the Shift key If the installation wizard is not automatically activated execute setup exe from the root directory of the CD R Follow the instructions by the installation wizard Rev 12 00 Aug 28 2009 Page 35 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 2 Setting up the emulator 1 Open the sliding switch cover and check that the switch SW1 for setting the emulator is turned to 1 2 Select Renesas gt License tool for E10A USB gt H8S Device Group from Programs in the Start menu This starts up the license tool to add a device group to the emulator Renesas Tools HomePage Figure 3 24 Start Menu License tool for H8S E104 USB Emulator xi Device group of the emulator firmware SHxxxx Version number of the emulator firmware eas Version number of the setup program 1 0 00 000 Start setting up the emulator _ sue Figure 3 25 License Tool for Emulator a Device group of the emulator firmware Name of the device group currently set b Version number of the emulator firmware The version number of softwa
124. orithms and application circuit examples 3 You should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use When exporting the products or technology described herein you should follow the applicable export control laws and regulations and procedures required by such laws and regulations 4 All information included in this document such as product data diagrams charts programs algorithms and application circuit examples is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas products listed in this document please confirm the latest product information with a Renesas sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website http www renesas com 5 Renesas has used reasonable care in compiling the information included in this document but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document 6 When using or otherwise relying on the information in this document you should evaluate the information in light of the total system before deciding about the applicability of such informa
125. orkspace 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 Other list boxes are used for setting the toolchain the fixed information is displayed when the toolchain has not been installed Rev 12 00 Aug 28 2009 Page 55 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging 3 The following dialog box is displayed Setting the Target System for Debugging r Targets xx E104 USB SYSTEM CPU Kaf 0H85 2117F E104 USB SYSTEM GPU JH8S 2125F E104 USB SYSTEM GPU H8S 2153F E104 USB SYSTEM GPU JH8S 2158F E104 USB SYSTEM GPU JH8S 2164F E104 USB SYSTEM GPU JH8S 2168F E104 USB SYSTEM CPU JH8S 2172F E104 USB SYSTEM GPU CJH8S 2189RF E10A USB SYSTEM GPL CJH8S 2215RF E104 USB SYSTEM GPL MUT 99100 CANA 1ICD CYCTECM f DII 2S oul Finish Cancel Figure 4 4 Debugger Target Dialog Box Check H8S xxxx E10A USB SYSTEM and click the Next button Rev 12 00 Aug 28 2009 Page 56 of 188 REJ10J1140 1200 ztENESAS 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 Setting the Debugger Options Target name E104 USB SYSTEM i CPU 2000 Configuration name Debue_H8S_xxxx_E104 USB_SYSTEM_ m Detail options Item Value
126. pecify a location check box to select the path to be searched for drivers The location must be specified as lt Drive gt DRIVERS lt Drive gt is the CD drive letter The above case only applies when the emulator is setup initially or the USB port on the host computer side is changed and used for first connection The time may be required until Add New Hardware Wizard is displayed 3 When using Windows 2000 or Windows XP a dialog box will be displayed to show the disconnection of the USB However this is not a problem CAUTION Do not turn off the host computer or disconnect the USB cable while setting up the emulator The emulator may be damaged Now loading Do not disconnect the USB cable until Loading is finished Figure 3 21 Start of Setting up the Emulator Rev 12 00 Aug 28 2009 Page 33 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 5 When the following dialog box is displayed setting up the emulator is completed Setup tool for H8S xxxx E1OA USB Emulator X N Setup was completed successfully Figure 3 22 Message for Completion of Setting up the Emulator 6 When setting up the emulator has been completed the following message will be displayed Turn the setup switch SW1 to 1 connect the USB cable again and click the OK button Setup tool for HBS E1 0A USB Emulator AN Shift the switch SW1 for setting up the emulator to 1 and re i
127. played Select Emulator mode Device Mode E10A USB Emulator C Program Flash omei Figure 3 35 Select Emulator mode Dialog Box Select the MCU name in use from the Device drop down list box The following items are selected in the Mode group box E10A USB Emulator The E10A USB emulator for the specified MCU is activated Debugging the program is enabled Program Flash The user program is programmed to the internal flash memory Debugging the program is disabled To download the load module register it in the workspace Rev 12 00 Aug 28 2009 Page 43 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use 7 The Connecting dialog box is displayed and the emulator connection is started Connecting Figure 3 36 Connecting Dialog Box 8 The dialog box shown in figure 3 37 is displayed if no product groups have been installed in the emulator at the time of purchase or if the H8S or H8SX license has been installed in the emulator but the emulator firmware has been set up for a different device group The dialog box shown in figure 3 38 is displayed if an old version of the emulator firmware has been set up in the emulator Clicking the OK button sets up the emulator firmware AN H8S 104 USB emulator firmware will be set up Once you have pressed the OK button do not disconnect the USB cable until Loading is finished Incorrect operation will damage the emulator product
128. plied to the file To view the currently defined filename extensions and file groups select Project gt File Extensions to launch the File Extensions dialog box To view the coloring information select Setup gt Format to display the Color tab of the Format dialog box 2 I want to change the settings of a tool but the Tools gt Administration menu option is not selectable Tools gt Administration is not selectable while a workspace is open To open the Tool Administration dialog box close the current workspace 3 I opened a workspace from my PC and one of my colleagues opened the same workspace simultaneously from another PC I changed the settings of the workspace and saved it My colleague saved the workspace after me I opened the workspace again and found that the settings of the workspace differed from those I had made The last settings to be saved are effective While a workspace is open in the High performance Embedded Workshop updating of the workspace is within the memory The settings are not saved in a file unless the user intentionally saves the workspace In addition to above refer to FAQs on the emulator and High performance Embedded Workshop on the Renesas web site www renesas com Rev 12 00 Aug 28 2009 Page 169 of 188 RENESAS REJ10J1140 1200 Appendix A Troubleshooting Rev 12 00 Aug 28 2009 Page 170 of 188 REJ10J1140 1200 RENESAS Appendix B Window Functions
129. quence of calls that led to the function to which the program counter is currently pointing This function can be used only when the load modules that have the following formats are loaded H8SX H8S H8 family series C C compiler such as ROC40008XSWO6R Elf Dwarf2 For the usage of this function refer to section 6 19 Stack Trace Function 2 6 Online Help An online help explains the usage of each function or the command syntax that can be entered from the command line window Select Emulator Help from the Help menu to view the emulator help Rev 12 00 Aug 28 2009 Page 12 of 188 REJ10J1140 1200 RENESAS Section 3 Preparation before Use Section 3 Preparation before Use 3 1 Emulator Preparation Unpack the emulator and prepare it for use as follows A WARNING READ the reference sections shaded in figure 3 1 before using the emulator product Incorrect operation will damage the user system and the emulator product The USER PROGRAM will be LOST Reference Unpack the emulator Component list Check the components against the component list When the emulator is used first Set up the emulator Section 3 Install the emulator s software Check the components and register the user information Insert the emulator Set up the main unit of the emulator Start the High performance Embedded Workshop Section 4 When the emulator is used for second Turn on the user system time or later
130. r program and there is a problem with the state that the program in the flash memory has been replaced as the PC break code Rev 12 00 Aug 28 2009 Page 87 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Step Over option combo box Flash memory write after download group box Parallel group box Short break group box Rev 12 00 Aug 28 2009 Page 88 of 188 REJ10J1140 1200 Enables or disables programming of the flash memory while executing step operation Programming of the flash memory Uses a software break for step operation e g Step Over and enables programming of the flash memory No Programming of the flash memory Uses Break Condition for step operation e g Step Over and disables programming of the flash memory Enables or disables programming of the flash memory after downloading the program Disable Disables programming of the flash memory after downloading the program Enable Enables programming of the flash memory after downloading the program Selects the setting of memory access during user program execution Disable Uses no emulator debugging functions to access memory A short break will occur Enable Uses emulator debugging functions to access memory Selects whether or not memory should be accessed during user program execution Disable Disables access to memory during user program execution Enable Enables access to memory during user program execu
131. r H8S E10A USB Emulator Dialog Box 4 Setting up the emulator s control software is started Rev 12 00 Aug 28 2009 Page 37 of 188 RENESAS REJ10J1140 1200 Section 3 Preparation before Use Notes 1 Ifthe following dialog message is displayed insert the USB cable again License tool for H8S E104 USB Emulator Eq It failed in the initialization Re insert the USB cable Cancel Figure 3 28 License tool for H8S E10A USB Emulator Dialog Box 2 When Add New Hardware Wizard is displayed select the Search for the best driver for your device Recommended radio button and then the Specify a location check box to select the path to be searched for drivers The location must be specified as lt Drive gt DRIVERS lt Drive gt is the CD drive letter The above case only applies when the USB port on the host computer side is changed and used for first connection The time may be required until Add New Hardware Wizard is displayed 3 When using Windows 2000 Windows XP or Windows Vista a dialog box will be displayed to show the disconnection of the USB However this is not a problem CAUTION Do not turn off the host computer or disconnect the USB cable while setting up the emulator The emulator may be damaged Now loading Do not disconnect the USB cable until Loading is finished GRAN SRORRaR Figure 3 29 Start of Setting up the Emulator Rev 12 00 Aug 28 2009
132. r Provisions 7 4 1 Repair with Extra Charge The products elapsed more than one year after purchase can be repaired with extra charge 7 4 2 Replacement with Extra Charge If your product s fault falls in any of the following categories the fault will be corrected by replacing the entire product instead of repair or you will be advised to purchase new one depending on the severity of the fault e Faulty or broken mechanical parts e Flaw separation or rust in coated or plated parts e Flaw or cracks in plastic parts e Faults or breakage caused by improper use or unauthorized repair or modification e Heavily damaged electric circuits due to overvoltage overcurrent or shorting of power supply e Cracks in the printed circuit board or burnt down patterns e Wide range of faults that makes replacement less expensive than repair e Unlocatable or unidentified faults 7 4 3 Expiration of the Repair Period When a period of one year elapses after the model was dropped from production repairing products of the model may become impossible 7 4 4 Transportation Fees at Sending Your Product for Repair Send your product to us for repair at your expense Rev 12 00 Aug 28 2009 Page 166 of 188 REJ10J1140 1200 RENESAS Section 7 Maintenance and Guarantee 7 5 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 p
133. r click the Disconnect toolbar button 2 Exiting the High performance Embedded Workshop Select Exit from the File menu A message box may be displayed If necessary click the Yes button to save a session After saving a session the High performance Embedded Workshop exits If not necessary click the No button to exit the High performance Embedded Workshop HEW LX iN Session has been modified do you want to save it Figure 4 34 Session has been modified Message Box Rev 12 00 Aug 28 2009 Page 84 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging Section 5 Debugging This section describes the debugging operations and their related windows and dialog boxes 5 1 Setting the Environment for Emulation 5 1 1 Opening the Configuration Dialog Box Selecting Options gt Emulator gt System or clicking the Emulator System toolbar button E opens the Configuration dialog box 5 1 2 Emulator Page Sets the emulator operation conditions Configuration General Device Emulation mode Norm o Step option Disables interrupts during single step execution v JTAG clock home o i Elash memory Disable A synchronization Disable Step Over option Programming of the flash memory T Flash memory write Disable C Enable after download Short break C Disable Enable Figure 5 1 Configuration Dialog Box General Page Rev 12 00 Aug 28 2009 Page 85 of 188 RENESAS REJ10J11
134. re Break Settings 5 7 1 Saving and Loading Hardware Break Settings This facility allows you to save or load hardware break settings i e the Break condition settings for all channels shown on the Breakcondition sheet of the Eventpoints window note that the breakpoints that have been set will not be saved The hardware break settings are saved in a file with the bcs extension and after that you can load these settings This makes it easier to switch the hardware break settings for use in debugging 5 7 2 How to Save Hardware Break Settings Use the Save Break condition dialog box to save hardware break settings To open the Save Break condition dialog box select Setup gt Emulator gt Save Break condition or click on the Save Break condition toolbar button A Save Break condition File name meine Cancel Figure 5 19 Save Break condition Dialog Box Select a file name from the File name combo box If you wish to create a new file click on the button and enter the name of the file Clicking on the Save button saves the settings 5 7 3 How to Load Hardware Break Settings Use the Load Break condition dialog box to load hardware break settings To open the Load Break condition dialog box select Setup gt Emulator gt Load Break condition or click on the Load Break condition toolbar button amp Rev 12 00 Aug 28 2009 Page 120 of 188 REJ10J1140 1200 RENESAS Section 5 Debu
135. re for controlling the H8S Device Group in the emulator This item is displayed only when the H8S Device Group is available c Version number of the setup program The version number of the setup program Rev 12 00 Aug 28 2009 Page 36 of 188 REJ10J1140 1200 ztENESAS Section 3 Preparation before Use Notes 1 If the version numbers shown in b and c are the same setup of the emulator is not required Set up the emulator only when is shown in b or the version number of b is older than that of c 2 Ifthe following error message is displayed the host computer is not connected to the emulator or the setup switch SW1 is turned to 0 License tool for H8S E104 USB Emulator xi A Shift the switch SW for setting up the emulator to 1 and re insert the USB cable an CANCEL Figure 3 26 Error Message 4 If the setup switch SW1 is turned to 0 set it to 1 and connect the USB cable again 3 Click the Setup button When the following dialog box is displayed turn the setup switch SW1 to 0 connect the USB cable again and click the OK button License tool for H8S E104 USB Emulator xi D Shift the switch W1 for setting up the emulator to D and re insert the USB cable Once you have pressed the OK button do not disconnect the USB cable until Loading is finished Incorrect operation will damage the emulator product CANCEL Figure 3 27 License tool fo
136. reak when its conditions are met use the Disable option see section 5 3 8 Disable 5 3 10 Delete All Removes all breakpoints 5 3 11 Go to Source Only enabled when one breakpoint is selected Opens the Editor window at the address of the breakpoint Rev 12 00 Aug 28 2009 Page 99 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 3 12 Set Break Dialog Box Set Break Address Address H 00000000 Figure 5 9 Set Break Dialog Box This dialog box specifies break conditions A breakpoint address to be set is specified in the Address edit box The PC register can also be specified such as PC Up to 255 breakpoints can be specified The contents to be set differ depending on the product For details refer to the on line help for each product When Address is selected if an overloaded function or class name including a member function is specified in address the Select Function dialog box opens Clicking the OK button sets the break conditions Clicking the Cancel button closes this dialog box without setting the break conditions Notes on Setting the Set Break Dialog Box 1 When an odd address is set the address is rounded down to an even address 2 A software break is accomplished by replacing instructions Accordingly it can be set only to the flash memory or RAM area However a software break cannot be set to the following addresses An area other than the flash memory or RAM
137. roduct 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 A CAUTION Note on Transporting the Product When sending your product for repair use the packing box and cushion material supplied with this product when delivered to you and specify handling caution for it to be handled as precision equipment If packing of your product is not complete it may be damaged during transportation When you pack your product in a bag make sure to use conductive polyvinyl supplied with this product usually a blue bag When you use other bags they may cause a trouble on your product because of static electricity Rev 12 00 Aug 28 2009 Page 167 of 188 RENESAS REJ10J1140 1200 Section 7 Maintenance and Guarantee Rev 12 00 Aug 28 2009 Page 168 of 188 REJ10J1140 1200 RENESAS Appendix A Troubleshooting Appendix A Troubleshooting 1 Ihave 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 gt Options The High performance Embedded Workshop looks up the filename extension to determine the group to which the file belongs and decides whether or not coloring should be ap
138. rrent PC to be displayed by entering an expression with the PC register plus an offset e g PC 0x100 Rev 12 00 Aug 28 2009 Page 96 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging 5 3 Using the Event Points The emulator has the event point function that performs breaking by specifying higher level conditions along with the PC breakpoints standard for the High performance Embedded Workshop 5 3 1 PC Breakpoints When the instruction of the specified address is fetched the user program is stopped Up to 255 points can be set 5 3 2 Break Conditions Break conditions can be used for higher level conditions such as the data condition as well as specification of the single address 5 3 3 Opening the Event Window Select View gt Code gt Eventpoints or click the Eventpoints toolbar button Bi to open the Event window 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 Breakcondition sheet Displays or sets the settings made for break condition channels Rev 12 00 Aug 28 2009 Page 97 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 3 4 Setting PC Breakpoints It is possible to display modify and add PC breakpoints on the Breakpoint sheet amp Type State Condition Action Yp Breakpoint Enable Address 0010 0 Break lt gt Breakpoint Breakcon
139. sbrk c QQ C source file B resetpre cp fel sort cpp lel tutorialcpp EY Download mode O Tutorialabs amp Dependencies 3 ol or at at 21 21 2 2 Build ADebug A Findin Files A Macro A Test A Version Control E E E A Default desktop Figure 3 43 High performance Embedded Workshop Window Note When the user program has already been downloaded to the flash memory source level debugging cannot be executed because there is no debugging information on the user program after the emulator has been activated Be sure to load the debugging information file For details refer to section 4 2 1 Setting at Emulator Activation Rev 12 00 Aug 28 2009 Page 48 of 188 REJ10J1140 1200 7tENESAS Section 3 Preparation before Use Notes 1 If the user system interface cable is disconnected from the connector on the user system the following dialog box will appear heu xxxx A The cable is not correctly connected between the emulator and the user system Figure 3 44 Cable disconnected from connector Dialog Box 2 Ifthe emulator is not properly initialized one of the dialog boxes shown in figures 3 45 through 3 51 will appear a The following dialog box is displayed when the flash memory cannot be erased Exchange the MCU since the flash memory has been reprogrammed more times than the limitation heu xxxx A Failed to erase the flash memory Figure 3 45 Flash memory erase error Dialog Box
140. sing the setup tool when the emulator is purchased Be sure to check the device group you have selected on the label for product management Rev 12 00 Aug 28 2009 Page 18 of 188 REJ10J1140 1200 RENESAS 3 3 CD R Section 3 Preparation before Use 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 Dils Microsoft runtime library A runtime library for the High performance Embedded Workshp The version is checked at installation and this library is copied to the hard disk as part of the installation process Drivers E10A USB emulator driver USB drivers for the E10A USB emulator Help Online help for the E10A USB An online help file This is copied to the hard emulator disk as part of the installation process Manuals E10A USB emulator manuals E10A USB emulator user s manuals They are provided as PDF files 3 4 Installing Emulator s Software Execute HewInstMan exe from the root directory of the CD R to start the installation manager Follow the cues given by the installation manager to install the software Note When a driver is installed in Windows XP a warning message on the Windows logo test may be displayed but it is not a problem Select Continue Anyway to proceed with driver installation Rev 12 00 Aug 28 2009
141. sor e Select Instant Watch with the right hand mouse button The following dialog box will be displayed Instant Watch za 1 FFEFSO lonelio Figure 6 15 Instant Watch Dialog Box Rev 12 00 Aug 28 2009 Page 139 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial e Click the Add button to add a variable to the Watch window FFEF80 long 10 Figure 6 16 Watch Window Displaying the Array Rev 12 00 Aug 28 2009 Page 140 of 188 REJ10J1140 1200 RENESAS Section 6 Tutorial The user can also add a variable to the Watch window by specifying its name e Click the Watch window with the right hand mouse button and select Add Watch from the popup menu The following dialog box will be displayed Enter variable i Add Watch Variable or expression Figure 6 17 Add Watch Dialog Box e Click the OK button The Watch window will now also show the int type variable i Watch FFEF80 long 10 H 000a FFEF7A int Watchi A Watch2 A Watch3 A Watch Figure 6 18 Watch Window Displaying the Variable Rev 12 00 Aug 28 2009 Page 141 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial The user can click mark at the left side of array a in the Watch window to watch all the elements w Watch long 10 FF long FE oa long EF i e long FF long H O00001770 H 00001770 H 00001770 H 00001770 H 00001770 H O0001770 FF long
142. t display source files that do not correspond to the load module in the program window For a file having the same name as the source file that corresponds to the load module only its addresses are displayed in the program window The file cannot be operated in the program window Step Even standard C libraries are executed To return to a higher level function enter Step Out In a for statement or a while statement executing a single step does not move execution to the next line To move to the next line execute two steps Operation During Accessing Files Do not perform other operations during downloading the load module or saving in the Verify Memory Save Memory or Trace window because this will not allow correct file accessing to be performed Watch Local variables at optimization Depending on the generated object code local variables in a C source file that is compiled with the optimization option enabled will not be displayed correctly Check the generated object code by displaying the Disassembly window If the allocation area of the specified local variable does not exist displays as follows Example The variable name is asc asc target error 2010 xxxx Rev 12 00 Aug 28 2009 Page 177 of 188 RENESAS REJ10J1140 1200 Appendix D Notes on High performance Embedded Workshop Variable name specification When a name other than a variable name such as a symbol name or function name is specified
143. t is not enabled 5 3 16 Disable Disables the selected break channel s When a break channel is disabled a break will not occur even if specified conditions have been satisfied 5 3 17 Delete Initializes the condition of the selected break channel To retain the details of the break channel but not have it cause a break when its conditions are met use the Disable option see section 5 3 16 Disable 5 3 18 Delete All Initializes conditions of all break channels Rev 12 00 Aug 28 2009 Page 103 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 3 19 Goto Source Only enabled when one break channel is selected Opens the Editor window at address of break channel If an address value has not been set to the break channel this option cannot be used 5 3 20 Sequential Conditions Sets the sequential condition of the break channel Note This function is set in Emulation mode of the Configuration dialog box refer to section 5 1 2 Emulator Page 5 3 21 Editing Break Conditions Handlings for settings other than PC breakpoints and break conditions are common The following describes examples of such handling 5 3 22 Modifying Break Conditions Select a break condition to be modified and choose Edit from the popup menu to open the dialog box for the event which allows the user to modify the break conditions The Edit menu is only available when one break condition is selected 5 3 23 Enabling
144. tched address after Address H0 Non user mask C User mask Mask Read Write c Figure 5 11 Break condition 1 Dialog Box H8S This page sets the address bus data bus and read write cycle conditions Note The items that can be set in this dialog box differ depending on the MCU For details on the settings for each MCU refer to the online help Rev 12 00 Aug 28 2009 Page 106 of 188 REJ10J1140 1200 RENESAS Section 5 Debugging The Address group box sets address bus conditions Option Description Don t care check box Does not set address conditions Address radio button Sets the use of the normal address bus as break conditions Only program fetched address after Sets a break after prefetched address execution as break radio button conditions Address edit box Sets the address bus value with a number or a symbol Mask edit box After the radix has been set as H hexadecimal or B binary the setting selects masking of the corresponding digit The contents of an option that can be will change depending on the radio button selected Option Description Address radio button All options can be set Only program fetched address after The Address option can be set radio button The Data group box sets the data bus conditions Option Description Don t care check box No data conditions are set Value edit box Sets
145. the use of the normal address bus as break conditions Only program fetched address radio button Sets a break before prefetched address execution as break conditions Only program fetched address after radio button Sets a break after prefetched address execution as break conditions Address edit box Sets the address bus value with a number or a symbol Non user mask radio button Does not set mask conditions User mask radio button Sets mask conditions Mask edit box Sets a value to be masked when User mask is selected For masked bits the break condition is satisfied for any values The contents of an option that can be changed depending on the radio button selected Option Description Address radio button All options can be set Only program fetched address radio button The Address and Count options can be set Only program fetched address after radio button The Address and Count options can be set Rev 12 00 Aug 28 2009 Page 109 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging The Data group box sets the data bus conditions Option Description Don t care check box No data conditions are set Value edit box Sets the data bus with a number Byte radio button Sets byte data access cycles Word radio button Sets word data access cycles Long radio button Sets longword data access
146. tine specified for execution immediately after execution of the user program ends e If the user routine is to use a general purpose register saving the contents of the register making the initial setting and restoring the contents should all be done within the routine e The specified routine is also executed when the following operations are performed Step operations Watching or changing memory during user program execution Rev 12 00 Aug 28 2009 Page 115 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging Note When parallel access is enabled and memory access is disabled the user routine is not executed e The device groups listed below do not support this function H8S 2118 device group H8S 2378 device group H8S 2339 device group H8S 2215R device group 5 6 Operation with Multiple Debugging Platforms The High performance Embedded Workshop is capable of operation with multiple debugging platforms When selecting Renesas High performance Embedded Workshop gt High performance Embedded Workshop from Programs in the Start menu to initiate another High performance Embedded Workshop two emulators can be used separately for debugging 5 6 1 Distinguishing Two Emulators Connect two emulators to the USB connector Then initiate the High performance Embedded Workshop using the tutorial workspace The following message is displayed hexxxx A Please choose driver Figure 5 16
147. tion 2eENESAS Section 5 Debugging Memory access group box Selects whether or not memory should be accessed during user Notes 1 program execution e Disable Disables access to memory during user program execution e Enable Enables access to memory during user program execution This function is supported by the H8SX family The range of frequency for the JTAG clock differs depending on the supported device The H8S family supports the optional Step Over function When Step Over is performed after selecting No Programming of the flash memory for Step Over option the instruction that follows a JSR BSR or TRAPA instruction will also be executed If there are consecutive JSR BSR or TRAPA instructions execution proceeds until it reaches an instruction that is not JSR BSR or TRAPA When there are consecutive function calls in C language the program steps all of these functions This function is supported by the H8S family Rev 12 00 Aug 28 2009 Page 89 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 2 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 I
148. tion to the intended application Renesas makes no representations warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this document or Renesas products 7 With the exception of products specified by Renesas as suitable for automobile applications Renesas products are not designed manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems or equipment or systems for transportation and traffic healthcare combustion control aerospace and aeronautics nuclear power or undersea communication transmission If you are considering the use of our products for such purposes please contact a Renesas sales office beforehand Renesas shall have no liability for damages arising out of the uses set forth above 8 Notwithstanding the preceding paragraph you should not use Renesas products for the purposes listed below 1 artificial life support devices or systems 2 surgical implantations 3 healthcare intervention e g excision administration of medication etc 4 any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above
149. tion without specifying the workspace file when Browse to another project workspace is selected 4 1 1 Creating the New Workspace Toolchain Not Used 1 In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select Create a new project workspace radio button and click the OK button Welcome Options Cancel C Open a recent project workspace Administration C Browse to another project workspace Figure 4 2 Welcome Dialog Box Rev 12 00 Aug 28 2009 Page 54 of 188 REJ10J1140 1200 RENESAS 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 New Project Workspace Projects Workspace Name Project Types AEE l gt Debugger only H8S 2114F E Project Name gt Debugger only H8S 2116F E let gt Debugger only H8S 2117F E 7 gt gt Debugger only H8S 2125F E Directory J gt Debugger only H85 2153F E C WorkSpace test Browse gt Debugger only H8S 2158F E GPU family gt gt Debugger only H8S 2164F E Has H80 y H8S H8 300 z gt gt Debugger only H8S 2168F E gt gt Debugger only H8S 2158F E Tool chain None S Properties Cael Figure 4 3 New Project Workspace Dialog Box Workspace Name edit box Enter the new w
150. 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 This manual does not intend to explain how to write C C or assembly language programs how to use any particular operating system or how best to tailor code for the individual devices These issues are left to the respective manuals This manual applies to v 3 00 Release 00 and later versions of the E10A USB emulator software The devices groups shown below are not supported by v 3 00 Release 00 and later versions of the E10A USB emulator software Table 1 E10A USB Devices Groups which are No Longer Supported H8S 2437 device group H8S 2114 device group H8S 2172 device group H8S 2158 device group H8S 2189R device group H8S 2116 device group H8S 2125 device group Microsoft and Windows are registered trademarks of Microsoft Corporation Visual SourceSafe is a trademark of Microsoft Corporation IBM is a registered trademark of International Business Machines Corporation All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organizations Rev 12 00 Aug 28 2009 Page xii of xviii REJ10J1140 1200 2RENESAS Document Conventions This manual uses the following typographic con
151. tutorial program at the PC breakpoint the following procedure must be executed e Close the Event window e Set the program counter value PC H 400 that was set in section 6 8 Setting Registers in the Register window Click the Go button e If program execution is failed reset the device and execute again the procedures above Rev 12 00 Aug 28 2009 Page 153 of 188 RENESAS REJ10J1140 1200 Section 6 Tutorial The program runs and stops at the set PC breakpoint Sourc Event S W Breakpoints Source 000378 p_sam new Sample 000884 for i 0 i lt 10 i 00088c j rand 000898 iffi lt Of 000880 joe 35 0008ae ali j 0008de p_sam gt sort a 0008ec p_sam gt change aj O008fc 00090c p_sam gt sl al 1 00091e p_sam gt s2 a 2 000330 p_sam gt s3 a 3 000942 p_sam gt s4 a 4 000954 p_sam gt s5 a 5 OO0S6E p_sam gt s6 a 6 000978 p_sam gt s7 a 7 00098a p_sam gt s8 a 8 00099c p_sam gt s9 a 9 O009ae delete p_sam 0009ba 0009c4 void abort void 0009ca 0009cc Figure 6 33 Editor Window at Execution Stop PC Break Rev 12 00 Aug 28 2009 Page 1540f188 i sst lt is sSSSSSS REJ10J1140 1200 RENESAS Section 6 Tutorial The Status window displays the following contents Status DER Item Status onnected to H8S xxxx E1OA USB SYSTEM CPU 2000 Renesas E Series USB Driver PU H8S xxxx Run status Ready ause of last break BREAK
152. umber of BREAKPOINTS and Stop At settings allowed in the Run menu is 255 Therefore when 255 BREAKPOINTS are set specification by Stop At in the Run menu becomes invalid Use the BREAKPOINTSs and Stop At in the Run menu with 255 or less total settings Note on RUN TIME Display The execution time of the user program displayed in the Status window is not a correct value since the timer in the host computer has been used Note on Displaying Timeout error If Timeout error is displayed the emulator cannot communicate with the target microcomputer Turn off the emulator and the user system and connect the emulator again by using the High performance Embedded Workshop Rev 12 00 Aug 28 2009 Page 179 of 188 RENESAS REJ10J1140 1200 Appendix D Notes on High performance Embedded Workshop 15 Support of Double Float Format In the following memory operations the double float format is not supported Fill Memory dialog box Search Memory dialog box MEMORY FILL command The Length specification in the Move dialog box is ignored Memory is copied in a byte unit 16 Note on Using the Run Program Dialog Box 1 1 Ta o0 When Run is selected from the Debug menu to specify the stop address there is the following note When the breakpoint that has been set as Disable is specified as the stop address note that the breakpoint becomes Enable when the user program stops Memory A
153. umn is enabled it has a tick mark next to its name Clicking the entry will toggle whether the column is displayed or not Rev 12 00 Aug 28 2009 Page 93 of 188 RENESAS REJ10J1140 1200 Section 5 Debugging 5 2 3 Viewing the Assembly Language Code If there is an address at the cursor position in the Editor window selecting Go to Disassembly in the pop up menu opens the Disassembly window The first address displayed in the Disassembly window is the address where the cursor is placed in the Editor window If you do not have a source file but wish to view code in the assembly language level either choose View gt Disassembly or click on the Disassembly window s toolbar button amp The Disassembly window opens at the current PC location and shows Address and Code optional which show the disassembled mnemonics with labels when available Selecting the Mixed display toolbar button ea displays both the source and the code The following shows an example in this case EE 5 Disass Obj code long a 10 long Js int i3 class Sample p_sam p_sam new Sample 001040 1480 B L ERO ERO 001042 5E002000 Label Sample Sample 24 001048 OFS6 MOY L ERO ERG forg i 0 i lt 10 i 001048 1944 j rand 00104A 5E001228 JSR A_rand 24 00104E 17F0 EXTS L ERO 001050 OF85 HOY L ERO ERS iffi lt of 001052 4C02 BGE AH 1056 8 RES 001054 1785 NEG L ERS ali j 0
154. ventions Table 2 Typographic Conventions Convention Meaning Menu gt Menu Option Bold text with gt is used to indicate menu options for example File gt Save As FILENAME C Uppercase names are used to indicate filenames enter this string Used to indicate text that must be entered excluding the quotes Key Key Used to indicate required key presses For example CTRL N means press the CTRL key and then whilst holding the CTRL key down press the N key gt When this symbol is used it is always located in the left hand margin It indicates that the text to its immediate right is describing how to The how to symbol do something Rev 12 00 Aug 28 2009 Page xiii of xviii RENESAS REJ10J1140 1200 User Registration 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 by an email Your registered information is used for only after sale services and not for any other purposes Without user registration you will not be able to receive maintenance services such as a notification of field changes or trouble information So be sure to carry out the user registration For more information about user registration send an email to the following address regist_tool renesas com Rev 12 00 Aug 28 2
155. x E10A USB SYSTEM GPU 2000 X Core Debug format s Record yi Download modules Filename Offset Address Format C WorkSpace Write_ 00000000 S Record Figure 4 23 Debug Settings Dialog Box Target Page Rev 12 00 Aug 28 2009 Page 73 of 188 RENESAS REJ10J1140 1200 Section 4 Preparations for Debugging h The download file is displayed on Projects Workspace E Wr ite_only E m Write_only Download modules Write_only mot E3 Dependencies Projects E Templates A Navigation Figure 4 24 Workspace Window Projects i Select and download the file with the right hand mouse button w Workspace Gy Write_only H Write_only Depende Downlo Download Debug Data Only Uni ad Gj Projects Download A New Module Debug Settings Configure View Allow Docking Hide Properties Figure 4 25 Download Menu of the Workspace Window Projects Rev 12 00 Aug 28 2009 Page 74 of 188 REJ10J1140 1200 RENESAS Section 4 Preparations for Debugging G The dialog box for sum checking is displayed and programming is completed Checksum is a value that data in the internal ROM area has been added by byte If no user program exists the value is calculated by H FF o l Programming Successful J Checksum H 05ea0f01 Figure 4 26 Message for Completion of Flash Memory Programming k When the following dialog box is displayed
156. y implication or otherwise under any patents or other rights of any third party or Renesas Figures Some figures in this user s manual may show items different from your actual system Device names Sections 1 to 6 of the Debugger Part in this user s manual use H8S xxxx as an example of the device names Limited Anticipation of Danger Renesas cannot anticipate every possible circumstance that might involve a potential hazard The warnings in this user s manual and on the emulator product are therefore not all inclusive Therefore you must use the emulator product safely at your own risk Rev 12 00 Aug 28 2009 Page vii of xviii RENESAS REJ10J1140 1200 SAFETY PAGE READ FIRST e 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 A 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 A DANGER DANGER indicates an imminently hazardous situation which if not avoided will result in death or serious injury A WARNING WARNING indicates a potentially hazardous situation which if not avoided could result in death or serious injury A CAUTION CAUTION indicates a potentially hazardous situation which if not avoided ma
157. y result in minor or moderate injury CAUTION CAUTION used without the safety alert symbol indicates a potentially hazardous situation which if not avoided may result in property damage NOTE emphasizes essential information Rev 12 00 Aug 28 2009 Page viii of xviii REJ10J1140 1200 RENESAS 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 Connect the connectors in the user system and in the user interface cable by confirming the correct direction Rev 12 00 Aug 28 2009 Page ix of xviii RENESAS REJ10J1140 1200 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 CAUTION Place the host computer

Download Pdf Manuals

image

Related Search

Related Contents

www .sidhil.com  Philips 9000 series Smart LED TV 60PFL9607S  取扱説明書 - BILLION  Public Comments - Independent Regulatory Review Commission  IRiver iFP-120 MP3 Player User Manual  Manual - Movistar  自動散水システム  User`s Guide for Nokia 7370  Collection Cépage® Chardonnay  MANUEL D INSTaLLATION  

Copyright © All rights reserved.
Failed to retrieve file