REJ10J1733-0100(T) R0E530640MCU00 User’s Manual E100 Emulator MCU Unit for M16C/64 Group Rev.1.00 Apr.
Notes regarding these materials 1. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use. Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document. 2.
R0E530640MCU00 User’s Manual Preface Preface The R0E530640MCU00 is a full-spec emulator for M16C/60 Series M16C/64 Group MCUs. This user's manual mainly describes specifications of the R0E530640MCU00 and how to setup it. For details on the emulator debugger included in this product, refer to the product's user's manual. 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.
R0E530640MCU00 User’s manual Important Important Before using this product, be sure to read this user’s manual carefully. Keep this user’s manual, and refer to it when you have questions about this product. Emulator: The emulator in this document refers to the following products that are manufactured by Renesas Technology Corp.
R0E530640MCU00 User’s manual Important 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.
R0E530640MCU00 User’s Manual Precautions for safety 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. Be sure to read this chapter before using this product.
R0E530640MCU00 User’s Manual Precautions for safety WARNING Warnings for AC Power Supply: z 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. z Use an AC power cable which complies with the safety standard of the country. z Do not touch the plug of the AC power cable when your hands are wet. This may cause electric shock.
R0E530640MCU00 User’s Manual Precautions for safety CAUTION Cautions to Be Taken for Turning On the Power: z Turn ON/OFF the power of the emulator and user system as simultaneously as possible. z When turning on the power again after shutting off the power, wait about 10 seconds. Cautions to Be Taken for Handling This Product: z Use caution when handling the main unit. Be careful not to apply a mechanical shock.
R0E530640MCU00 User’s Manual Contents Contents Page Preface..........................................................................................................................................................................3 Important.......................................................................................................................................................................4 Precautions for Safety ..............................................................................
R0E530640MCU00 User’s Manual Contents 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 ....
R0E530640MCU00 User’s Manual 5.5 Contents 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 5.6 Using Software Breakpoints......................................................
R0E530640MCU00 User’s Manual Contents 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 ..................
R0E530640MCU00 User’s Manual Contents 6. Troubleshooting (Action on Error).........................................................................................................................211 6.1 Flowchart to Remedy the Troubles .............................................................................................................211 6.2 Self-check Error...........................................................................................................................................
R0E530640MCU00 User’s Manual User Registration User Registration Customer Registration Sheet is included with this manual, fill it in and FAX or email it to your local distributor. If you register it by email, you can use a text format for user registration created when installing the software in the following folder. Your registered information is used for only after-sale services, and not for any other purposes.
R0E530640MCU00 User’s Manual Terminology Terminology Some specific words used in this user's manual are defined as follows: MCU unit R0E530640MCU00 This means the E100 emulator for M16C/64 Group. Emulator system This means an emulator system built around the MCU unit R0E530640MCU00. The emulator system is configured with an emulator main unit R0E001000EMU00, MCU unit R0E530640MCU00, emulator power supply, USB cable, emulator debugger and host machine.
R0E530640MCU00 User’s Manual 1. Outline 1. Outline This chapter describes the package components, the system configuration, the specifications of the emulator functions and the operating environment. 1.1 Package Components The R0E530640MCU00 package consists of the following items. When unpacking it, check to see if your R0E530640MCU00 contains all of these items. Table 1.
R0E530640MCU00 User’s Manual 1. Outline 1.3 System Configuration 1.3.1 System Configuration Figure 1.1 shows a configuration of the emulator system. (4) USB interface (1) MCU unit R0E530640MCU00 (2) Flexible cable (7) Pitch converter board for connecting to the user system (5) AC adapter power supply for the emulator (6) Host machine (3) E100 emulator main unit (8) User system Figure 1.
R0E530640MCU00 User’s Manual 1. Outline 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 (4) External trigger connector (1) Power switch (2) USB cable connector (3) Power connector (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. (2) USB cable connector This is a connector to connect the USB cable of the emulator.
R0E530640MCU00 User’s Manual 1. Outline (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 POWER SAFE Status ON OFF ON Flashing Flashing (every 2 seconds) OFF Meaning Emulator system power supply is turned ON. Emulator system power supply is turned OFF. Emulator system is operating normally.
R0E530640MCU00 User’s Manual 1. Outline 1.4 Specifications Table 1.5 lists the specifications of the R0E530640MCU00. Table 1.5 Specifications of the R0E530640MCU00 Applicable MCU M16C/60 Series M16C/64 Group MCUs with 512 KB ROM Applicable MCU mode Single-chip mode, memory expansion mode, microprocessor mode Maximum ROM/RAM capacity 1. Internal flash ROM: 8KB+16KB+512KB 0E000h--0FFFFh, 10000h--13FFFh, 80000h--FFFFFh 2. Internal RAM: 31KB 00400h--07FFFh Maximum operating frequency Power supply voltage: 2.
R0E530640MCU00 User’s Manual 1. Outline 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 Description 5 to 35°C (no dew) -10 to 60°C (no dew) Table 1.7 Operating environment of the host machine Item Host machine OS CPU Interface Memory Pointing device such as mouse Description IBM PC/AT compatibles Windows XP [*1] Windows 2000 Pentium IV 1.
R0E530640MCU00 User’s Manual 2. Setup 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. Troubleshooting (Action on Error)” (page 211). 1 2 3 4 5 6 7 8 Check the package components.
R0E530640MCU00 User’s Manual 2. Setup Change the settings of the power supply to MCUs or clock supply, according to the use condition. 14 Change the settings. 15 ▼ Connect the user system. ▼ Connect the user system as occasion demands. 16 Turn on the power supply. Turn ON the power to the emulator and the user system as simultaneously as possible. ▼ 17 Check the LED display of the emulator. Check that system status LEDs, and POWER and RESET of the target status LED are lighting.
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. Install the software following a displayed message. A dialog for entering the user information (user, company, address, install destination) will appear.
R0E530640MCU00 User’s Manual 2. Setup 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 R0 E5 30 65 0M CU 00 Insert the MCU unit following the inside rails of the main unit. E100 emulator main unit R0E001000EMU00 Push the MCU unit down to check it is attached properly.
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 Page 26 of 229 Apr.
R0E530640MCU00 User’s Manual 2. Setup 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) (2) (3) (4) Turn OFF the emulator. Connect the DC cable of the AC adapter to the emulator. Connect the AC power cable to the AC adapter. Connect the AC power cable to the outlet. Figure 2.
R0E530640MCU00 User’s Manual 2. Setup 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. - When the SAFE LED of the system LEDs is flashing, check that the USB cable is connected to the host machine.
R0E530640MCU00 User’s Manual 2. Setup 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. (1) If the user system is connected, disconnect the converter board and the user system. (2) Turn on the emulator.
R0E530640MCU00 User’s Manual 2. Setup 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.
R0E530640MCU00 User’s Manual 2. Setup 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). EPSON TOYOCOM SG-8002DC/DB Series (power voltage 2.7--3.
R0E530640MCU00 User’s Manual 2. Setup 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 XIN. And pin XOUT should be open. Choose "User" in the emulator debugger to use this clock. Figure 2.8 External oscillator circuit Make note that in the oscillator circuit shown in Figure 2.
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.65mm pitch R0E0100TNPFJ00 100-pin QFP 0.5mm pitch R0E0100TNPFK00 100-pin LQFP Figure 2.10 Connecting this product to the user system CAUTION Note on Connecting the User System: z Take care not to attach a converter board in a wrong direction. It may cause a fatal damage to the emulator and user system. REJ10J1733-0100 Rev.1.
R0E530640MCU00 User’s Manual 2. Setup 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. (2) Attach the YQPACK100RB included with the R0E0100TNPFJ00 to the NQPACK100RB and secure it with the YQGUIDEs.
R0E530640MCU00 User’s Manual 2. Setup 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. (2) Attach the YQPACK100SD included with the R0E0100TNPFK00 to the NQPACK100SD-ND and secure it with the YQGUIDEs.
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. The following outlines the processing performed by the tutorial program.
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.
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. Choose Download from Tutorial.x30 of Download modules. Figure 3.
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. The Editor window initially shows the beginning of a program.
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. Figure 3.
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. The program will be executed continuously until a breakpoint is reached.
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 open the Target sheet in it and check. . When the Status window is displayed, Figure 3.6 Status window CAUTION The contents displayed in this window differ with each product. For details about the displayed contents of each product, refer to Chapter 3, “Debugging,” or online help. 3.
R0E530640MCU00 User’s Manual 3. Tutorial 3.8 Altering Register Contents Choose CPU −> Registers from the View menu or click the Registers toolbar button displayed. . The Register window shown below will be Figure 3.8 Register window The content of any register can be altered. Double-click the line for the register you want to alter. The dialog box shown below will be displayed, so enter a new value with which you want to alter the register. Figure 3.9 Set value dialog box (PC) REJ10J1733-0100 Rev.1.
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. Use this window to look at the symbol information included in a module. Figure 3.10 Label window REJ10J1733-0100 Rev.1.00 Apr.
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 −> Memory from the View menu or click the Memory toolbar button box. Enter “_main” in the edit box of the Display Address dialog box. Figure 3.
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’ that is declared at the beginning of a program. Click the left-hand side of the array ‘a’ displayed in the Editor window and place the cursor there.
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.
R0E530640MCU00 User’s Manual 3. Tutorial 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 −> Local from the View menu or click the Locals toolbar button to display the Locals window.
R0E530640MCU00 User’s Manual 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. REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 49 of 229 3.
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’ displayed in the Watch window will be sorted in ascending order.
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. Figure 3.23 Step Over button Figure 3.
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. Figure 3.26 Halt button REJ10J1733-0100 Rev.1.00 Apr.
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. For example, you can set an instruction fetch event at a place where the sort function is called.
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.
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. Choose Code −> Trace from the View menu or click the Trace toolbar button The Trace window shown below will be displayed. Figure 3.
R0E530640MCU00 User’s Manual 3. Tutorial 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. The Trace conditions dialog box shown below will be displayed.
R0E530640MCU00 User’s Manual 3. Tutorial (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. Figure 3.31 Trace window (free trace) (4) A mixed display of bus, disassemble and/or source display is possible.
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.
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. (2) Choose Fill around TP for trace mode in the Trace conditions dialog box.
R0E530640MCU00 User’s Manual 3. Tutorial (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. Thus, the debugger will start acquiring trace information from when the main function is executed. Figure 3.35 Trace conditions dialog box (OR page) (4) Choose Reset Go from the Debug menu.
R0E530640MCU00 User’s Manual 3. Tutorial 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. The Trace conditions dialog box will be displayed. Switch the trace mode to Fill until stop and click the Apply button. Then click the Close button.
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. Function name (start address of function) <− function caller address Example: _main (0F82DC) <- 0F8AB5 Figure 3.
R0E530640MCU00 User’s Manual 3. Tutorial 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.
R0E530640MCU00 User’s Manual (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. (2) The filter can be used when the selected trace mode is Fill until stop, Fill until full or Fill around TP. REJ10J1733-0100 Rev.1.
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. Figure 3.43 Editor window (setting a software breakpoint) Choose Reset Go from the Debug menu. REJ10J1733-0100 Rev.1.00 Apr.
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. Clear the software breakpoint that you have set in a line of the sort function by double-clicking at its corresponding row in the S/W Breakpoints column again. 3.
R0E530640MCU00 User’s Manual 4. Preparing to Debug 4. Preparing to Debug 4.1 Starting the High-performance Embedded Workshop Follow the procedure described below to start the High-performance Embedded Workshop. (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.
R0E530640MCU00 User’s Manual 4. Preparing to Debug 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. Follow the procedure described below to create a new workspace.
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. (4) Set a configuration name.
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 Highperformance Embedded Workshop. (5) After starting the High-performance Embedded Workshop, connect the E100 Emulator. 4.3 Creating a New Workspace (Toolchain Used) Follow the procedure described below to create a new workspace.
R0E530640MCU00 User’s Manual Workspace Name: Project Name: Directory: CPU family: Toolchain: 4. Preparing to Debug Enter a workspace name here. Enter a project name here. If the same name as a workspace name is good, you do not need to enter it. 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. Select the CPU family of the MCU you are using. To use a toolchain, select the appropriate toolchain here.
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. When you have finished setting configuration names, emulator-related settings are completed. Click the Finish button, and the Summary dialog box will be displayed.
R0E530640MCU00 User’s Manual 4. Preparing to Debug 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. Figure 4.11 Open Workspace dialog box Specify the directory in which workspaces are created, select a workspace file (extension “.
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. When you are finished filling in the Debug Settings dialog box, the emulator will be connected.
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. 4.7 Quitting the High-performance Embedded Workshop Choosing Exit from the File menu lets you close the High-performance Embedded Workshop itself.
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.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 5. Debugging Functions The E100 Emulator supports the functions listed in the table below. Table 5.1 List of Debug Functions Item No.
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.
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. Figure 5.1 Device setting dialog box (Device page) The target MCU you have set here cannot be changed after the emulator is connected. To change the target MCU, you need to disconnect the emulator and connect it again.
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. When using the user program with PM13 set to 1, select this check box.
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. These settings can only be changed at startup. Figure 5.
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.
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. You cannot change it on this page. The Memory map page does not appear when single-chip mode has been selected.
R0E530640MCU00 User’s Manual 5.1.5 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5.1.6 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5.1.8 5. Debugging Functions 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. Figure 5.
R0E530640MCU00 User’s Manual (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. REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 88 of 229 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. (3) Event column This column shows the following: Table 5.
R0E530640MCU00 User’s Manual 5.2.3 5. Debugging Functions 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. Deselect the check box of the column you want to turn off. Click the OK button, and the new column settings you have set will take effect. 5.2.
R0E530640MCU00 User’s Manual 5.2.5 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. (4) Obj code column Shows object codes. (5) Label Shows a label.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Figure 5.13 Status window The Status window has the following four sheets. Table 5.
R0E530640MCU00 User’s Manual 5.4.2 5. Debugging Functions 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.
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. The extended monitor function only monitors the signals output from the user system or MCU, and does not affect execution of the user program.
R0E530640MCU00 User’s Manual 5.5.2 5. Debugging Functions 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. REJ10J1733-0100 Rev.1.00 Apr.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. If multiple software breakpoints are set, the program breaks at any one of those breakpoints reached.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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.
R0E530640MCU00 User’s Manual 5.6.3 5. Debugging Functions 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. Place the cursor at the line where a software breakpoint exists and then select Enable/Disable Breakpoint from the context menu. Or press the Ctrl and F9 keys together. Figure 5.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. These 16 points can be located at any desired positions. The events you have created can be registered for reuse at a later time.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. Figure 5.25 Event dialog box 3. An event will be added at the specified position. Figure 5.26 Hardware Break dialog box 4.
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. Then click the OK button. Figure 5.28 Event dialog box REJ10J1733-0100 Rev.1.00 Apr.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. You can set a hardware breakpoint based on a fetch to that address as a condition.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Figure 5.31 Hardware Break dialog box [When adding a trace point] 1.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. => Data access condition At this time, the size of the variable is automatically set to be a condition of a data access event.
R0E530640MCU00 User’s Manual 5.7.3 5. Debugging Functions 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). The selected event will be removed from the event setting area. Figure 5.33 Hardware Break dialog box 2.
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. To delete all events, click the Delete All button. Figure 5.35 Registered Events dialog box REJ10J1733-0100 Rev.1.00 Apr.
R0E530640MCU00 User’s Manual 5.7.4 5. Debugging Functions 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. Display the Comments page of the Event dialog box and select the “Add this event to the list” check box.
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. The events you create here are added to the Registered Events. Figure 5.
R0E530640MCU00 User’s Manual 5.7.5 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5.7.6 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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” is unselected). Figure 5.44 Hardware Break dialog box Table 5.
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 Task stack access violation OS dispatch (5) Specifying a delay value The program breaks a specified number of cycles after a breakpoint is encountered.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions The following items of information are displayed. (This applies for bus display.) Table 5.13 Display items Column Description 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions Task ID (when RTOS is used). Example display: A task ID (task entry label) is displayed like 1 (_Task1). TID 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. EXT Shows the signal fed in from the external trigger cable, indicated as “1” when the signal is high or “0” when the signal is low.
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.
R0E530640MCU00 User’s Manual 5.9.4 5. Debugging Functions Setting Trace Modes (1) Setting trace modes Following five trace modes are available. Table 5.14 Trace modes 1 2 3 Stop mode Fill until stop Fill until full Fill around TP 4 Repeat fill until stop 5 Repeat fill until full Description Trace acquisition continues until the program stops running. Trace acquisition stops when the trace memory is filled. Trace acquisition stops a specified number of cycles after a trace point is encountered.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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 - - Capture/Do not Capture condition setting Possible Step execution recording Possible 2.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Table 5.
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. However, if a maximum of 16 points is exceeded when you have reenabled for an event, the event is restored with its OR condition check box unselected (disabled). Figure 5.51 Trace conditions dialog box Table 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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.
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 OS dispatch (5) Specifying a delay value The program breaks a specified number of cycles delayed after a trace point is encountered.
R0E530640MCU00 User’s Manual 5.9.6 5. Debugging Functions 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. (1) Capture/Do not Capture conditions There are following types of conditions. Table 5.
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.
R0E530640MCU00 User’s Manual 5.9.7 5. Debugging Functions 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. By default, the Event number is selected.
R0E530640MCU00 User’s Manual 5.9.8 5. Debugging Functions 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. (1) Bus Display Mode In the context menu, select Display Modes -> BUS.
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. Figure 5.59 Source Display screen (4) Mixed Display Mode This display mode provides a mixed display of bus, disassemble or source display.
R0E530640MCU00 User’s Manual 5.9.9 5. Debugging Functions 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.
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.
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. Figure 5.63 Find dialog box Select the conditions you want to search for in the Combination column and select the check boxes.
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. The search history contains a history of up to 10 last searches performed.
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.
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. An upper pane of the window will be displayed. (Initially, this window is blank.
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.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions The contents displayed in this window are listed below. Table 5.23 Columns and contents Column Description No 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. Indicated as Enable when measurement conditions are set in the Performance Analysis Condition Conditions dialog box. Otherwise, indicated as Disable.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. [Between two events] Figure 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Figure 5.71 Performance Analysis Conditions dialog box 5.10.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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 Description 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. Up to two instances of the Code Coverage window can be opened at the same time. 5.11.
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. Contiguous blocks or noncontiguous blocks, either one, can be set.
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. However, data is not updated for the areas that have no coverage memory allocated.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 5. Debugging Functions The lower area shows detail information of the address range selected in the upper area. (Assembler level) Table 5.
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.
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. Figure 5.80 Code Coverage window 2. In the Edit Address Range dialog box that is displayed, change the address range. Figure 5.
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. 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. Figure 5.
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. Figure 5.84 Delete Address Range dialog box 3. The address range you have selected will be removed. Figure 5.85 Code Coverage window REJ10J1733-0100 Rev.1.00 Apr.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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 userspecified 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. However, data is not updated for portions that have no coverage memory allocated.
R0E530640MCU00 User’s Manual 5. Debugging Functions The lower area shows detail information of the address range selected in the upper area. (Assembler level) Table 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Select a function you want to remove in the upper area of the Source sheet and while holding it selected, choose Delete Range from the context menu.
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. All functions included in the selected source file will be removed. Figure 5.92 Code Coverage window REJ10J1733-0100 Rev.1.00 Apr.
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. When the calculation is completed, coverage information is displayed in the upper area by a percentage value and a graph. Figure 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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 C0 Coverage -------------------------------------file1.cpp func1 40% ■■■■ file1.cpp func2 10% ■ file1.cpp func3 80% ■■■■■■■■ file1.cpp func4 70% ■■■■■■■ file2.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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% ■■■■■■■ file1.cpp func1 40% ■■■■ file1.cpp func2 10% ■ file2.cpp func3 90% ■■■■■■■■■ file2.cpp func2 60% ■■■■■■ file2.cpp func1 20% ■■ file3.cpp func2 30% ■■■ file3.cpp func3 10% ■ file3.
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. Click the OK button, and the specified range will be cleared.
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. Figure 5.96 Save Coverage Data dialog box Enter a file name in which you want the information to be saved. If a file extension is omitted, the extension “.cov” is automatically attached.
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. Only the files bearing the extension “.cov” can be loaded. If you enter any other file extension, an error message is output.
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.” (2) Add a coverage file for test A in merge mode. (3) Add a coverage file for test B in merge mode.
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. Figure 5.
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. Data coverage is the function to indicate “what kinds of accesses have been made” to the data area.
R0E530640MCU00 User’s Manual 5. Debugging Functions (1) Measurement method The Data Coverage window consists of three sheets. Table 5.34 Sheets of the Data Coverage window Sheet name Description 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. The respective sheets permit multiple ranges to be registered. The Task Stack sheet supports only automatic registration.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Table 5.
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. In the Add Address Ranges dialog box that is displayed, enter an address range. Figure 5.109 Add Address Range dialog box REJ10J1733-0100 Rev.1.00 Apr.
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. 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. Figure 5.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Figure 5.114 Data Coverage window 2. A dialog box prompting for your confirmation will be displayed. Choose to save or not save coverage data.
R0E530640MCU00 User’s Manual 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 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
R0E530640MCU00 User’s Manual 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. In the Add A Section dialog box that is displayed, enter a section name. Figure 5.119 Add A Section dialog box REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 179 of 229 5.
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. Select a section name you want to remove in the Section sheet and while holding it selected, choose Delete Range from the context menu. Figure 5.
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. The section name you have selected will be removed. Figure 5.123 Data Coverage window REJ10J1733-0100 Rev.1.00 Apr.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
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. 5.12.
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. Figure 5.126 Save Data dialog box Enter a file name in which you want the information to be saved. If a file extension is omitted, the extension “.cdv” is automatically attached.
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. Only the files bearing the extension “.cdv” can be loaded. If you enter any other file extension, an error message is output.
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.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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. The Realtime Profile Setting dialog box will be displayed.
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.
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. If a file extension is omitted, the extension “.rpf” is automatically attached.
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 Task ID Count Time Statistic Average Block number Task ID, entry address Number of times a task is called Cumulative time of task execution The time stamp is displayed in the form shown below. Hours:minutes:seconds.milliseconds.microseconds.
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.
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. If a file extension is omitted, the extension “.rpf” is automatically attached.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Table 5.43 Maximum measurement time No.
R0E530640MCU00 User’s Manual 5.14 5. Debugging Functions 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. Detection of a specified exception event can be set as a condition of a breakpoint or trace point.
R0E530640MCU00 User’s Manual 5. Debugging Functions (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.
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. The Exception page shown below will appear. Click the Detail button to the right of the Violation of access protection check box. Figure 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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.
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.
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. The Exception page shown below will appear. Click the Detail button to the right of the Violation of access protection check box. Figure 5.144 Trace conditions dialog box REJ10J1733-0100 Rev.1.00 Apr.
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” and output an error.
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.
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.
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. The Exception page shown below will appear. Click the Detail button to the right of the Task stack access violation check box. Figure 5.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. Click the Update button, and the task stack ranges will be automatically set. 5. To add a task stack range manually, click the Add button.
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.
R0E530640MCU00 User’s Manual 5. Debugging Functions 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. 5.14.10 Detecting an OS dispatch This function becomes valid when a load module including an OS is downloaded.
R0E530640MCU00 User’s Manual 5.15 5. Debugging Functions 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. 5.15.
R0E530640MCU00 User’s Manual 5. Debugging Functions Table 5.44 Limitations to the registers and flags Register/flag Name ISP register U flag I flag Limitations When a specified routine has ended, the value of this register must be restored to one that it had when the specified routine started. When a specified routine has ended, the value of this flag must always be set to 0. Interrupts are disabled while a specified routine is executed.
R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error) 6. Troubleshooting (Action on Error) 6.1 Flowchart to Remedy the Troubles 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. http://www.renesas.
R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error) 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) “Error occurred during the self-check test.” dialog is displayed. Click the OK button. Check the log in the self-check dialog.
R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error) 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. Connection to the user system - Checkpoint Check that the power cable is connected. See "2.4 Connecting the Host Machine" (page 26). - Recheck the connection between the E100 and this product. See “2.
R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error) (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. Checkpoint Check all emulator debugger settings and interface cable settings. See “4. Preparing to Debug” (page 67). (3) Errors Occur at Connecting Dialog Box Table 6.
R0E530640MCU00 User’s Manual 6. Troubleshooting (Action on Error) 6.4 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.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 7. Hardware Specifications This chapter describes specifications of this product. 7.1 Target MCU Specifications Table 7.1 lists the specifications of target MCUs which can be debugged with this product. Table 7.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 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. IMPORTANT Note on Differences between the Actual MCU and Emulator: z Operations of the emulator system differ from those of actual MCUs as listed below. (1) Reset condition Set the time for starting up (0.2 Vcc to 0.8 Vcc) 1 μs or less.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 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. Figure 7.1 Connection diagram Table 7.
R0E530640MCU00 User’s Manual 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 7.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 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 CN1 CN2 51 50 50 0.35 100 51 16.50 MADE IN JAPAN 0.65 13.8 17.2 Figure 7.3 External dimensions and a sample foot pattern of the R0E0100TNPFJ00 REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 220 of 229 23.2 1 19.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 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 CN1 CN2 51 50 50 0.25 100 51 16.50 MADE IN JAPAN 0.50 13.0 17.0 Figure 7.4 External dimensions and a sample foot pattern of the R0E0100TNPFK00 REJ10J1733-0100 Rev.1.00 Apr. 01, 2008 Page 221 of 229 17.0 1 13.
R0E530640MCU00 User’s Manual 7. Hardware Specifications 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. IMPORTANT Note on the Version of the Emulator Debugger: z Be sure to use this product with the following emulator debugger. - M16C R8C E100 Emulator debugger V.1.
R0E530640MCU00 User’s Manual 7. Hardware Specifications IMPORTANT Note on Clock Supply to the MCU: z 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.
R0E530640MCU00 User’s Manual 7. Hardware Specifications IMPORTANT Notes on Power Supply to the User System: z 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. z The voltage of the user system should be as follows. 2.7 V ≤ Vcc1 = Vcc2 ≤ 5.
R0E530640MCU00 User’s Manual 7. Hardware Specifications IMPORTANT Memory Space Expansion Function (4Mbyte mode): z 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.
R0E530640MCU00 User’s Manual 8. Maintenance and Guarantee 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. 8.
R0E530640MCU00 User’s Manual 8. Maintenance and Guarantee (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. 8.
E100 Emulator Main Unit for M16C/64 Group User’s Manual R0E530640MCU00 Publication Date: Apr. 01, 2008 Rev.1.00 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Microcomputer Tool Development Department Renesas Solutions Corp. © 2008. Renesas Technology Corp. and Renesas Solutions Corp., All rights reserved. Printed in Japan.
R0E530640MCU00 User’s Manual