Renesas M16C/64 User Manual
Renesas M16C/64 User Manual

Renesas M16C/64 User Manual

Emulator mcu unit for m16c/64 group
Table of Contents

Advertisement

Quick Links

REJ10J1733-0100(T)
R0E530640MCU00
User's Manual
E100 Emulator MCU Unit for M16C/64 Group
Rev.1.00
Apr. 01, 2008

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the M16C/64 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Renesas M16C/64

  • Page 1 REJ10J1733-0100(T) R0E530640MCU00 User’s Manual E100 Emulator MCU Unit for M16C/64 Group Rev.1.00 Apr. 01, 2008...
  • Page 2: Notes Regarding These Materials

    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.
  • Page 3: Preface

    All the components of this product are shown in “1.1 Package Components” (page 16). If there is any question or doubt about this product, contact your local distributor. The related manuals for using this product are listed below. You can download the latest manuals from the Renesas Tools homepage (http://www.renesas.com/tools).
  • Page 4: Important

    Purpose of use of the emulator: This emulator is a device to support the development of a system that uses the M16C Family M16C/60 Series M16C/64 Group of Renesas 16-bit single-chip MCUs. It provides support for system development in both software and hardware.
  • Page 5: Usage Restrictions

    R0E530640MCU00 User’s manual Usage restrictions: This emulator has been developed as a means of supporting system development by users. Therefore, do not use it as a device used for equipment-embedded applications. Also, do not use it for developing the systems or equipment used for the following purposes either: (1) Transportation and vehicular (2) Medical (equipment where human life is concerned)
  • Page 6: Precautions For Safety

    R0E530640MCU00 User’s Manual Precautions for Safety Definitions of Signal Words In both the user’s manual and on the product itself, several icons are used to insure proper handling of this product and also to prevent injuries to you or other persons, or damage to your properties. This chapter describes the precautions which should be taken in order to use this product safely and properly.
  • Page 7 R0E530640MCU00 User’s Manual Warnings for AC Power Supply: If the attached AC power cable does not fit the receptacle, do not alter the AC power cable and do not plug it forcibly. Failure to comply may cause electric shock and/or fire. Use an AC power cable which complies with the safety standard of the country.
  • Page 8 R0E530640MCU00 User’s Manual Cautions to Be Taken for Turning On the Power: Turn ON/OFF the power of the emulator and user system as simultaneously as possible. When turning on the power again after shutting off the power, wait about 10 seconds. Cautions to Be Taken for Handling This Product: Use caution when handling the main unit.
  • Page 9: Table Of Contents

    R0E530640MCU00 User’s Manual Contents Preface...3 Important...4 Precautions for Safety ...6 Contents...9 User Registration ...14 Terminology ...15 1. Outline...16 1.1 Package Components ...16 1.2 Other Tool Products Required for Development ...16 1.3 System Configuration ...17 1.3.1 System Configuration ...17 1.3.2 Names and Functions of each part of the emulator...18 1.4 Specifications ...20 1.5 Operating Environment...21 2.
  • Page 10 R0E530640MCU00 User’s Manual 3.13 Single-Stepping a Program ...48 3.13.1 Executing Step In Command ...49 3.13.2 Executing the Step Out Command ...50 3.13.3 Executing the Step Over Command ...51 3.14 Forcibly Breaking a Program ...52 3.15 Hardware Break Facility ...53 3.15.1 Stopping a Program when It Executes a Specified Address ...53 3.16 Stopping a Program when It Accesses Memory ...54 3.17 Trace Facility ...55...
  • Page 11 R0E530640MCU00 User’s Manual Periodically Reading Out and Showing the Emulator Status ...98 5.5.1 Periodically Reading Out and Showing the Emulator Information...98 5.5.2 Selecting the Items to Be Displayed ...99 Using Software Breakpoints...100 5.6.1 Using Software Breakpoints ...100 5.6.2 Adding/Removing Software Breakpoints ...100 5.6.3 Enabling/Disabling Software Breakpoints...102 Using Events ...104...
  • Page 12 R0E530640MCU00 User’s Manual 5.11.13 Searching for Unexecuted Lines...163 5.11.14 Clearing Code Coverage Information ...164 5.11.15 Updating Coverage Information...164 5.11.16 Inhibiting Updating of Information ...164 5.11.17 Saving Code Coverage Information to Files...165 5.11.18 Loading Code Coverage Information from Files...165 5.11.19 About Coverage Information File Load Modes ...166 5.11.20 Showing Code Coverage Results in the Editor Window...168 5.12 Measuring Data Coverage ...169...
  • Page 13 R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error)...211 6.1 Flowchart to Remedy the Troubles ...211 6.2 Self-check Error...212 6.3 Error at Debugger Startup ...213 6.4 How to Request for Support ...215 7. Hardware Specifications ...216 7.1 Target MCU Specifications...216 7.2 Differences between the Actual MCU and Emulator...217 7.3 Connection Diagram...218 7.3.1 Connection Diagram for the R0E530640MCU00 ...218...
  • Page 14: User Registration

    So be sure to carry out the user registration. For more information about user registration, please contact your local distributor. Text format for user registration C:\Program Files\Renesas\Hew\Support REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 14 of 229...
  • Page 15: Terminology

    Integrated development environment High-performance Embedded Workshop This tool provides powerful support for the development of embedded applications for Renesas microcomputers. It has an emulator debugger function allowing the emulator to be controlled from the host machine via an interface. Furthermore, it permits a range of operations from editing a project to building and debugging it to be performed within the same application.
  • Page 16: Outline

    * If there is any question or doubt about the packaged product, contact your local distributor. 1.2 Other Tool Products Required for Development To bring forward program development on an M16C/60 Series M16C/64 Group MCU, the products listed below are necessary in addition to those contained package above. Get them separately.
  • Page 17: System Configuration

    (6) Host machine Figure 1.1 System configuration (1) MCU Unit R0E530640MCU00 (this product) This is an MCU mounting board for the M16C/60 Series M16C/64 Group MCUs with 512 KB ROM and contains an evaluation MCU. (2) Flexible cable R0E001000FLX10 (included) (3) E100 Emulator main unit R0E001000EMU00 This is the E100 emulator main unit.
  • Page 18: Names And Functions Of Each Part Of The Emulator

    R0E530640MCU00 User’s Manual 1.3.2 Names and Functions of each part of the emulator Figure 1.2 shows the names of each part of the emulator. (5) System status LEDs (6) Target status LEDs Figure 1.2 Names of each part of the emulator (1) Power switch This is a switch to turn ON/OFF the emulator.
  • Page 19 R0E530640MCU00 User’s Manual (5) System Status LEDs The system status LEDs indicate the emulator E100's power supply, firmware operating status, etc. Table 1.3 lists the definitions of each system status LED. Table 1.3 Definitions of the system status LEDs Name Status POWER Emulator system power supply is turned ON.
  • Page 20: Specifications

    Connection to user system Emulator power supply REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 20 of 229 M16C/60 Series M16C/64 Group MCUs with 512 KB ROM Single-chip mode, memory expansion mode, microprocessor mode 1. Internal flash ROM: 8KB+16KB+512KB 0E000h--0FFFFh, 10000h--13FFFh, 80000h--FFFFFh 2.
  • Page 21: Operating Environment

    R0E530640MCU00 User’s Manual 1.5 Operating Environment Make sure to use this emulator in the operating environments listed in Tables 1.6 and 1.7. Table 1.6 Operating environmental conditions Item Operating temperature Storage temperature Table 1.7 Operating environment of the host machine Item Host machine IBM PC/AT compatibles...
  • Page 22: Setup

    R0E530640MCU00 User’s Manual 2. Setup This chapter describes the preparation for using this product, the procedure for starting up the emulator and how to change settings. 2.1 Flowchart of Starting Up the Emulator The procedure for starting up the emulator is shown in Figures 2.1 and 2.2. For details, refer to each section hereafter. If the emulator does not start up normally, refer to “6.
  • Page 23 R0E530640MCU00 User’s Manual Change the settings. ▼ Connect the user system. ▼ Turn on the power supply. ▼ Check the LED display of the emulator. ▼ Start up the emulator debugger from the High-performance Embedded Workshop. ▼ Set up the target MCU and system. ▼...
  • Page 24: Installing The Included Software

    R0E530640MCU00 User’s Manual 2. Setup 2.2 Installing the Included Software If you have Windows XP or 2000 on the host machine, this installation must be executed by a user with administrator rights. Note that users without administrator rights cannot complete the installation. When you insert the included CD-ROM to a CD-ROM drive, a message will appear.
  • Page 25: Connecting/Disconnecting The Mcu Unit To/From The E100 Emulator Main Unit

    R0E530640MCU00 User’s Manual 2.3 Connecting/Disconnecting the MCU Unit to/from the E100 Emulator Main Unit Figure 2.3 shows the procedure for connecting the MCU Unit to the E100 Emulator Main Unit. Connecting MCU Unit R0E530640MCU00 E100 emulator main unit R0E001000EMU00 Disconnecting Figure 2.3 Connecting/Disconnecting the MCU Unit to/from the E100 Emulator Main Unit Note on Connecting the MCU Unit to the E100 Emulator Main Unit: Always shut OFF power when connecting the MCU unit to the E100 emulator main unit.
  • Page 26: Connecting The Host Machine

    R0E530640MCU00 User’s Manual 2. Setup 2.4 Connecting the Host Machine USB interface is used for connecting the emulator to the host machine. The USB cable is connected to the USB cable connector of the emulator and the USB port of the host machine. Figure 2.4 Connecting the host machine REJ10J1733-0100 Rev.1.00 Apr.
  • Page 27: Connecting The Emulator Power Supply

    R0E530640MCU00 User’s Manual 2.5 Connecting the Emulator Power Supply Power is supplied from the included AC adapter to the emulator. The following shows how to connect the AC adapter. (1) Turn OFF the emulator. (2) Connect the DC cable of the AC adapter to the emulator. (3) Connect the AC power cable to the AC adapter.
  • Page 28: Turning On The Power

    R0E530640MCU00 User’s Manual 2.6 Turning ON the Power 2.6.1 Checking the Connections of the Emulator System Before turning the power ON, check the connection of the interface cable with the host machine, emulator, and user system. 2.6.2 Turning ON/OFF the Power - Turn ON/OFF the power of the emulator and user system as simultaneously as possible.
  • Page 29: Self-Check

    R0E530640MCU00 User’s Manual 2.7 Self-check The self-check is to check the emulator functions operate properly. To run the self-check function of the emulator, follow the procedure below. While the self-check is in progress, the LEDs will change as shown in Figure 2.6. In case of ERROR, because the target status LEDs will change depending on errors, check the system status LEDs.
  • Page 30: Selecting Clock Supply

    R0E530640MCU00 User’s Manual 2.8 Selecting Clock Supply 2.8.1 Clocks You can choose a clock supplied to the evaluation MCU by the Emulator tab in the Configuration properties dialog box of the emulator debugger. Table 2.1 shows the clocks and their initial settings. Table 2.1 Clock supply to the MCU Display of Clock...
  • Page 31: Using An Internal Oscillator Circuit Board

    R0E530640MCU00 User’s Manual 2.8.2 Using an Internal Oscillator Circuit Board Kinds of Oscillator Circuit Boards An oscillator module (20MHz) is mounted on the IC17 at factory setting. If you change the frequency, replace the oscillator module. (1) Replacing the Oscillator module Remove the MCU unit from the E100 emulator main unit, and replace the oscillator module of the IC17 (see Figure 2.7).
  • Page 32: Using The Oscillator Circuit On The User System

    R0E530640MCU00 User’s Manual 2.8.3 Using the Oscillator Circuit on the User System To operate this product with an external clock, construct the oscillator circuit as shown in Figure 2.8 in the user system and input the oscillator output at 50% duty (within the operating range of the evaluation MCU) into pin X be open.
  • Page 33: Connecting The User System

    R0E530640MCU00 User’s Manual 2. Setup 2.9 Connecting the User System Figure 2.10 shows how to connect this product to your user system. Flexible cable 100-pin 0.5mm pitch 0.65mm pitch R0E0100TNPFJ00 R0E0100TNPFK00 100-pin QFP 100-pin LQFP Figure 2.10 Connecting this product to the user system CAUTION Note on Connecting the User System: Take care not to attach a converter board in a wrong direction.
  • Page 34: Connecting To A 100-Pin 0.65Mm Pitch Foot Pattern

    R0E530640MCU00 User’s Manual 2.9.1 Connecting to a 100-pin 0.65mm Pitch Foot Pattern The following is a procedure of connecting to a 100-pin 0.65mm pitch foot pattern on the user system using the R0E0100TNPFJ00 (not included). For details on the R0E0100TNPFJ00 (not included), refer to its user's manual. (1) Attach the NQPACK100RB included with the R0E0100TNPFJ00 to the user system.
  • Page 35: Connecting To A 100-Pin 0.5Mm Pitch Foot Pattern

    R0E530640MCU00 User’s Manual 2.9.2 Connecting to a 100-pin 0.5mm Pitch Foot Pattern The following is a procedure of connecting to a 100-pin 0.5mm pitch foot pattern on the user system using the R0E0100TNPFK00 (not included). For details on the R0E0100TNPFK00 (not included), refer to its user's manual. (1) Attach the NQPACK100SD-ND included with the R0E0100TNPFK00 to the user system.
  • Page 36: Tutorial

    R0E530640MCU00 User’s Manual 3. Tutorial 3. Tutorial 3.1 Introduction The E100 emulator has a tutorial program available. This program is provided as a means for presenting to you the main features of the emulator, as will be explained in this document. This tutorial program is written in C language, and is created to sort 10 pieces of random data in ascending/descending orders.
  • Page 37: Starting The High-Performance Embedded Workshop

    R0E530640MCU00 User’s Manual 3. Tutorial 3.2 Starting the High-performance Embedded Workshop Open a workspace following the procedure described in Section 4.4, “Opening an Existing Workspace” For the directory, specify the one that is given below. OS installed drive\Workspace\Tutorial\E100\M16C For the file, specify the one that is shown below. Figure 3.1 Open Workspace dialog box 3.3 Connecting the Emulator When the debugger is connected to the emulator, a dialog box for setting up the debugger is displayed.
  • Page 38: Downloading The Tutorial Program

    R0E530640MCU00 User’s Manual 3. Tutorial 3.4 Downloading the Tutorial Program 3.4.1 Downloading the Tutorial Program Download the object program you want to debug. Note, however, that the program to be downloaded and the address in the microcomputer to which downloaded differ with each microcomputer used. Read the display of strings, etc. on the screen as suitable for the microcomputer you are using.
  • Page 39: Displaying The Source Program

    R0E530640MCU00 User’s Manual 3. Tutorial 3.4.2 Displaying the Source Program In the High-performance Embedded Workshop you can debug a program at the source level. Double-click Tutorial.c of C source file. Figure 3.3 Editor window (displaying the source program) If necessary, you can change the font and font size to make text more easily readable. For details on how to change, refer to the High-performance Embedded Workshop User’s Manual.
  • Page 40: Setting Software Breakpoints

    R0E530640MCU00 User’s Manual 3. Tutorial 3.5 Setting Software Breakpoints Software breakpoints are one of simple debug facilities. The Editor window permits you to set software breakpoints easily. For example, you can set a software breakpoint at a place where the sort function is called. Double-click a row in the S/W Breakpoints column corresponding to the source line that includes a sort function call.
  • Page 41: Executing The Program

    R0E530640MCU00 User’s Manual 3. Tutorial 3.6 Executing the Program The following describes how to run the program. 3.6.1 Resetting the CPU To reset the CPU, choose Reset CPU from the Debug menu or click the Reset CPU button in the toolbar. 3.6.2 Executing the Program To execute the program, choose Go from the Debug menu or click the Go button in the toolbar.
  • Page 42: Checking Breakpoints

    R0E530640MCU00 User’s Manual 3. Tutorial The Status window permits you to check the cause of the break that last occurred. Choose CPU −> Status from the View menu or click the View Status toolbar button . When the Status window is displayed, open the Target sheet in it and check.
  • Page 43: Altering Register Contents

    R0E530640MCU00 User’s Manual 3. Tutorial 3.8 Altering Register Contents Choose CPU −> Registers from the View menu or click the Registers toolbar button . The Register window shown below will be displayed. Figure 3.8 Register window The content of any register can be altered. Double-click the line for the register you want to alter.
  • Page 44: Referencing Symbols

    R0E530640MCU00 User’s Manual 3. Tutorial 3.9 Referencing Symbols The Labels window permits you to display the symbol information included in a module. Choose Symbols −> Labels from the View menu or click the Labels toolbar button . The Labels window shown below will be displayed.
  • Page 45: Checking Memory Contents

    R0E530640MCU00 User’s Manual 3. Tutorial 3.10 Checking Memory Contents Specifying a label name, you can check in the Memory window the content of memory where the label is registered. For example, you can check the content of memory corresponding to _main in byte size, as shown below. Choose CPU −>...
  • Page 46: Referencing Variables

    R0E530640MCU00 User’s Manual 3. Tutorial 3.11 Referencing Variables When single-stepping a program, you can see how the values of the variables used in the program will change as you step through source lines or instructions. For example, following the procedure described below, you can look at the long-type array ‘a’...
  • Page 47 R0E530640MCU00 User’s Manual 3. Tutorial Enter a variable ‘i’ in the Variable or Expression edit box and click the OK button. An int-type variable ‘i’ will be displayed in the Watch window. Figure 3.16 Watch window (showing a variable) Clicking the “+” mark shown to the left of the array ‘a’ in the Watch window, you can look at each element of the array ‘a.’ Figure 3.17 Watch window (showing array elements) REJ10J1733-0100 Rev.1.00 Apr.
  • Page 48: Showing Local Variables

    R0E530640MCU00 User’s Manual 3.12 Showing Local Variables Using the Local window you can display the local variables included in a function. As an example, let’s check the local variables of the tutorial function. This function declares three local variables ‘j,’ ‘i’ and ‘p_sam.’ Choose Symbols −>...
  • Page 49: Executing Step In Command

    R0E530640MCU00 User’s Manual 3. Tutorial 3.13.1 Executing Step In Command The Step In command ‘steps in’ a called function and stops at the first statement of the called function. To enter the sort function, choose Step In from the Debug menu or click the Step In button in the toolbar. Figure 3.19 Step In button Figure 3.20 Editor window (Step In) The highlighting in the Editor window moves to the first statement of the sort function.
  • Page 50: Executing The Step Out Command

    R0E530640MCU00 User’s Manual 3. Tutorial 3.13.2 Executing the Step Out Command The Step Out command exits a called function by executing it quickly and stops at the next statement of a program from which the function was called. To exit the sort function, choose Step Out from the Debug menu or click the Step Out button in the toolbar. Figure 3.21 Step Out button Figure 3.22 Editor window (Step Out) The data of the variable ‘a’...
  • Page 51: Executing The Step Over Command

    R0E530640MCU00 User’s Manual 3. Tutorial 3.13.3 Executing the Step Over Command The Step Over command executes the whole of a function call as one step and then stops at the next statement of the main program. To execute all statements in the change function at a time, choose Step Over from the Debug menu or click the Step Over button in the toolbar.
  • Page 52: Forcibly Breaking A Program

    R0E530640MCU00 User’s Manual 3. Tutorial 3.14 Forcibly Breaking a Program The High-performance Embedded Workshop permits you to forcibly break a program. Clear all breakpoints. To execute the rest of the tutorial function, choose Go from the Debug menu or click the Go button in the toolbar. Figure 3.25 Go button Since the program is executing an infinite loop process, choose Stop Program from the Debug menu or click the Halt button in the toolbar.
  • Page 53: Hardware Break Facility

    R0E530640MCU00 User’s Manual 3. Tutorial 3.15 Hardware Break Facility Hardware breaks cause the program to stop when it executes a specified address (instruction fetch) or reads or writes to a specified memory location (data access). 3.15.1 Stopping a Program when It Executes a Specified Address The Editor window permits you to set an instruction fetch event easily.
  • Page 54: Stopping A Program When It Accesses Memory

    R0E530640MCU00 User’s Manual 3. Tutorial 3.16 Stopping a Program when It Accesses Memory To stop a program when it reads or writes a value to a global variable, set up a hardware break as described below. Choose Event -> Hardware Break from the View menu to display the Hardware Break dialog box. Open the OR page of the Hardware Break dialog box.
  • Page 55: Trace Facility

    R0E530640MCU00 User’s Manual 3. Tutorial 3.17 Trace Facility The trace facility of the E100 emulator has a special memory known as “trace memory” that can hold an execution record of up to 4M bus cycles, which is always updated during program execution. The content of trace memory is displayed in the Trace window.
  • Page 56: Showing The Trace Information Acquired By Fill Until Stop

    R0E530640MCU00 User’s Manual 3.17.1 Showing the Trace Information Acquired by Fill Until Stop The free trace facility acquires trace information successively from when the user program starts running till when it breaks. (1) Clear all break conditions. Click the right mouse button anywhere in the Trace window and choose Acquisition from the context menu that is displayed.
  • Page 57 R0E530640MCU00 User’s Manual (2) Set a software break in a line of the tutorial function where p_sam ->s0=a[0]; is written. (3) Choose Reset Go from the Debug menu. Processing will be halted by a break, and the trace information from start to break will be displayed in the Trace window.
  • Page 58 R0E530640MCU00 User’s Manual 3. Tutorial (5) Furthermore, choosing Display Mode −> SRC from the context menu, you can display trace information in a bus, disassemble and source mixed mode. Figure 3.33 Trace window (bus, disassemble and source mixed display) REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 58 of 229...
  • Page 59: Showing The Trace Information Acquired By Fill Around Tp

    R0E530640MCU00 User’s Manual 3. Tutorial 3.17.2 Showing the Trace Information Acquired by Fill around TP The point & delay facility stops acquiring trace information a specified number of cycles after a trace point is encountered. This facility allows you to keep track of program flow from trace information without having to break the user program. (1) If any break conditions are set, clear all of them.
  • Page 60 R0E530640MCU00 User’s Manual (3) Next, set a trace point at which the debugger starts acquiring trace information. Open the OR page of the Trace conditions dialog box. Select the main function in the Editor window and drag-and-drop it into the OR page. Click the Apply button and then the Close button.
  • Page 61: Showing A Function Execution History

    R0E530640MCU00 User’s Manual 3.17.3 Showing a Function Execution History A function execution history can be displayed from the acquired trace information. (1) Clear all break conditions. Click the right mouse button anywhere in the Trace window and choose Acquisition from the context menu that is displayed.
  • Page 62 R0E530640MCU00 User’s Manual 3. Tutorial (5) Click the right mouse button anywhere in the displayed function execution history window and choose Analyze Execution History from the context menu. A function execution history will be displayed in the upper pane of the Trace window. <Display form of function execution history>...
  • Page 63: Filter Facility

    R0E530640MCU00 User’s Manual 3.17.4 Filter Facility Use the filter facility to extract only the necessary cycles from the acquired trace information. The filter facility does this by filtering the trace information in software that was acquired by hardware. Unlike the “Capture/Do not Capture conditions” where you set acquisition conditions before getting trace information, this facility allows you to change filter settings for the acquired trace information any number of times without having to reexecute.
  • Page 64 R0E530640MCU00 User’s Manual 3. Tutorial (5) Click the button in the R/W column and choose R from the context menu. Figure 3.41 Trace window (Auto Filter) (6) That way, the trace information for only R in the R/W column can be displayed. Figure 3.42 Trace window (Auto Filter) Notes: (1) The filter function does not affect the trace memory, so that its content remains intact.
  • Page 65: Stack Trace Facility

    R0E530640MCU00 User’s Manual 3. Tutorial 3.18 Stack Trace Facility Using stack information, it is possible to show which function is the caller to the function where the current PC exists. Set a software breakpoint in any line of the sort function by double-clicking at its corresponding row in the S/W Breakpoints column.
  • Page 66: What Next

    R0E530640MCU00 User’s Manual 3. Tutorial After a break, choose Code −> Stack Trace from the View menu to open the Stack Trace window. Figure 3.44 Stack Trace window You will see that the current PC exists within the sort() function, and that the sort() function is called from the tutorial() function.
  • Page 67: Preparing To Debug

    (1) Connect the host machine and the E100 Emulator and user system. Then turn on the power to the E100 Emulator and user system. (2) From Programs on the Start menu, choose Renesas -> High-performance Embedded Workshop -> High-performance Embedded Workshop.
  • Page 68: Creating A New Workspace (Toolchain Unused)

    R0E530640MCU00 User’s Manual 4.2 Creating a New Workspace (Toolchain Unused) The procedure for creating a new project workspace differs depending on whether you use a toolchain or not. The E100 Emulator has no toolchains included in it. You can use a toolchain in an environment in which the C/C++ compiler package is installed.
  • Page 69 R0E530640MCU00 User’s Manual 4. Preparing to Debug The other list boxes are used for setting up a toolchain. If no toolchains are installed, the information specific to the CPU family is displayed here. Click the OK button. (3) Select the debugger target. Figure 4.4 Setting the Target System for Debugging dialog box Select the target platform you use by placing a check mark in its check box and click the Next button.
  • Page 70: Creating A New Workspace (Toolchain Used)

    R0E530640MCU00 User’s Manual 4. Preparing to Debug When you have finished setting configuration names, emulator-related settings are completed. Click the Finish button, and the Summary dialog box will be displayed. Clicking the OK button in it starts the High- performance Embedded Workshop. (5) After starting the High-performance Embedded Workshop, connect the E100 Emulator.
  • Page 71 R0E530640MCU00 User’s Manual Workspace Name: Enter a workspace name here. Project Name: Enter a project name here. If the same name as a workspace name is good, you do not need to enter it. Directory: Enter a directory in which you want a workspace to be created. Or you can click the Browse button and select a workspace directory from the ensuing list.
  • Page 72 R0E530640MCU00 User’s Manual 4. Preparing to Debug (5) Set a configuration name. Figure 4.9 Setting the Debugger Options dialog box If you have selected two or more target platforms, click the Next button and then set a configuration name for each target platform selected.
  • Page 73: Opening An Existing Workspace

    R0E530640MCU00 User’s Manual 4.4 Opening an Existing Workspace Follow the procedure described below to open an existing workspace. (1) In the Welcome! dialog box, select the radio button titled “Browse to another project workspace” and click the OK button. Figure 4.10 Welcome! dialog box (2) The Open Workspace dialog box shown below will appear.
  • Page 74: Connecting The Emulator

    R0E530640MCU00 User’s Manual 4. Preparing to Debug 4.5 Connecting the Emulator 4.5.1 Connecting the Emulator There are following methods for connecting the emulator. (1) Setting up the emulator at startup before connecting Choose Debug Settings from the Debug menu to open the Debug Settings dialog box. In this dialog box, you can register download modules and the command chain to be automatically executed.
  • Page 75: Disconnecting The Emulator

    R0E530640MCU00 User’s Manual 4. Preparing to Debug 4.6 Disconnecting the Emulator 4.6.1 Disconnecting the Emulator To disconnect the emulator while it is active, follow one of the procedures described below. (1) Choose Disconnect from the Debug menu. (2) Click the Disconnect tool button [ (3) Enter the disconnect command in the Command Line window.
  • Page 76: Setting Up The Debug

    R0E530640MCU00 User’s Manual 4. Preparing to Debug 4.8 Setting Up the Debug Register download modules, set up automatic execution of command line batch files and set download options, etc. 4.8.1 Specifying a Download Module Choose Debug Settings from the Debug menu to open the Debug Settings dialog box. Figure 4.12 Debug Settings dialog box In the Target drop-down list box, select the product name you want to connect.
  • Page 77: Setting Up Automatic Execution Of Command Line Batch Files

    R0E530640MCU00 User’s Manual 4. Preparing to Debug 4.8.2 Setting Up Automatic Execution of Command Line Batch Files Click the Options tab of the dialog box. Figure 4.13 Debug Settings dialog box Here, register a command chain that is automatically executed with specified timing. Select your desired timing from the following four choices: - When the emulator is connected - Immediately before download...
  • Page 78: Debugging Functions

    R0E530640MCU00 User’s Manual 5. Debugging Functions The E100 Emulator supports the functions listed in the table below. Table 5.1 List of Debug Functions Item Item Software break Number of event points Content of event Event Task ID Number of times an event occurred Exception detection Hardware Hardware...
  • Page 79: Setting Up The Emulation Environment

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1 Setting Up the Emulation Environment When the emulator is connected, the Device setting and the Configuration properties dialog boxes are displayed. Here, select the general options associated with the emulator. Note that the target MCU to be debugged, etc. can be set only once at startup. 5.1.1 Setting Up the Emulator at Startup When the emulator starts, the following three dialog boxes are displayed.
  • Page 80: Setting Up The Target Mcu

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1.2 Setting Up the Target MCU (1) Selecting the target MCU On the Device page of the Device setting dialog box, specify the target MCU to be emulated. For details, refer to the hardware manual supplied with each product.
  • Page 81 R0E530640MCU00 User’s Manual 5. Debugging Functions (4) Selecting a memory expansion space You can set this when the operation mode you have selected is Memory expansion mode or Microprocessor mode. Select one from the following options: Normal Mode (initial value), 4MB Mode (5) Using PM13 (b3 of 0x000005) as set to 1 To switch the setting of the CS2 area, specify the PM13 (third bit of processor mode register 1) setting.
  • Page 82: Setting Up The System

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1.3 Setting Up the System On the System page of the Configuration Properties dialog box, set up the entire emulator system. This dialog box is displayed following the Device setting dialog box at startup. Although this dialog box can be redisplayed after startup, you cannot change some settings in it.
  • Page 83 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) Selecting the direction of external trigger cable For External trigger cable, select whether EXT pins 16–31 are directed for input or output. EXT pins 0–15 are fixed for input. Select this option from the following: - EXT 0–31 INPUT (initial value) - EXT 0–15 INPUT, EXT 16–31 directed for OUTPUT The setting of this option is reflected at only startup.
  • Page 84: Creating A Memory Map

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1.4 Creating a Memory Map On the Memory map page of the Configuration properties dialog box, set a lending memory allocation. You can specify 4 areas. (In a unit of 4KB) Figure 5.3 Configuration properties dialog box (Memory map page) The MCU group box displays the device selected in the Device setting dialog box.
  • Page 85: Setting Up Flash Rom Overwrite

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1.5 Setting Up Flash ROM Overwrite On the Internal flash memory overwrite page of the Configuration properties dialog box, set up the overwriting of flash ROM blocks, block by block. Figure 5.4 Configuration properties dialog box (Internal flash memory overwrite page) Block-by-block settings matched to the selected target MCU are automatically displayed in the list.
  • Page 86: Setting The Warning Of Exceptional Events

    R0E530640MCU00 User’s Manual 5.1.6 Setting the Warning of Exceptional Events On the Exception Warning page of the Configuration properties dialog box, set whether or not to display warnings of exceptional events in the Status window and status bar balloon. Figure 5.5 Configuration properties dialog box (Exception Warning page) The initial settings of Violation of access protection and Read from uninitialized memory are effective.
  • Page 87: Showing Progress In Boot-Up Processing

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.1.8 Showing Progress in Boot-up Processing You can confirm the progress of boot-up processing by checking the Connecting dialog box. The Connecting dialog box continues displaying progress information from when boot-up processing starts till when it ends. While the Device setting and the Configuration properties dialog boxes are displayed, you cannot manipulate this dialog box.
  • Page 88 R0E530640MCU00 User’s Manual 5. Debugging Functions (4) Showing progress with progress bars The upper progress bar shows the progress of the entire boot-up processing. The lower progress bar shows the progress of each individual processing. The content of the currently executed processing is displayed below the bar. (5) Aborting a connection Clicking the Cancel button aborts boot-up processing.
  • Page 89: Downloading A Program

    R0E530640MCU00 User’s Manual 5.2 Downloading a Program 5.2.1 Downloading a Program Download the load module to be debugged. To download a program, choose Download from the Debug menu and select your desired load module from the ensuing list, or right-click a load module in Download modules of the Workspace window and then choose Download from the pop-up or context menu.
  • Page 90 R0E530640MCU00 User’s Manual (1) Line column Shows the line numbers corresponding to lines in the source file. (2) Source Address column When a program is downloaded, this column shows the addresses corresponding to lines in the current source file. This function will prove convenient when you determine where you want the PC value or breakpoint to be set.
  • Page 91: Turning Columns In All Source Files Off

    R0E530640MCU00 User’s Manual 5.2.3 Turning columns in all source files off (1) From the Editor window 1. Right-click in the Editor window and choose Define Column Format from the context menu. 2. The Global Editor Column States dialog box will be displayed. Figure 5.8 Global Editor Column States dialog box 3.
  • Page 92: Showing Assembly Language Code

    R0E530640MCU00 User’s Manual 5.2.5 Showing Assembly Language Code While a source file is open, click the right mouse button in the Editor window and choose View Disassembly from the context menu. The Disassembly window will be displayed. The display start address in the Disassembly window is the one that corresponds to the cursor position in the Editor window. You also can use the Disassembly View button in the Editor window to display disassembled codes.
  • Page 93: Correcting Assembly Language Codes

    R0E530640MCU00 User’s Manual (2) S/W Breakpoints - ASM column This column shows the following: Table 5.5 Software breakpoint – ASM column list Software break is set. PC position (3) Disassembly Address column Shows disassembly addresses. Double-clicking here brings up an Address Specification dialog box. In this dialog box, enter the address from which you want a disassembly display to start.
  • Page 94: Displaying Memory Contents In Real Time

    R0E530640MCU00 User’s Manual 5.3 Displaying Memory Contents in Real Time 5.3.1 Displaying Memory Contents in Real Time To monitor memory contents while the user program is running, use the RAM Monitor window. The RAM monitor function permits the memory content and access status in an allocated monitor area to be recorded and inspected in real time without obstructing execution of the user program.
  • Page 95: Setting Ram Monitor Update Intervals

    R0E530640MCU00 User’s Manual (3) Initialization-omitted detect function If an area not yet write accessed is accessed for read, this function assumes such a case to be “initialization omitted” and outputs an error. To display initialization-omitted detection, choose Show Error Detection from the context menu. Uninitialized memory is displayed in yellow.
  • Page 96: Showing The Current Status

    R0E530640MCU00 User’s Manual 5.4 Showing the Current Status 5.4.1 Showing the Emulator Status To know the current status of the emulator, display the Status window. To open the Status window, choose CPU -> Status from the View menu, or click the View Status toolbar button [ This window does not update the displayed status during program execution.
  • Page 97: Showing The Emulator Status In The Status Bar

    R0E530640MCU00 User’s Manual 5.4.2 Showing the Emulator Status in the Status Bar The status of the emulator can be displayed in the status bar. By right clicking on the status bar, the items are shown. Check the items you want to show in the status bar. Figure 5.14 Status bar Table 5.8 Items list of the emulator status shown in the status bar Item...
  • Page 98: Periodically Reading Out And Showing The Emulator Status

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.5 Periodically Reading Out and Showing the Emulator Status 5.5.1 Periodically Reading Out and Showing the Emulator Information To know the changing emulator information whether the user program is running or remains idle, use the Extended Monitor window.
  • Page 99: Selecting The Items To Be Displayed

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.5.2 Selecting the Items to Be Displayed Choose Properties from the context menu of the Extended Monitor window, and the Extended Monitor Configuration dialog box will be displayed. Figure 5.18 Extended Monitor Configuration dialog box This dialog box permits you to set each item you want to be displayed in the Extended Monitor window.
  • Page 100: Using Software Breakpoints

    R0E530640MCU00 User’s Manual 5.6 Using Software Breakpoints 5.6.1 Using Software Breakpoints A software break causes the user program to stop running by rewriting the instruction code at a specified address with a BRK instruction to generate a BRK interrupt. In that sense, this is a pre-execution break function. 4096 breakpoints can be set.
  • Page 101 R0E530640MCU00 User’s Manual (1) From the Editor or the Disassembly window 1. Check to see that the Editor or the Disassembly window that is currently open includes the position at which you want to set a software breakpoint. 2. In the S/W Breakpoints column, double-click the line where you want the program to stop. Figure 5.19 Editor window Or you use the method described below to set a breakpoint.
  • Page 102: Enabling/Disabling Software Breakpoints

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.6.3 Enabling/Disabling Software Breakpoints Follow one of the following methods to enable or disable software breakpoints. - From the Editor or the Disassembly window - From the Breakpoints dialog box - From the command line (1) From the Editor or the Disassembly window 1.
  • Page 103 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) From the Breakpoints dialog box 1. Select Source Breakpoints from the Edit menu to bring up the Breakpoints dialog box. In this dialog box, you can alternately enable or disable a currently set breakpoint, as well as remove it. Figure 5.23 Breakpoints dialog box REJ10J1733-0100 Rev.1.00 Apr.
  • Page 104: Using Events

    R0E530640MCU00 User’s Manual 5.7 Using Events 5.7.1 Using Events An event refers to a combination of phenomena that occur during program execution. The E100 emulator permits you to use the event you have set as a condition of the break, trace or performance function. Events can be set at up to 16 points at the same time.
  • Page 105 R0E530640MCU00 User’s Manual (1) Creating a new event [When creating an event from any setup dialog box] 1. Click the Add button or choose a line where you want to input and double-click. Figure 5.24 Hardware Break dialog box 2. The Event dialog box shown below will be displayed. In this dialog box, set detail event conditions and then click the OK button.
  • Page 106 R0E530640MCU00 User’s Manual 5. Debugging Functions [When adding an event from the Registered Events dialog box] 1. Click the Add button in the Registered Events dialog box. Figure 5.27 Registered Events dialog box 2. The Event dialog box shown below will be displayed. In this dialog box, set detail event conditions. Enter a comment if any necessary.
  • Page 107 R0E530640MCU00 User’s Manual 3. An event will be added to the list of registered events. Figure 5.29 Registered Events dialog box (2) Adding an event from the event column of the Editor window [When adding a hardware breakpoint] 1. Select the HW Break Point from the popup menu displayed by double-clicking or right clicking anywhere in the event column of the Editor window.
  • Page 108 R0E530640MCU00 User’s Manual 2. If there is room for event counts, the event you have added from the Editor window is added to the other events as an OR condition. If there is no room, an error message is displayed. CAUTION If you are doing some editing work in the Hardware Break dialog box, you cannot set hardware breaks from the event column of the Editor window.
  • Page 109 R0E530640MCU00 User’s Manual (3) Adding events by dragging and dropping [When dragging and dropping the variable and function names in the Editor window] 1. Dragging and dropping a variable name into the Event column, you can set an event based on an access to that variable as a condition.
  • Page 110: Removing Events

    R0E530640MCU00 User’s Manual 5.7.3 Removing Events Follow one of the following methods to remove events. [When deleting an event from any setting dialog box] 1. To remove one point, select a line you want to remove in the event setting area and then click the Delete button (You can use the keys Ctrl + Del instead of clicking the Delete button).
  • Page 111 R0E530640MCU00 User’s Manual 5. Debugging Functions [When deleting an event from the Registered Events dialog box] To remove one point, select a line you want to remove in the Registered Events dialog box and then click the Delete button (You can use the keys Ctrl + Del instead of clicking the Delete button). The selected event will be removed from the list of registered events.
  • Page 112: Registering Events

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.7.4 Registering Events “Registering an event” refers to placing an event into the list of registered events. A registered event can be reused at a later time. Follow one of the following methods to register an event. Up to 256 events can be registered. (1) Registering events [When creating an event from the Event dialog box] 1.
  • Page 113 R0E530640MCU00 User’s Manual 5. Debugging Functions [When registering an event by dragging and dropping] The event you have created can be registered in the Registered Events by dragging and dropping it into the list. Figure 5.38 Hardware Break dialog box and Registered Events dialog box [When registering an event from the Registered Events dialog box] Click the Add button to create an event.
  • Page 114: Entering Events Each Time Or Reusing Events

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.7.5 Entering Events Each Time or Reusing Events There are following two methods to set events in any function concerned. One method is to create events in the respective setting dialog boxes each time. The other method is to choose one condition you want to use from the registered event list and drag and drop it into the condition area in which you want to set the event.
  • Page 115: Applying Events

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.7.6 Applying Events To enable the setting of an event after you have created it, click the Apply button. The content of what you have set has no effect until you click the Apply button. [*] after the title on the title bar of the dialog boxes of Hardware break, Trace conditions or Performance Analysis Conditions shows that some setting is under editing.
  • Page 116: Setting Hardware Break Conditions

    R0E530640MCU00 User’s Manual 5.8 Setting Hardware Break Conditions 5.8.1 Setting Hardware Break Conditions A hardware break causes the user program to stop running a specified number of cycles after a set event or phenomenon is detected (i.e., a hardware breakpoint is encountered). Up to 16 events can be specified as hardware breakpoint conditions. 5.8.2 Setting Hardware Breakpoints (1) Setting Hardware Breakpoints...
  • Page 117 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) Setting OR conditions You can choose to enable or disable the OR condition. By default, the OR condition is enabled. To disable the OR condition, deselect the check box to the left of “OR Condition.” If you add an event by double-clicking in the Editor window while the OR condition is disabled, the OR condition is automatically enabled.
  • Page 118 R0E530640MCU00 User’s Manual (3) Setting other conditions You can select one of five choices available: AND (Accumulation), AND (Simultaneous), Subroutine, Sequential and State Transition. To set any condition, select the check box to the left of “Other Conditions.” By default, other conditions are disabled (the check box to the left of “Other Conditions”...
  • Page 119: Saving/Loading The Set Contents Of Hardware Breaks

    R0E530640MCU00 User’s Manual 5. Debugging Functions (4) Detection of exception events Specify whether you want detection of following exception events to be used as a breakpoint. - Violation of access protection - Read from uninitialized memory - Stack access violation - Performance overflow - Realtime profile overflow - Trace memory overflow...
  • Page 120: Looking At Trace Information

    R0E530640MCU00 User’s Manual 5.9 Looking at Trace Information 5.9.1 Looking at Trace Information A trace is the function to acquire bus information every cycle and store it in trace memory during user program execution. Using a trace you can track the flow of application execution or examine the points at which problems occurred. The E100 emulator allows you to acquire up to 4M bus cycles.
  • Page 121 R0E530640MCU00 User’s Manual The following items of information are displayed. (This applies for bus display.) Table 5.13 Display items Column Cycle Cycle numbers stored in trace memory. The last cycle acquired is numbered 0, and the older cycles are assigned smaller numbers –1, –2, etc. sequentially retracing the past. If a delay count is set, the cycle in which a trace stop condition is met is numbered 0 and the cycles that were executed until the condition is met (cycles during a delay period) are assigned larger numbers +1, +2, etc.
  • Page 122: Setting Trace Information Acquisition Conditions

    R0E530640MCU00 User’s Manual Task ID (when RTOS is used). Example display: A task ID (task entry label) is displayed like 1 (_Task1). To show Task ID column, you need to select the Task ID on the Option page of the Trace conditions dialog box displayed from the menu of the Trace window.
  • Page 123 R0E530640MCU00 User’s Manual 5. Debugging Functions (3) Setting Capture/Do not Capture If the selected trace mode is Fill until stop, Fill until full or Fill around TP, you can specify Capture/Do not Capture conditions in the Record condition group box. Figure 5.47 Record condition group box You can choose to extract only the necessary portions of trace information specified by events or delete the unnecessary portions.
  • Page 124: Setting Trace Modes

    R0E530640MCU00 User’s Manual 5.9.4 Setting Trace Modes (1) Setting trace modes Following five trace modes are available. Table 5.14 Trace modes Stop mode Fill until stop Fill until full Fill around TP Repeat fill until stop Repeat fill until full CAUTION Recording is made in units of total 512 cycles, consisting of 1 cycle at the line where a trace point is met and 255 cycles before that point and 256 cycles after that point.
  • Page 125 R0E530640MCU00 User’s Manual 1. Fill until stop The trace memory can hold up to 4M bus cycles. When the buffer is filled, the oldest data of the acquired trace information is overwritten with new data. That way, the emulator continues acquiring trace information. Table 5.15 Specifiable conditions: Fill until stop Trace point setting Delay specification...
  • Page 126: Setting Trace Points

    R0E530640MCU00 User’s Manual 5. Repeat fill until full Each time a trace point is encountered, a total of 512 cycles before and after that point are acquired, and acquisition continues that way. When the trace memory overflows, acquisition is halted. The positions where trace points are encountered can be checked in the Trace window.
  • Page 127 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) OR condition You can choose to enable or disable the OR condition. By default, the OR condition is enabled. If you reenable the OR condition when it is disabled, the previously set event is restored with its OR condition check box selected.
  • Page 128 R0E530640MCU00 User’s Manual (3) Other conditions You can select one of five choices available: AND (Accumulation), AND (Simultaneous), Subroutine, Sequential and State Transition. To set any condition, select the check box to the left of “Other Conditions.” By default, other conditions are disabled (the check box to the left of “Other Conditions” is unselected). Figure 5.52 Trace conditions dialog box Table 5.21 Other conditions Type...
  • Page 129 R0E530640MCU00 User’s Manual 5. Debugging Functions (4) Detection of exception events Specify whether you want detection of following exception events to be used as a trace point. - Violation of access protection - Read from uninitialized memory - Stack access violation - Performance overflow - Realtime profile overflow - Task stack access violation...
  • Page 130: Setting Capture/Do Not Capture Conditions

    R0E530640MCU00 User’s Manual 5.9.6 Setting Capture/Do not Capture Conditions If the selected trace mode is Fill until stop, Fill until full or Fill around TP, you can specify Capture/Do not Capture conditions. You can choose to extract only the necessary portions of trace information specified by events or delete the unnecessary portions.
  • Page 131 R0E530640MCU00 User’s Manual 5. Debugging Functions CAUTION When you specify extraction or deletion conditions, you cannot select DIS (disassemble display) and SRC (source display) from Display Modes in the Trace window. When you use a data access event for extraction or deletion, be sure to specify the MCU bus for the access type. Figure 5.55 Event dialog box REJ10J1733-0100 Rev.1.00 Apr.
  • Page 132: Selecting The Content Of Trace Acquisition

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.7 Selecting the Content of Trace Acquisition Select the content of trace information you want to be captured into trace memory. Use the Options page of the Trace conditions dialog box to make this selection. Figure 5.56 Trace conditions dialog box Select which signal you want to be acquired from three choices available: Event Number, Task ID or External trigger.
  • Page 133: Showing Trace Results

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.8 Showing Trace Results To check trace results, look at the Trace window. Trace results can be shown in one of the following display modes. These display modes can be switched using Display Modes on the context menu of the Trace window. There are five trace result display modes: Bus Display, Disassembled Display, Source Display and Mixed Display.
  • Page 134 R0E530640MCU00 User’s Manual 5. Debugging Functions (3) Source Display Mode From the context menu, choose Display Modes -> SRC. This display mode allows you to inspect the source program’s execution path. The execution path can be verified by stepping through the source within trace data forward or backward from the current trace cycle.
  • Page 135: Filtering Trace Information

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.9 Filtering Trace Information Use the filter function to extract only the necessary records from the acquired trace information. The filter function filters the trace information in software that was acquired by hardware. Unlike the “Capture/Do not Capture conditions” where you set acquisition conditions before getting trace information, this function permits you to change filter settings for the acquired trace information any number of times.
  • Page 136 R0E530640MCU00 User’s Manual 5. Debugging Functions If there are multiple items you can specify in the Option dialog box, these items can be used as an OR condition with which to filter. Figure 5.62 Option dialog box REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 136 of 229...
  • Page 137: Searching For Trace Records

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.10 Searching for Trace Records You can search the acquired trace information for a specific trace record. To search for trace records, use the Find dialog box. To open it, choose Find -> Find from the context menu of the Trace window or click the Find button in the toolbar.
  • Page 138: Saving Trace Information To Files

    R0E530640MCU00 User’s Manual 5. Debugging Functions (1) Search history The conditions once searched are left as a history in the history column while the High-performance Embedded Workshop remains active. The next time you perform a search, choose the line you want to search from this history and click the Add button. That way, you can search trace information with that condition again.
  • Page 139: Loading Trace Information From Files

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.12 Loading Trace Information from Files To load trace information from a file, choose File -> Load from the context menu or click the Load button in the toolbar. Specify a trace information file saved in binary format. The current trace result is overwritten. Before loading a file saved in binary format, switch to the trace mode in which mode you saved trace information.
  • Page 140: Showing The History Of Function Execution

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.16 Showing the History of Function Execution To show the history of function execution from the acquired trace information, choose Function Execution History -> Function Execution History from the context menu or click the Function Execution History button in the toolbar.
  • Page 141: Showing The History Of Task Execution

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.9.17 Showing the History of Task Execution The history of task execution can only be displayed when you are debugging a realtime OS program. Furthermore, to show the history of task execution, you need to select Task ID on the Options page of the Trace conditions dialog box that is displayed when you choose Acquisition from the context menu of the Trace window.
  • Page 142: Measuring Performance

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.10 Measuring Performance 5.10.1 Measuring Performance The performance function measures a maximum, minimum, average and total execution time and a pass count in each of up to eight specified sections of the user program and then shows a time ratio relative to the total execution time (Go–Break) numerically as percentage and graphically.
  • Page 143: Setting Performance Measurement Conditions

    R0E530640MCU00 User’s Manual The contents displayed in this window are listed below. Table 5.23 Columns and contents Column Numbers assigned to 1–8 measurement sections set in the Performance Analysis Conditions dialog box. Click Settings on the context menu to open the Performance Analysis Conditions dialog box.
  • Page 144 R0E530640MCU00 User’s Manual (1) Setting measurement conditions A measurement condition can be selected from the following four modes. Select one measurement condition for one section. Use events to set a section. Event counts are fixed to 1. Even when an event count is set to other than 1, it is handled as 1. Table 5.24 Measurement condition modes [Disabled] Not measured.
  • Page 145: Starting Performance Measurement

    R0E530640MCU00 User’s Manual Table 5.25 Measurement condition modes (Continued) [Interrupt-disabled range between two events] Figure 5.70 Interrupt-disabled range between two events Measurement is taken of an interrupt disabled section from when a start event occurs to when an end event occurs. Specifically, measurement is taken of an interrupt disabled time and an interrupt disabled count within the range set by a start event and an end event.
  • Page 146: Clearing Performance Measurement Conditions

    R0E530640MCU00 User’s Manual 5.10.5 Clearing Performance Measurement Conditions Select the measurement condition you want to clear in the Performance Analysis window and then choose Set from the context menu to display the Performance Analysis Conditions dialog box. In the Performance Analysis Conditions dialog box, disable the condition you want to clear.
  • Page 147: Measuring Code Coverage

    R0E530640MCU00 User’s Manual 5.11 Measuring Code Coverage 5.11.1 Measuring Code Coverage Code coverage is the function to indicate the ‘digestion’ degree of test, i.e., “to what degree tests have been carried out on software code (pass).” Instruction execution information is displayed at C/C++ and assembler levels. This function collects instruction execution information from a program without causing it to break.
  • Page 148: Allocating Code Coverage Memory (Hardware Resource)

    R0E530640MCU00 User’s Manual Figure 5.72 Code Coverage window (1) Measurement method The Code Coverage window consists of two sheets. Table 5.28 Sheets of the Code Coverage window Sheet name Address Range sheet Measurement is performed on any address range. Source sheet Measurement is performed on a specified source file The respective sheets permit multiple ranges to be registered.
  • Page 149 R0E530640MCU00 User’s Manual 5. Debugging Functions Figure 5.73 Allocation of Code Coverage Memory dialog box When using the C0 level coverage and C1 level coverage, you can specify any of 1–8 blocks (maximum 2 Mbytes) each beginning with the 256-Kbyte boundary and any of 1–8 blocks (maximum 1 Mbyte) each beginning with the 128-Kbyte boundary as a code coverage measurement area respectively.
  • Page 150 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) Changing memory allocation If coverage memory allocation is changed, the coverage data acquired from the addresses before being changed is retrieved from coverage memory into a coverage-only buffer. Figure 5.75 Schematic of coverage memory allocation change The data accumulated in a coverage-only buffer is retained until the user clears it.
  • Page 151: Measuring An Address Range

    R0E530640MCU00 User’s Manual 5.11.4 Measuring an Address Range The Address Range sheet shows the code coverage information (C0 coverage and C1 coverage) collected by the emulator from a user-specified address range. Multiple address ranges can be registered. An address range exceeding 2 Mbytes or even an area that has no coverage memory allocated can be specified. However, data is not updated for the areas that have no coverage memory allocated.
  • Page 152: Adding Address Ranges

    R0E530640MCU00 User’s Manual The lower area shows detail information of the address range selected in the upper area. (Assembler level) Table 5.30 Contents displayed in the upper area of the Code Coverage window [Executed] 1: Instructions executed 0: Instructions not executed [Pass] Displays execution condition of conditional branch instruction T: Condition met and program branched...
  • Page 153 R0E530640MCU00 User’s Manual 5. Debugging Functions 2. In the Add Address Range dialog box that is displayed, enter an address range. Figure 5.78 Add Address Range dialog box 3. The address range you have added will be displayed in the upper area of the Code Coverage window. Figure 5.79 Code Coverage window REJ10J1733-0100 Rev.1.00 Apr.
  • Page 154: Changing Address Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.11.6 Changing Address Ranges Follow the procedure described below to change address ranges. (1) From the Address Range sheet of the Code Coverage window 1. Select an address range you want to change in the Address Range sheet and while holding it selected, choose Edit Range from the context menu.
  • Page 155: Removing Address Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 3. The address range you have changed will be displayed in the upper area of the Code Coverage window. Figure 5.82 Code Coverage window 5.11.7 Removing Address Ranges Follow the procedure described below to remove address ranges. (1) From the Address Range sheet of the Code Coverage window 1.
  • Page 156 R0E530640MCU00 User’s Manual 5. Debugging Functions 2. A dialog box asking for your confirmation will be displayed. Choose to save or not save coverage data. To save, specify a file name and then click the OK button. If you do not save, simply click the OK button.
  • Page 157: Measuring Source Files

    R0E530640MCU00 User’s Manual 5.11.8 Measuring Source Files The Source sheet shows the code coverage information (C0 coverage and C1 coverage) collected by the emulator from a user- specified source file. Multiple source files can be registered. A source file exceeding 2 Mbytes in size or even a file that includes an area that has no coverage memory allocated can be specified.
  • Page 158: Adding Source Files

    R0E530640MCU00 User’s Manual The lower area shows detail information of the address range selected in the upper area. (Assembler level) Table 5.32 Contents displayed in the lower area of the Code Coverage window [Executed] 1: Instructions executed 0: Instructions not executed [Pass] Displays execution condition of conditional branch instruction T: Condition met and program branched...
  • Page 159: Removing Source Files

    R0E530640MCU00 User’s Manual 3. The source file you have added and the function names included in it will be displayed in the upper area of the Code Coverage window. Figure 5.89 Code Coverage window 5.11.10 Removing Source Files Delete source files by the following methods. (1) From the Source sheet of the Code Coverage window 1.
  • Page 160 R0E530640MCU00 User’s Manual 5. Debugging Functions 2. A dialog box prompting for your confirmation will be displayed. Choose to save or not save coverage data. To save, specify a file name and then click the OK button. If you do not save, simply click the OK button. Figure 5.91 Delete Source File dialog box 3.
  • Page 161: Showing Percentages And Graphs

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.11.11 Showing Percentages and Graphs When the program has stopped, right-click in the upper area of the Code Coverage window and choose Percentage from the context menu. The emulator will start calculating the C0: instruction coverage rate and C1: Branch coverage rate for each address range.
  • Page 162: Using The Sort Function

    R0E530640MCU00 User’s Manual 5.11.12 Using the Sort Function Clicking a header column in the upper area of the Code Coverage window, you can sort coverage data. (1) Clicking the File column The data can be sorted by file name. Lines of one and the same file are sorted by function name. Example: File Function...
  • Page 163: Searching For Unexecuted Lines

    R0E530640MCU00 User’s Manual (3) Clicking the C0 Coverage and the File columns in that order The data is sorted in order of decreasing coverage separately for each file. Example: File Function C0 Coverage -------------------------------------- file1.cpp func3 80% ■■■■■■■■ file1.cpp func4 70% ■■■■■■■...
  • Page 164: Clearing Code Coverage Information

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.11.14 Clearing Code Coverage Information (1) Clearing a specified range of code coverage information Choose Clear Coverage Range from the context menu, and the Clear Address Range dialog box shown below will be displayed. Figure 5.95 Clear Address Range dialog box Specify the start and end address of the range you want to clear.
  • Page 165: Saving Code Coverage Information To Files

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.11.17 Saving Code Coverage Information to Files Save the code coverage information of the currently selected sheet to a file. Choose Save Data from the context menu of the Code Coverage window, and the Save Coverage Data dialog box shown below will be displayed.
  • Page 166: About Coverage Information File Load Modes

    R0E530640MCU00 User’s Manual 5. Debugging Functions Click the Add button, and the Add Coverage Files dialog box shown below will be displayed. Figure 5.98 Add Coverage Files dialog box Use this dialog box to enter a coverage information file you want to load. You can specify a load mode and offset for each file you load.
  • Page 167 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) When selecting Merge Figure 5.100 Schematic of load modes when selecting Merge (3) Example application of merge mode Figure 5.101 Schematic of merge mode applications [Procedure] (1) Open the Load Coverage Data dialog box. To begin with, select the check box labeled “Clear coverage RAM before loading.”...
  • Page 168: Showing Code Coverage Results In The Editor Window

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.11.20 Showing Code Coverage Results in the Editor Window When the Editor window is displayed in source mode, coverage results are displayed in its code coverage column. The positions corresponding to the source lines that have had instructions executed are highlighted in yellow. If coverage related settings are changed in the Code Coverage window, the display of the corresponding code coverage column is also updated.
  • Page 169: Measuring Data Coverage

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.12 Measuring Data Coverage 5.12.1 Measuring Data Coverage The E100 emulator has its code coverage, data coverage and realtime profile functions usable exclusively to each other. To use the data coverage function, choose Data Coverage in the Exclusive Functions section on the System page of the Configuration Properties dialog box.
  • Page 170: Allocating Data Coverage Memory (Hardware Resource)

    R0E530640MCU00 User’s Manual (1) Measurement method The Data Coverage window consists of three sheets. Table 5.34 Sheets of the Data Coverage window Sheet name Address Range sheet Measurement is performed on any address range. Section sheet Measurement is performed on a specified section. Task Stack sheet Measurement is made of all task stack areas.
  • Page 171 R0E530640MCU00 User’s Manual 5. Debugging Functions Figure 5.105 Schematic of data coverage memory allocation (2) Changing memory allocation If coverage memory allocation is changed, the coverage data acquired from the addresses before being changed is retrieved from coverage memory into a coverage-only buffer. Figure 5.106 Schematic of data coverage memory allocation change The data accumulated in a coverage-only buffer is retained until the user clears it.
  • Page 172: Measuring An Address Range

    R0E530640MCU00 User’s Manual 5.12.4 Measuring an Address Range The E100 emulator shows the access information it collected from a user-specified address range. Figure 5.107 Data Coverage window (address specification) The Data Coverage window is vertically divided into halves by a splitter. The upper area shows the address ranges to be measured and access rates.
  • Page 173: Adding Address Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.12.5 Adding Address Ranges Follow the procedure described below to add address ranges. (1) From the Address Range sheet of the Data Coverage window 1. Right-click in the upper area of the Address Range sheet and choose Add Range from the context menu. Figure 5.108 Data Coverage window 2.
  • Page 174: Changing Address Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 3. The address range you have added will be displayed in the upper area of the Data Coverage window. Figure 5.110 Data Coverage window 5.12.6 Changing Address Ranges Follow the procedure described below to change address ranges. (1) From the Address Range sheet of the Data Coverage window 1.
  • Page 175 R0E530640MCU00 User’s Manual 5. Debugging Functions 2. In the Edit Address Range dialog box that is displayed, change the address range. Figure 5.112 Edit Address Range dialog box 3. The address range you have changed will be displayed in the upper area of the Data Coverage window. Figure 5.113 Data Coverage window REJ10J1733-0100 Rev.1.00 Apr.
  • Page 176: Removing Address Ranges

    R0E530640MCU00 User’s Manual 5.12.7 Removing Address Ranges Follow the procedure described below to remove address ranges. (1) From the Address Range sheet of the Data Coverage window 1. Select an address range you want to remove in the Address Range sheet and while holding it selected, choose Delete Range from the context menu.
  • Page 177 R0E530640MCU00 User’s Manual 5. Debugging Functions 3. The address range you have selected will be removed. Figure 5.116 Data Coverage window REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 177 of 229...
  • Page 178: Measuring Sections

    R0E530640MCU00 User’s Manual 5.12.8 Measuring Sections The E100 emulator shows the access information it collected from a user-specified section. Figure 5.117 Data Coverage window (section name specification) The Data Coverage window is vertically divided into halves by a splitter. The upper area shows the address ranges (section names) to be measured and access rates. Table 5.37 Contents in the upper area of Data Coverage window [Section] Address ranges (sections) in which coverage is measured...
  • Page 179: Adding Sections

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.12.9 Adding Sections Follow the procedure described below to add sections. (1) From the Section sheet of the Data Coverage window 1. Right-click in the upper area of the Section sheet and choose Add Range from the context menu. Figure 5.118 Data Coverage window 2.
  • Page 180: Removing Sections

    R0E530640MCU00 User’s Manual 5. Debugging Functions 3. The address range (section name) you have added will be displayed in the upper area of the Data Coverage window. Figure 5.120 Data Coverage window 5.12.10 Removing Sections Follow the procedure described below to remove sections. (1) From the Section sheet of the Data Coverage window 1.
  • Page 181 R0E530640MCU00 User’s Manual 5. Debugging Functions 2. A dialog box prompting for your confirmation will be displayed. Choose to save or not save coverage data. To save, click the Yes button and specify a file name. If you do not save, click the No button. Figure 5.122 Confirmation of Removing Section dialog box 3.
  • Page 182: Measuring Task Stack

    R0E530640MCU00 User’s Manual 5.12.11 Measuring Task Stack The Task Stack sheet shows the access information collected from a task stack. Task stacks are automatically registered. You cannot add, remove or change any task. If tasks are changed pursuant to alterations of the user program, for example, the window is automatically updated. Figure 5.124 Data Coverage window (task stack specification) The Data Coverage window is vertically divided into halves by a splitter.
  • Page 183: Clearing Data Coverage Information

    R0E530640MCU00 User’s Manual 5. Debugging Functions If located outside the coverage memory allocated area, address lines are displayed in gray. Although the existing coverage information of those addresses is retained, updating of coverage information by program execution does not apply. The acquired coverage information is accumulated in memory until the user clears it.
  • Page 184: Saving Data Coverage Information To Files

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.12.15 Saving Data Coverage Information to Files Save the data coverage information of the currently selected sheet to a file. Choose Save Data from the context menu of the Data Coverage window, and the Save Data dialog box shown below will be displayed.
  • Page 185 R0E530640MCU00 User’s Manual 5. Debugging Functions Click the Add button, and the Add coverage data file dialog box shown below will be displayed. Figure 5.128 Add coverage data file dialog box Use this dialog box to enter a coverage information file you want to load. You can specify a load mode and offset for each file you load.
  • Page 186: Viewing Realtime Profile Information

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13 Viewing Realtime Profile Information 5.13.1 Viewing Realtime Profile Information The E100 emulator has its code coverage, data coverage and realtime profile functions usable exclusively to each other. To use the realtime profile function, choose Realtime Profile in the Switching function section on the System page of the Configuration properties dialog box.
  • Page 187 R0E530640MCU00 User’s Manual 5. Debugging Functions (e) Relationship between Go execution start address and break address within a measurement range and the measurable range Figure 5.129 Measurable range Measurable range when the program breaks at the location of a black dot [●]: Execution time and execution count of functions h and k Measurable range when the program breaks at the location of a red dot [●]: Execution time and execution count of functions h and k...
  • Page 188: Setting Realtime Profile Measurement Modes

    R0E530640MCU00 User’s Manual (2) Task profile Execution performance is measured one task at a time. The Realtime profile window shows task IDs, counts and the cumulative execution time, execution rate and average execution time of tasks. 5.13.2 Setting Realtime Profile Measurement Modes Choose Set Ranges from the context menu that is displayed when you right-click in the present window.
  • Page 189: Setting Function Profile Measurement Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13.4 Setting Function Profile Measurement Ranges Choose Set Ranges from the context menu that is displayed when you right-click in the present window. The Realtime Profile Setting dialog box will be displayed. In this dialog box, set a profile measurement range. [Function mode] Figure 5.131 Realtime Profile Setting dialog box (1) Memory allocation...
  • Page 190: Saving Function Profile Measurement Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13.5 Saving Function Profile Measurement Ranges Save the current task mode and function profile measurement range (memory allocation state). Click the Save button of the Realtime Profile Setting dialog box, and the Save As dialog box will be displayed. Enter a file name in which you want function profile measurement ranges to be saved.
  • Page 191: Measuring Task Profiles

    R0E530640MCU00 User’s Manual 5.13.7 Measuring Task Profiles Measure execution performance one task at a time. Figure 5.133 Realtime Profile dialog box (task profile): The following shows detail information in each column. Table 5.42 Details on each column Block Block number Task ID Task ID, entry address Count...
  • Page 192: Setting Task Profile Measurement Ranges

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13.8 Setting Task Profile Measurement Ranges Choose Set Range from the context menu that is displayed when you right-click in the present window. The Realtime Profile Setting dialog box will be displayed. In this dialog box, set a profile measurement range. [Task mode] Figure 5.134 Realtime Profile Setting dialog box (1) Automatic task detection...
  • Page 193: Saving Task Profile Measurement Tasks

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13.9 Saving Task Profile Measurement Tasks Save the current task mode and measurement tasks (task IDs and enabled/disabled states). Click the Save button of the Realtime Profile Setting dialog box, and the Save As dialog box will be displayed. Enter a file name in which you want task profile measurement tasks to be saved.
  • Page 194: Clearing Realtime Profile Measurement Results

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.13.11 Clearing Realtime Profile Measurement Results Choose Clear from the context menu of the Realtime Profile window, and all measurement results will be cleared. Unless you choose to Clear, measurement results are accumulated in memory. 5.13.12 Saving Realtime Profile Measurement Results Save the current realtime profile measurement results in text format.
  • Page 195: Maximum Measurement Time Of The Realtime Profile

    R0E530640MCU00 User’s Manual 5.13.14 Maximum Measurement Time of the Realtime Profile (1) Maximum measurement time The timer used for performance measurement is comprised of a 40-bit counter. The maximum measurement time varies with the unit of measurement selected. To select a unit of measurement, specify it in the Measurement interval drop-down list of the Properties dialog box. The measurable maximum times are listed below.
  • Page 196: Detecting Exception Events

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.14 Detecting Exception Events 5.14.1 Detecting Exception Events The E100 emulator permits you to detect various exception events that have occurred during user program execution. Exception events include an abnormal behavior of the user program, as well as an overflow of the measurement counter of any function involved, etc.
  • Page 197 R0E530640MCU00 User’s Manual (3) Methods for setting protection There are following two methods of specification: - Automatic setting by section information in a download module - Specifying the access attribute of any area individually (4) Detection method An access protect violation is detected by the emulator’s internal resources (blocks 1–16). The blocks are automatically allocated by the emulator’s exclusive algorithm.
  • Page 198: Setting An Access Protected Area

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.14.3 Setting an Access Protected Area Follow the procedure described below to set an access protected area. (1) From the Hardware Break dialog box 1. Select the Exception check box on the Hardware Break sheet and then click the Detail button. Figure 5.138 Hardware Break dialog box 2.
  • Page 199 R0E530640MCU00 User’s Manual 3. The Violation of access protection dialog box shown below will be displayed. To have the access attributes automatically set according to the section information in a download module when a program is downloaded, select the check box labeled “Automatically set address areas at downloading.” Figure 5.140 Violation of access protection dialog box 4.
  • Page 200 R0E530640MCU00 User’s Manual 5. Debugging Functions 6. The protected area you have added will be displayed in the Address Areas list of the Violation of access protection dialog box. Figure 5.142 Violation of access protection dialog box REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 200 of 229...
  • Page 201 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) From the Trace conditions dialog box 1. In the Trace Mode drop-down list of the Trace sheet, select Fill around TP. Select the Exception check box and then click the Detail button. Figure 5.143 Trace conditions dialog box 2.
  • Page 202: Detecting Initialization-Omitted

    R0E530640MCU00 User’s Manual 5. Debugging Functions The Violation of access protection dialog box will be displayed. The rest is the same as you opened it from the Hardware Break dialog box. 5.14.4 Detecting Initialization-Omitted This is the function to determine the case where an access for read is performed before being write accessed when both histories of read access and write access do not exist to be “initialization omitted”...
  • Page 203: Detecting A Performance Overflow

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.14.5 Detecting a Performance Overflow This is the function to detect that the time or count being measured by the performance function has exceeded the maximum measurement time or maximum measurement count and output an error. Time-out and count-out (count expired) cases in a performance measurement are collectively referred to as a performance overflow.
  • Page 204: Detecting A Trace Memory Overflow

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.14.7 Detecting a Trace Memory Overflow This is a function to detect that trace memory capacity (4MB cycle) overflowed and output an error. (1) Actions taken when a trace memory overflow is detected The following actions can be set: - Display a warning Selecting the Trace memory overflow check box on the Exception Warning page of the Configuration properties dialog box, you can display a warning in the Status window and in a status bar balloon.
  • Page 205: Setting A Task Stack Area

    R0E530640MCU00 User’s Manual 5. Debugging Functions 5.14.9 Setting a Task Stack Area Follow the procedure described below to set a task stack area. (1) From the Hardware Break dialog box 1. Select the Exception check box on the Hardware Break sheet and then click the Detail button. Figure 5.146 Hardware Break dialog box 2.
  • Page 206 R0E530640MCU00 User’s Manual 3. The Violation of task stack access dialog box shown below will be displayed. To have the task stack ranges automatically set when a program is downloaded, select the check box labeled “Automatically set address areas at downloading.” Figure 5.148 Violation of task stack access dialog box 4.
  • Page 207 R0E530640MCU00 User’s Manual 5. Debugging Functions (2) From the Trace conditions dialog box 1. In the Trace Mode drop-down list of the Trace sheet, select Fill around TP. Select the Exception check box and then click the Detail button. Figure 5.150 Trace conditions dialog box REJ10J1733-0100 Rev.1.00 Apr.
  • Page 208: Detecting An Os Dispatch

    R0E530640MCU00 User’s Manual 2. The Exception page shown below will appear. Click the Detail button to the right of the Task stack access violation check box. Figure 5.151 Trace conditions dialog box 3. The Violation of task stack access dialog box will be displayed. The rest is the same as you opened it from the Hardware Break dialog box.
  • Page 209: Using The Start/Stop Function

    R0E530640MCU00 User’s Manual 5.15 Using the Start/Stop Function The emulator executes the specified routine of the user program immediately before starting and immediately after halting program execution. This function is used to control the user system in synchronization with execution and halting of the user program.
  • Page 210: Limitations To The Statements Written In A Specified Routine

    R0E530640MCU00 User’s Manual Table 5.44 Limitations to the registers and flags Register/flag Name Limitations ISP register When a specified routine has ended, the value of this register must be restored to one that it had when the specified routine started. U flag When a specified routine has ended, the value of this flag must always be set to 0.
  • Page 211: Troubleshooting (Action On Error)

    Figure 6.1 shows the flowchart to remedy the troubles from when power to the emulator is activated until the emulator debugger starts up. Check this while the user system is disconnected. For the latest FAQs, visit the Renesas Tools Homepage.
  • Page 212: Self-Check Error

    R0E530640MCU00 User’s Manual 6.2 Self-check Error When an error occurs in the self-check, check the following. (1) Recheck the connection of the E100 emulator main unit and MCU unit. (2) Redownload the proper firmware. (3) Check the self-check error log of the debugger software, and refer to the instruction described in it. (See Figure 6.2) Figure 6.2 Flowchart to check the self-check error Notes on the Self-check: Be sure to execute the self-check without connecting to a converter board and the user system.
  • Page 213: Error At Debugger Startup

    R0E530640MCU00 User’s Manual 6.3 Error at Debugger Startup (1) When the LEDs of the E100 Do Not Display Normally Table 6.1 Checkpoints of errors when the LEDs do not display normally Error SAFE LED remains lit. SAFE LED does not light up. Target Status POWER LED does not light up.
  • Page 214 R0E530640MCU00 User’s Manual (2) Configuration Properties Dialog Box Does Not Appear at Emulator Debugger Startup Table 6.2 Checkpoints of errors at debugger startup 1 Error Communication error occurred. Data was not sent to the target. (3) Errors Occur at Connecting Dialog Box Table 6.3 Checkpoints of errors at debugger startup 2 Error User system cannot be properly built.
  • Page 215: How To Request For Support

    After checking the items in "6. Troubleshooting (Action on Error)", fill in the text file which is downloaded from the following URL, then send the information to your local distributor. http://tool-support.renesas.com/eng/toolnews/registration/support.txt For prompt response, please specify the following information: (1) Operating environment...
  • Page 216: Hardware Specifications

    Operating voltage/frequency REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 216 of 229 Description M16C/60 Series M16C/64 Group MCUs with 512 KB ROM or less R5F650MNFG-EVA ROM size : 8KB+16KB+512KB, RAM size: 31KB Single-chip mode, memory expansion mode, microprocessor mode 1. Internal flash ROM: 536 KB...
  • Page 217: Differences Between The Actual Mcu And Emulator

    R0E530640MCU00 User’s Manual 7.2 Differences between the Actual MCU and Emulator Differences between the actual MCU and emulator are shown below. When debugging the MCU using this product, be careful about the following precautions. Note on Differences between the Actual MCU and Emulator: Operations of the emulator system differ from those of actual MCUs as listed below.
  • Page 218: Connection Diagram

    R0E530640MCU00 User’s Manual 7.3 Connection Diagram 7.3.1 Connection Diagram for the R0E530640MCU00 Figure 7.1 shows a connection diagram of the R0E530640MCU00. This connection diagram mainly shows the circuit to be connected to the user system. The circuits not connected to the user system such as the emulator’s control system are omitted. Table 7.2 shows IC electric characteristics of this product for reference purpose.
  • Page 219: External Dimensions

    R0E530640MCU00 User’s Manual 7. Hardware Specifications 7.4 External Dimensions 7.4.1 External Dimensions of the E100 Emulator Figure 7.2 shows external dimensions of the E100 emulator. D: 184mm H: 132mm W: 73mm Figure 7.2 External dimensions of the E100 emulator REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 219 of 229...
  • Page 220: External Dimensions Of The Converter Board R0E0100Tnpfj00

    R0E530640MCU00 User’s Manual 7.4.2 External Dimensions of the Converter Board R0E0100TNPFJ00 Figure 7.3 shows external dimensions and a sample foot pattern of the converter board R0E0100TNPFJ00 for a 100-pin 0.65mm pitch QFP. 42.00 R0E0100TNPFJ00 REV.B MADE IN JAPAN Figure 7.3 External dimensions and a sample foot pattern of the R0E0100TNPFJ00 REJ10J1733-0100 Rev.1.00 Apr.
  • Page 221: External Dimensions Of The Converter Board R0E0100Tnpfk00

    R0E530640MCU00 User’s Manual 7.4.3 External Dimensions of the Converter Board R0E0100TNPFK00 Figure 7.4 shows external dimensions and a sample foot pattern of the converter board R0E0100TNPFK00 for a 100-pin 0.5mm pitch LQFP. 37.00 R0E0100TNPFK00 REV.A MADE IN JAPAN Figure 7.4 External dimensions and a sample foot pattern of the R0E0100TNPFK00 REJ10J1733-0100 Rev.1.00 Apr.
  • Page 222: Notes On Using This Product

    R0E530640MCU00 User’s Manual 7.5 Notes on Using This Product Notes on using this product are listed below. When debugging the MCU using the emulator, be careful about the following precautions. Note on the Version of the Emulator Debugger: Be sure to use this product with the following emulator debugger. - M16C R8C E100 Emulator debugger V.1.00 Release 00 or later Notes on Downloading Firmware: Before using this product for the first time, it is necessary to download the dedicated firmware (emulator’s...
  • Page 223 R0E530640MCU00 User’s Manual Note on Clock Supply to the MCU: A clock supplied to the evaluation MCU is selected by the Emulator tab in the Init dialog box of the emulator debugger. (1) When "Emulator" is selected: A clock generated by the oscillator circuit board on the MCU unit is supplied. It is continually supplied regardless of the status of the user system clock and that of the user program execution.
  • Page 224 R0E530640MCU00 User’s Manual Notes on Power Supply to the User System: Pins Vcc1 and Vcc2 are connected to the user system to observe the voltage. Therefore, the power is not supplied to the user system from the emulator. Design your system so that the user system is powered separately.
  • Page 225 R0E530640MCU00 User’s Manual Memory Space Expansion Function (4Mbyte mode): When using the memory space expansion function (4Mbyte mode), a memory that the evaluation MCU accesses is different depending on each setting. Refer to the tables below. Access area of the evaluation MCU when using the memory space expansion function (4Mbyte mode) Processor mode PM13 Memory Expansion...
  • Page 226: Maintenance And Guarantee

    R0E530640MCU00 User’s Manual 8. Maintenance and Guarantee This chapter describes how to perform maintenance, warranty information, repair provisions and the procedures for requesting a repair. 8.1 User Registration When you purchase our product, be sure to register as a user. For user registration, refer to “User Registration” (page 14) of this user's manual.
  • Page 227: How To Make Request For Repair

    R0E530640MCU00 User’s Manual (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. (4) Transportation fees at sending your product for repair Please send your product to us for repair at your expense.
  • Page 228 R0E530640MCU00 Publication Date: Apr. 01, 2008 Sales Strategic Planning Div. Published by: Renesas Technology Corp. Microcomputer Tool Development Department Edited by: Renesas Solutions Corp. © 2008. Renesas Technology Corp. and Renesas Solutions Corp., All rights reserved. Printed in Japan. Rev.1.00...
  • Page 229 R0E530640MCU00 User’s Manual...

This manual is also suitable for:

R0e530640mcu00

Table of Contents