To our customers, Old Company Name in Catalogs and Other Documents On April 1st, 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.
Notice 1. 2. 3. 4. 5. 6. 7. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office.
Application Notes 8 Introductory Guide for R8C/Tiny Series Application Notes Renesas E8 On-Chip Debugging Emulator Renesas Single-Chip Microcomputer M16C Family / R8C/Tiny Series www.renesas-electoronics.com Rev.1.00 2007.
Notes regarding these materials 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use.
Microsoft, MS, and MS-DOS are registered trademarks of Microsoft Corporation. Windows(R) XP and Windows(R) 2000 Professional are registered trademarks of Microsoft Corporation. IBM and PC/AT are registered trademarks of International Business Machines Corporation. Pentium is a registered trademark of Intel Corporation. Adobe and Acrobat are trademarks of Adobe Systems Incorporated.
Contents 1. Overview ............................................................................................................................................................2 2. Components and Environment .........................................................................................................................3 2.1. Components .............................................................................................................................................3 2.2.
Introduction Notes Renesas reserves the right to change, wholly or partially, the specifications, design, user's manual, and other documentation at any time without notice. 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.
1. Overview This introductory guide is intended for first-time users of the E8 emulator. It provides simple descriptions regarding the E8 emulator to help the user easily follow a straight path from unpacking of the emulator to running and stopping of a program without getting lost on the way.
2. Components and Environment This section shows the components of the E8 emulator and the devices and environment needed to use the E8 emulator. Unpack the E8 emulator package and check the components against the component list. 2.1. Components Table 2.1 is a list of the E8 emulator components. Table 2.1 Components of the E8 emulator Product Name Quantity R0E000080KCE00 (E8 emulator) 1 USB cable 1 User system interface cable 1 CD-ROM 1 Figure 2.
2.2. Operating Environment The software products provided together with the E8 emulator operate on the host computer and OS version shown in table 2.2. Table 2.2 Operating Environment Host computer IBM PC/AT with the USB1.1 or USB2.0 (Full-Speed) interface OS Microsoft Windows® 2000 or XP CPU Pentium® III or higher-performance CPU (600 MHz or higher performance recommended) 128 Mbytes or more (512 Mbytes or more recommended) Memory HDD Installation disk capacity: 100 Mbytes or more.
Versions of each product differ according to the timing of the E8 emulator shipment. This guide assumes that the E8 emulator software V.2.09 Release 02 will be used. For the software, download the latest version from the Renesas website or update the software provided in this product using the AutoUpdate Utility after it has been installed. 2.5. Machines and Tools to be Prepared by the User Please prepare the following machines and tools.
3. Product Specifications 3.1. C Compiler The free evaluation-version C compiler package for the M16C series is provided in the CD-ROM. This C compiler package creates a debugging information file from the C or assembly-language source programs. Note that the free evaluation version has limitations in comparison with the production-version C compiler. For the limitations, refer to section 7.1, Limitations on C Compiler. 3.2.
4. Installing the Software 4.1. Installing the Provided Software 4.1.1. Before Starting Installation 1) Do not connect the E8 emulator to the host computer before the provided software is installed. • Installing the provided software transfers the E8 emulator driver to the host computer, and the [Found New Hardware] processing will automatically start. 2) When you have both the free evaluation version and the production version of the compiler, use the production version.
(2) The [High-performance Embedded Workshop Install Manager] dialog box will appear. For the first-time installation, [Install Manager Help] will also appear for confirmation. Click the [Close] button on the window title to close [Install Manager Help]. Figure 4.1 High-performance Embedded Workshop Install Manager After confirming [Install Manager Help], enter user information by selecting the [Input User Information] button in the [High-performance Embedded Workshop Install Manager] dialog box.
(3) The [Input User Information] dialog box will appear. Enter each item and click the [Save] button. Figure 4.3 (4) Entering User Information After entering user information, click the [Installation] button. Figure 4.
(5) The [Choice of an installation mode] dialog box will appear. Select the [Install a High-performance Embedded Workshop for the first time] radio button at the top of the installation methods and click the [Next] button. Figure 4.5 (6) Selecting the Installation Method The [Choose a folder to install] dialog box will appear. To change Installation folder, click the [Change] button and select the target folder. Check the folder for installing the file, and click the [Next] button.
The installation folder may differ depending on the version of the High-performance Embedded Workshop earlier installed. (7) • The emulator software is installed in the same folder as the High-performance Embedded Workshop Ver.2. When the High-performance Embedded Workshop Ver.2 was installed first and then updated (Ver.2->Ver.3, Ver.2->Ver.4, or Ver.2->Ver.3->Ver.4). • The emulator software is installed in the same folder as the High-performance Embedded Workshop Ver.3.
(9) Installation of the High-performance Embedded Workshop starts and the [Choose Setup Language] dialog box will appear. Select [English] and click the [Next] button. Figure 4.9 Selecting the Language for Installation (10) Installation of the E8 emulator software starts. Click the [Next] button. Figure 4.
(11) The [License Agreement] dialog box will appear. Read the contents and click the [Yes] button. Figure 4.11 License Agreement for the E8 Emulator Software (12) The [Region Selection] dialog box will appear. Select the [Europe or United States of America] radio button when you live in Europe or in the United States. Select the [Other region (Japan, Asia etc.)] radio button when you live in other countries. After selecting the region, click the [Next] button. Figure 4.
(13) The [Select Features] dialog box will appear. Deselect the functions that will not be used, and click the [Next] button. This guide shows an example of deselecting the H8SX, H8S, H8 family and M32C/90,80, M16C/80,70 series. Figure 4.
(14) The [Start Copying Files] dialog box will appear. Check the current setting and click the [Next] button. Figure 4.15 E8 Emulator Software Components to Be Installed (15) The following progress bar will be displayed while the program files are being copied. Figure 4.
(16) The [InstallShield Wizard Complete] dialog box will appear. Click the [Finish] button. Figure 4.17 Screen Showing Completion of E8 Emulator Software Installation When [Executes a Support Information Tool] is selected, user information which is required for user registration is checked. If a serial number of the emulator product has not been entered, a message box will appear to enter that number. Click the [OK] button to show the screen for entering the serial number. Figure 4.
Use the [Renesas Tools Support-information] dialog box to confirm user registration. Click the [OK] button to close the window. Figure 4.
(17) When [Open a precaution file] is selected on the screen showing completion of E8 emulator software, the [Supplementary and Precautions for Emulator E8] window will be displayed in html form. Figure 4.21 Supplementary and Precautions for Emulator E8 Be sure to read the notes and remarks on the E8 emulator. This also includes the website address where the latest-version software for the E8 emulator is available.
(19) The [Renesas AutoUpdate Utility V.*.**.** - InstallShield Wizard] dialog box will appear. Click the [Next] button. The 'V.*.**.**' means the version of the AutoUpdate Utility. Figure 4.23 Dialog Box for Starting AutoUpdate Utility Installation (20) The [Installation options] dialog box will appear. Selecting [I want to register the AutoUpdate utility to the startup folder.] enables the product update information to be automatically monitored.
(21) The [Ready to Install the Program] dialog box will appear. Click the [Install] button. Figure 4.25 Ready to Install the Renesas AutoUpdate Utility (22) After file copying finishes, note in installation of the Renesas AutoUpdate Utility will be displayed in html form. Read the notes and close the window. Figure 4.
(23) After the [AutoUpdate Utility] component has been installed, the [InstallShield Wizard Complete] dialog box will appear. Click the [Finish] button. Figure 4.27 Completing AutoUpdate Utility Installation (24) If the [Restarting Windows] dialog box appears, select the [No, I will restart my computer later.] radio button and click the [OK] button. Restart the computer manually after completing the installation of all components. Figure 4.
(25) The [High-performance Embedded Workshop Install Manager] dialog box will appear. Click the [Finish] button. This completes installation of all selected components. Figure 4.29 Completing Installation of Software Provided for the E8 Emulator Installation of the software is completed through these steps. If you were prompted to restart the computer in step (24), restart Windows.
5. Installing the Driver 5.1. Wizard for Adding Hardware (1) Connect the E8 emulator body to the host computer through the USB cable. (2) The [Found New Hardware Wizard] dialog box will appear. Select the [No, not this time] radio button and click [Next]. Figure 5.1 [Found New Hardware Wizard] Dialog Box This guide shows an example of the wizard in Windows® XP Service Pack 2 (SP2). (3) The [Welcome to the Found New Hardware Wizard] dialog box will appear.
(4) Windows® automatically detects and installs the driver. To enable automatic driver detection, the E8 emulator software should be installed in advance. For the E8 emulator software installation, refer to section 4, Installing the Software. Figure 5.3 Dialog Box Shown during Driver Installation Note: When a driver is installed in Windows® XP, a warning message from the Windows® logo test may be displayed, but this is not a problem. Select [Continue Anyway] to proceed with driver installation.
6. Let's Try Using the E8 Emulator This section describes the basic usage of the E8 emulator with regard to the sample program that is to be installed in the host computer when the E8 emulator software is installed. 6.1. Before Starting 6.1.1. Checking the Software This example uses the C compiler, High-performance Embedded Workshop, and the E8 emulator software supplied with the emulator. Be sure to check that the software is installed in the computer before using the emulator.
6.2. Activating the High-performance Embedded Workshop 6.2.1. Activating the High-performance Embedded Workshop Activate the High-performance Embedded Workshop by opening the [Start] menu and selecting [Programs], [Renesas], [High-performance Embedded Workshop], and [High-performance Embedded Workshop] in that order. Figure 6.2 Activating the High-Performance Embedded Workshop 6.3.
6.3.1. Opening a Workspace (1) The [Welcome!] dialog box will appear on the High-performance Embedded Workshop screen. Figure 6.4 Startup Screen of the High-Performance Embedded Workshop Select the [Browse to another project workspace] radio button in the [Welcome!] dialog box and click the [OK] button. Figure 6.
(2) The [Open Workspace] dialog box will appear. Figure 6.6 Selecting a Workspace File When the software of this product has been installed, workspace "Tutorial.hws" is stored in the folder structure shown below (standard location). Specify the correct location by opening the folders in order. Select the workspace "Tutorial.hws" and click the [Select] button. C:¥WorkSpace¥Tutorial¥E8¥R8C¥Tutorial¥Tutorial.hws C:¥WorkSpace └Tutorial └E8 └R8C └Tutorial └Tutorial.hws Figure 6.
6.3.2. Connecting the E8 Emulator (1) Open the menu for switching a session from the toolbar and select [SessionR8C_E8_SYSTEM]. Figure 6.9 Switching Debug Session If a dialog box appears to save the change of the previous session, click the [Yes] button. Figure 6.
(2) The [Emulator mode] dialog box will appear. Figure 6.11 [Emulator Setting] Dialog Box In the [Device] menu, the name of the device mounted on the user system should be specified. Here, select [R5F211B4] which is installed on the CPU board. Select the [Erase Flash and Connect] radio button for [Mode]. Click [Power Target from emulator. (MAX 300mA)] for [Power supply] and select 5.0 V required for the CPU board. Then, click the [Next] button. (3) The [Firmware Location] dialog box will appear.
When the [Enable advanced setting] check box is selected, it is possible to specify the specific address position in the user flash-memory area. The E8 firmware is assigned in the 2-Kbyte area that is shown in the field for setting the address on the dialog box. Figure 6.13 (4) Setting an Address to Assign the E8 Firmware (Advanced Setting) The [Communication Baud Rate] dialog box will appear.
(5) When the E8 emulator is connected for the first time, the [Please choose driver.] message box will appear. Click the [OK] button. Figure 6.15 Prompt to Choose the Driver for Connection of E8 Emulator through USB If the E8 emulator had been connected to the host computer through a USB before, the [Please choose driver.] dialog box and the subsequent [Driver Details] dialog box are skipped. (6) When the E8 emulator is connected for the first time, the [Driver Details] dialog box will appear.
(7) If the E8 firmware needs to be updated, the following dialog box appears. Click the [OK] button. Figure 6.17 Updating E8 Firmware (1) Do not disconnect the USB cable during updating the E8 firmware. Figure 6.18 (8) Updating E8 Firmware (2) While the E8 emulator connection is in progress, the [Connecting] dialog box is shown. Figure 6.
(9) After the E8 emulator has been connected, [Connected] is displayed on the [Debug] tab of the [Output] window. Figure 6.
6.3.3. Loading a Sample Program (1) Double-click on the file name ("Tutorial.x30" in this example) that has been expanded under [Download module] in the workspace to load the sample program. Figure 6.21 Downloading the Sample Program After downloading a program completes, a downward arrow is added to an icon which indicates a file, as shown below. Figure 6.
6.3.4. Opening a Source File (1) Double-click the target source file name in the workspace to open the source code. Figure 6.23 Opening a Source File Select "Tutorial.c" here.
6.3.5. Setting a Breakpoint (1) Scroll the source code display to show line 41 by using the scroll bar. Double-click line 41 Figure 6.24 Setting an Event Break Here, double-click the [Event] column on line 41 to set a break condition. A blue dot indicates that a break condition has been set. To clear a break condition previously set, double-click the blue dot. During debugging of the R8C/1B program through the E8 emulator, up to four breakpoints can be set as an [Event]-type break.
6.3.6. Executing a Program (1) Select [Reset Go] from the [Debug] menu to execute a program. Figure 6.25 Executing a Program after a Reset 6.3.7. Break Occurrence (1) When a break condition is satisfied, the source window shows the program stop position. Figure 6.26 Screen Showing Break Condition Satisfaction The yellow arrow points to the program counter location and the corresponding source line is highlighted in yellow.
6.3.8. Checking Variable Contents (1) To show the contents of a variable, select [Symbol] from the [View] menu and select [Watch]. Figure 6.27 Selecting the Memory Watch Function The R8C/Tiny series E8 emulator incorporates functions available for debugging, such as the memory watch function, the trace function which displays the result of branch tracing, and the data break function which uses a break condition of the eventpoint.
(3) The [Add Watch] dialog box will appear. Enter "a" (symbol name) in the [Variable or expression:] edit box and click the [OK] button. Figure 6.29 Specifying a Symbol Name When specifying a local variable in C language as a watch symbol, note that the variable has a scope (a valid range). A local variable is only valid while the program counter (PC) points to a location in the function that declared the local variable.
7. Limitations 7.1. Limitations on Free Evaluation-Version C Compiler 1) After the evaluation-version software has been initially installed, the free evaluation-version compiler has no limitations in usage for 60 days after it is built for the first time. 2) From the 61st day on, the linkage size is limited to within 64 Kbytes. 7.2. Limitations on Emulator Software These limitations apply to Ver. 2.09R02; they may be changed in accordance with a software upgrade.
Note: When the part number of the microcomputer in use is R5F21184, R5F21194, R5F211A4, or R5F211B4, the [Firmware Location] dialog box, which is described in (3) of section 6.3.2 in this document, will appear; specify an area that is not used in the user system. It is also possible to specify the area used by the emulator with the address by selecting the [Advanced setting] check box. 7.2.2. SFR Used by the Emulator Program In table 7.2, SFR is available for the user program and the E8 emulator program.
7.3. Memory Map Figure 7.1 shows the memory map of R8C/1B. The R5F211B4, which is mounted on the CPU board of Renesas Starter Kit for R8C/1B, has internal ROMs with the 16-kbyte program area and the 2-kbyte data area, and the internal RAM with the 1-kbyte data area. Figure 7.
8. Frequently Asked Questions 8.1. A communication error has occurred at startup If a communication error has occurred at startup, confirm the following. 1) The USB cable and user system interface cable are correctly connected. 2) The power is supplied to the CPU board when an external power source is used. Turn on the power after the message, 'Turn on the target device and press the key.' appears. 3) The selected device corresponds to the microcomputer in use. 8.2.
9. Related Documents The E8 emulator and HEW provide many other useful functions not mentioned in this document. Please refer to the following related documents for important information such as detailed specifications, technical information, or restrictions.
10. For More Information Access the following addresses for information on this product. Ask technical questions about the E8 emulator through the following e-mail addresses. USA: techsupport.rta@renesas.com Europe: tools.support.eu@renesas.com Japan: csc@renesas.com Information on the E8 emulator is available at the following Renesas websites: http://www.renesas.com/e8 (Global site) http://japan.renesas.
Revision Record Description Rev. Date Page Summary 1.00 Aug.30.
Renesas E8 Emulator Introductory Guide for R8C/Tiny Publication Date: Published by: Edited by: Aug. 30, 2007 Rev.1.00 Sales Strategic Planning Div. Renesas Technology Corp. Microcomputer Tool Development Department Renesas Solutions Corp. © 2007. Renesas Technology Corp. and Renesas Solutions Corp., All rights reserved. Printed in Japan.
Introductory Guide for R8C/Tiny Series Application Notes 1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan REJ06J0025-0100