• pecommon6.dll > User's Manual
  • User's Manual

    免费下载 下载该文档 文档格式:PDF   更新时间:2014-08-21   下载次数:0   点击次数:1
    User's Manual All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corporation without notice. Please review the latest information published by Renesas Electronics Corporation through various means, including the Renesas Electronics Corporation website (http://www.renesas.com). RX Family Simulator Debugger V.1.02 User's Manual Rev.1.00 Dec 2010 www.renesas.com Notice 1. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. Before purchasing or using any Renesas Electronics products listed herein, please confirm the latest product information with a Renesas Electronics sales office. Also, please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website. 2. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others. 3. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. 4. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. 5. When exporting the products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations. You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. 6. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. 7. Renesas Electronics products are classified according to the following three quality grades: "Standard", "High Quality", and "Specific". The recommended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below. You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application categorized as "Specific" without the prior written consent of Renesas Electronics. Further, you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as "Specific" or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics. The quality grade of each Renesas Electronics product is "Standard" unless otherwise expressly specified in a Renesas Electronics data sheets or data books, etc. "Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots. "High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti- crime systems; safety equipment; and medical equipment not specifically designed for life support. "Specific": Aircraft; aerospace equipment; submersible repeaters; nuclear reactor control systems; medical equipment or systems for life support (e.g. artificial life support devices or systems), surgical implantations, or healthcare intervention (e.g. excision, etc.), and any other applications or purposes that pose a direct threat to human life. 8. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges. 9. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 10. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations. 11. This document may not be reproduced or duplicated, in any form, in whole or in part, without prior written consent of Renesas Electronics. 12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries. (Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority- owned subsidiaries. (Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics. R20UT0445EJ0100 Rev. 1.00 Page i of vi Dec 08, 2010 Trademarks Microsoft, MS-DOS, Windows, and Windows Vista are registered trademarks of Microsoft Corporation. Visual SourceSafe is a trademark of Microsoft Corporation. IBM is a registered trademark of International Business Machines Corporation. All brand or product names used in this manual are trademarks or registered trademarks of their respective companies or organizations. R20UT0445EJ0100 Rev. 1.00 Page ii of vi Dec 08, 2010 About This Manual This manual describes debugger functions of the High-performance Embedded Workshop (HEW). This manual does not intend to explain how to write C/C++ or assembly language programs, how to use any particular operating system or how best to tailor code for the individual devices. These issues are left to the respective manuals. Document Conventions This manual uses the following typographic conventions: Table 1 Typographic Conventions Convention Meaning [Menu->Menu Option] Bold text with '->' is used to indicate menu options (for example, [File->Save As...]). FILENAME.C Uppercase names are used to indicate filenames. "enter this string" Used to indicate text that must be entered (excluding the "" quotes). Key + Key Used to indicate required key presses. For example, CTRL+N means press the CTRL key and then, whilst holding the CTRL key down, press the N key. (The "how to" symbol) When this symbol is used, it is always located in the left hand margin. It indicates that the text to its immediate right is describing "how to" do something. For inquiries about the contents of this document or product, email to your local distributor. Renesas Tools Homepage http://www.renesas.com/tools R20UT0445EJ0100 Rev. 1.00 Page iii of vi Dec 08, 2010 Table of Contents Section 1 Overview.1 Section 2 Simulator Debugger Functions 3 2.1 Features.3 2.2 Target User Program.4 2.3 Range 4 2.4 Memory Management.5 2.5 Instruction-Execution Reset Processing.5 2.6 Exception Processing.6 2.7 Endian 6 2.7.1 Endian of the CPU.6 2.7.2 Endian of the External Memory Area.6 2.8 Simulation of Peripheral Functions.7 2.8.1 Timer.7 2.8.2 Serial Communications Interface 8 2.8.3 Interrupt Controller 12 2.8.4 Clocks.14 2.8.5 Using Peripheral Functions 14 2.9 Trace 14 2.10 Standard I/O and File I/O Processing.15 2.11 Break Conditions 16 2.12 Floating-Point Data.18 2.13 Display of Function Call History.18 2.14 Performance Measurement 19 2.14.1 Profiler.19 2.14.2 Performance Analysis.19 2.15 Pseudo-Interrupts 19 2.16 Coverage 20 Section 3 Debugging.21 3.1 Creating the Workspace for Simulator Debugger.22 3.1.1 Selecting a Debugging Platform.22 3.1.2 Setting up a Workspace for the Simulator Debugger 22 3.2 Starting up the Simulator Debugger.24 3.3 Modifying the Simulator Debugger Settings 24 3.3.1 Setting the Endian and Frequency of CPU.24 3.3.2 Modifying the Simulator System.25 3.3.3 Modifying the Memory Map and Memory Resource Settings.28 3.3.4 Set Memory Map Dialog Box 29 3.3.5 Set Memory Resource Dialog Box.31 3.4 Simulating Peripheral Functions.31 3.4.1 Registering Peripheral Function Simulation Modules.32 3.4.2 Changing the Addresses of Peripheral Functions.33 3.4.3 Changing the Interrupt Source Information of Peripheral Functions 34 3.4.4 Memory Resources for Control Registers 35 3.4.5 Viewing the Names of Connected Peripheral Functions.35 3.4.6 Input to and Output from Virtual Ports 36 3.5 Operations for Memory.40 3.5.1 Regularly Updating Contents of the [Memory] Window.40 3.5.2 Viewing and Modifying the Settings for the I/O Area 40 3.6 Using the Simulator Debugger Breakpoints.40 3.6.1 Listing the Breakpoints 40 3.6.2 Setting a Breakpoint.42 R20UT0445EJ0100 Rev. 1.00 Page iv of vi Dec 08, 2010 3.6.3 Modifying Breakpoints.49 3.6.4 Enabling a Breakpoint.49 3.6.5 Disabling a Breakpoint.49 3.6.6 Deleting a Breakpoint.49 3.6.7 Deleting All Breakpoints.50 3.6.8 Viewing the Source Line for a Breakpoint.50 3.6.9 Closing Input or Output File 50 3.6.10 Closing All Input and Output Files 50 3.7 Viewing Trace Information.50 3.7.1 Opening the Trace Window 50 3.7.2 Specifying Trace Acquisition Conditions.50 3.7.3 Setting Events for Tracing.52 3.7.4 Acquiring Trace Information.53 3.7.5 Searching for Trace Information 57 3.7.6 Filtering Trace Information.58 3.7.7 Clearing the Trace Information 58 3.7.8 Saving the Trace Information in a File.59 3.7.9 Viewing the Source File.59 3.7.10 Switching Timestamp Display 59 3.7.11 Showing the History of Function Execution 60 3.8 Viewing the Profile Information.60 3.8.1 Stack Information Files 60 3.8.2 Loading Stack Information Files.62 3.8.3 Enabling the Profile.62 3.8.4 Specifying Measurement Mode.63 3.8.5 Executing the Program and Checking the Results.63 3.8.6 List Sheet.63 3.8.7 Tree Sheet.64 3.8.8 Profile-Chart Window.66 3.8.9 Types and Purposes of Displayed Data.67 3.8.10 Creating Profile Information Files.68 3.8.11 Notes 68 3.9 Analyzing Performance.69 3.9.1 Opening the Performance Analysis Window 69 3.9.2 Specifying a Target Function 69 3.9.3 Starting Performance Data Acquisition.70 3.9.4 Resetting Data 70 3.9.5 Deleting a Target Function.70 3.9.6 Deleting All Target Functions.70 3.9.7 Saving the Currently Displayed Contents 70 3.10 Measuring Code Coverage.71 3.10.1 Opening the Coverage Window 71 3.10.2 Acquiring All Coverage Information 73 3.10.3 Clearing All Coverage Information.73 3.10.4 Viewing the Source Window 73 3.10.5 Specifying the New Coverage Range.73 3.10.6 Changing the Coverage Range.73 3.10.7 Deleting the Selected Coverage Range 74 3.10.8 Acquiring Coverage Information 74 3.10.9 Clearing Coverage Information.74 3.10.10 Saving Coverage Information in a File.74 3.10.11 Loading Coverage Information from a File.75 3.10.12 Updating the Information 75 3.10.13 Confirmation Request Dialog Box.75 3.10.14 Save Coverage Data Dialog Box.76 3.10.15 Displaying the Coverage Information in the Editor Window.77 3.10.16 Displaying the Coverage Information in the [Disassembly] Window.78 R20UT0445EJ0100 Rev. 1.00 Page v of vi Dec 08, 2010 3.11 Generating a Pseudo-Interrupt Manually.79 3.11.1 [Trigger] Window 79 3.11.2 [GUI I/O] Window.81 3.12 Standard I/O and File I/O Processing.83 3.12.1 Opening the DebugConsole Window.83 3.12.2 Popup Menu Options.84 3.12.3 I/O Functions.85 3.13 Creating a Virtual I/O Panel.87 3.13.1 Opening the [GUI I/O] Window.87 3.13.2 Creating a Button 88 3.13.3 Creating a Label 89 3.13.4 Creating an LED.91 3.13.5 Creating Fixed Text.93 3.13.6 Changing the Size and Position of an Item.94 3.13.7 Copying an Item.94 3.13.8 Deleting an Item.95 3.13.9 Showing the Grid 95 3.13.10 Saving I/O Panel Information.95 3.13.11 Loading I/O Panel Information 95 Section 4 Windows 97 Section 5 Command Lines.99 5.1 Commands (Functional Order)99 5.1.1 Execution.99 5.1.2 Download 99 5.1.3 Register 100 5.1.4 Memory.100 5.1.5 Assemble/Disassemble.100 5.1.6 Break 101 5.1.7 Trace.101 5.1.8 Coverage 101 5.1.9 Performance 102 5.1.10 Watch 102 5.1.11 Script/Logging.102 5.1.12 Memory Resource 102 5.1.13 Simulator Debugger Settings.103 5.1.14 Standard I/O and File I/O 103 5.1.15 Utility 103 5.1.16 Project/Workspace 104 5.1.17 Test Tool Facility 104 5.1.18 Debugging Functions for the Realtime OS.104 5.1.19 File Input and Output through Virtual Ports.105 5.2 Commands (Alphabetical Order)106 Section 6 Messages.111 6.1 Information Messages.111 6.2 Error Messages.112 Section 7 Tutorial.115 7.1 Preparation.115 7.1.1 Sample Program.115 7.1.2 Creating the Sample Program.115 7.2 Settings for Debugging 115 7.2.1 Allocating the Memory Resource.115 7.2.2 Downloading the Sample Program.116 7.2.3 Displaying the Source Program.118 R20UT0445EJ0100 Rev. 1.00 Page vi of vi Dec 08, 2010 7.2.4 Setting a PC Breakpoint 119 7.2.5 Setting the Profiler 119 7.2.6 Setting the Simulated I/O 120 7.2.7 Setting the Trace Information Acquisition Conditions.121 7.2.8 Setting the Stack Pointer and Program Counter 122 7.3 Start Debugging 122 7.3.1 Executing a Program.122 7.3.2 Using the Trace Buffer.126 7.3.3 Performing Trace Search.127 7.3.4 Checking Simulated I/O.128 7.3.5 Checking the Breakpoints 129 7.3.6 Watching Variables.129 7.3.7 Executing the Program in Single Steps 130 7.3.8 Checking Profile Information.134 RX Family Simulator Debugger V.1.02 Section 1 Overview R20UT0445EJ0100 Rev. 1.00 Page 1 of 136 Dec 24, 2010 Section 1 Overview The simulator debugger is a powerful development environment tool for embedded applications to run on Renesas Electronics microcomputers. The simulator debugger is used with the High-performance Embedded Workshop (HEW). The HEW provides a graphical user interface that eases the development and debugging of applications written in the C/C++ programming languages or assembly language for Renesas Electronics microcomputers. Its aim is to provide a powerful yet intuitive way of accessing, observing and modifying the debugging platform on which the application is running. READ the simulator debugger and HEW help information before using the simulator debugger. RX Family Simulator Debugger V.1.02 Section 1 Overview R20UT0445EJ0100 Rev. 1.00 Page 2 of 136 Dec 24, 2010 RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 3 of 136 Dec 24, 2010 Section 2 Simulator Debugger Functions This section describes the functions of the RX family simulator debugger. 2.1 Features ? Since the simulator debugger runs on a host computer, software debugging can start without using an actual user system, thus reducing overall system development time. ? The simulator debugger performs a simulation to calculate the number of instruction execution cycles for a program and time taken by instruction execution, thus enabling performance evaluation without using an actual user system. ? The simulator debugger provides pseudo-interrupt and I/O-simulation functions for simple system-level simulation. ? The simulator debugger offers the following functions that enable efficient program testing and debugging. ? The ability to handle all of the RX family CPUs ? Functions to stop or continue execution when an error occurs during user program execution ? Profile data acquisition and function-unit performance measurement ? A comprehensive set of break functions ? Functions to set or edit memory maps ? Functions to display function call history ? Coverage information is displayed in the C/C++ or assembly-source level ? Visual debugging functions provided through the display of images or waveforms ? The breakpoints, memory map, performance, and trace can be set through the dialog boxes under Windows ? . Environments corresponding to each memory map of the RX family microcomputers can be set through the dialog box. ? Intuitive user interface ? Online help ? Common display and operability RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 4 of 136 Dec 24, 2010 2.2 Target User Program Load modules in the Elf/Dwarf2 format can be symbolically debugged with the simulator debugger. Load modules in other formats can be downloaded, and their instructions can be executed; however, they cannot be symbolically debugged. For details, refer to the High-performance Embedded Workshop User's Manual. 2.3 Range The simulator debugger provides simulation functions for the RX600 series and RX200 series microcomputers. The simulator debugger supports the following RX600 series and RX200 series microcomputer functions: ? All CPU instructions ? Exception processing ? Registers ? All address space The simulator debugger does not support the following RX600 series and RX200 series MCU functions. Programs that use these functions must be debugged with the RX600 series or RX200 series emulator. Item Remarks Low power state Simulation is stopped on the execution of a WAIT instruction. Non-maskable interrupt (NMI) Reception of an interrupt during execution of any of the following instructions: (RMPA, SCMPU, SMOVF, SMOVB, SMOVU, SSTR, SUNTIL, SWHILE) The interrupt is accepted when execution of the instruction is completed. Values in memory and registers that become undefined after the execution of instructions Lower-order 16 bits of the accumulator (ACC) RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 5 of 136 Dec 24, 2010 2.4 Memory Management Memory Map Specification: A memory map is used to calculate the number of memory access cycles during simulation. The following items can be specified: ? Memory type ? Start and end addresses of the memory area ? Number of memory access cycles ? Memory data bus width ? Endian On the memory map, the endian is only specifiable for the external area. For the internal ROM area and internal RAM area, the [Endian] specified on the [CPU Configuration] tabbed page of the [Set Simulator] dialog box (displayed when the simulator debugger is started up) applies. For details, refer to section 3.3.3, Modifying the Memory Map and Memory Resource Settings. Memory Resource Specification: A memory resource must be specified to load and execute a user program. The following items can be specified: ? Start address ? End address ? Access type The access type is readable/writable, read-only, or write-only. Since an error occurs if the user program attempts an illegal access (for example, trying to write to read-only memory), such an illegal access in the user program can be easily detected. For details on memory resource setting, refer to section 3.3.3, Modifying the Memory Map and Memory Resource Settings. 2.5 Instruction-Execution Reset Processing Counting by the simulator debugger of executed instructions, cycles for instruction execution, and time taken by instruction execution is reset in the following cases. ? The program counter (PC) is modified after the instruction simulation stops and before it restarts. ? The Run command to which the execution start address has been specified is executed. ? Initialization is performed or the program is loaded. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 6 of 136 Dec 24, 2010 2.6 Exception Processing The simulator debugger detects the generation of exceptions in the RX family and simulates exception processing. Accordingly, simulation can be performed even when an exception occurs. The simulator debugger simulates exception processing with the following procedures. 1. Detects an exception during instruction execution. 2. The PC and PSW are saved in the dedicated registers (for the fast interrupt) or the stack area (for exceptions other than the fast interrupt). If an error occurs when saving, the simulator debugger stops exception processing, shows that the exception processing error has occurred, and returns to the command input wait state. 3. Bits of the PSW are set as follows. U = 0, I = 0, PM = 0 4. Reads the start address from the vector address corresponding to the vector number. If an error occurs when reading, the simulator debugger stops exception processing, shows that the exception processing error has occurred, and returns to the command input wait state. 5. Starts instruction execution from the start address. Specifying [Execution Mode] in the [Simulator System] dialog box causes the simulator debugger to stop the simulation of exception processing after step 4. For details, refer to section 3.3.2, Modifying the Simulator System. 2.7 Endian 2.7.1 Endian of the CPU The endian of the CPU can be specified in the [CPU Configuration] tabbed page in the [Set Simulator] dialog box, which is displayed at initiation of the simulator debugger. The endian of the CPU are applied to the internal ROM and the internal RAM. For details, refer to section 3.3.1, Setting the Endian and Frequency of CPU. 2.7.2 Endian of the External Memory Area The endian of the external memory area can be set in the [Set Memory Map] dialog box. For details, refer to section 3.3.4, Set Memory Map Dialog Box. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 7 of 136 Dec 24, 2010 2.8 Simulation of Peripheral Functions 2.8.1 Timer (1) Supported Range The RX600 series and RX200 series simulator debugger supports a total of four compare match timer (CMT) channels, i.e. two CMT units (unit 0 and unit 1), each with two 16-bit timers. (2) Control Registers Table 2.1 lists the control registers of the CMT that are supported by the simulator debugger. In access to control registers, ensure that the unit of access is the same as the size of the register. Table 2.1 Control Registers of the CMT Supported by the Simulator Debugger Peripheral Module Unit Supported Control Register Support CMSTR0 { CMCR0 { CMCNT0 { CMCOR0 { CMCR1 { CMCNT1 { CMT Unit 0 CMCOR1 { CMSTR1 { CMCR2 { CMCNT2 { CMCOR2 { CMCR3 { Unit 1 CMCNT3 { CMCOR3 { Note: {: Supported The addresses of the control registers can be referred to or modified in the [Peripheral Module Configuration] dialog box. Refer to section 3.4, Simulating Peripheral Functions, for details on this dialog box. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 8 of 136 Dec 24, 2010 2.8.2 Serial Communications Interface (1) Supported Range The RX600 series simulator debugger supports a total of seven serial communications interface (SCI) channels that correspond to the RX610 group. Table 2.2 lists the supported SCI functions. Table 2.2 SCI Functions Supported by the Simulator Debugger Item Support Asynchronous or clock synchronous { Serial communications mode Smart card interface ? PCLK clock { Clock sources for the on- chip baud rate generator PCLK/4, PCLK/16, and PCLK/64 ? Full-duplex communications { Interrupt sources Transmit-end, transmit-data-empty, receive-data-full, and receive error { Data length 7 or 8 bits { Transmission stop bit 1 or 2 bits { Parity Even, odd, or none { Receive error detection Parity, overrun, and framing errors { Break detection ? Internal clock { Asynchronous mode Clock source External clock or transfer rate clock input from TMR ? Clock synchronous mode Data length 8 bits { Receive error detection Overrun errors { Note: {: Supported ?: Not supported (2) Control Registers Table 2.3 shows control registers of the SCI supported by the simulator debugger. In access to control registers, ensure that the unit of access is the same as the size of the register. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 9 of 136 Dec 24, 2010 Table 2.3 Control Registers of the SCI Supported by the Simulator Debugger Peripheral Module Channel Supported Control Register Support SMR Δ BRR { SCR Δ TDR { SSR Δ RDR { SCI 0 to 6 SCMR Δ SEMR Δ Note: {: Supported Δ: Partly supported (bits for the function described in section 2.8.2 (1), Supported Range) The addresses of the control registers can be referred to or modified in the [Peripheral Module Configuration] dialog box. Refer to section 3.4, Simulating Peripheral Functions, for details on this dialog box. (3) Input and Output of Data For the simulator debugger, some pins are allocated to memory as virtual ports. Programs being debugged and debuggers are only able to access those pins through the virtual ports. Table 2.4 lists the addresses of virtual ports for the SCI. Table 2.4 Addresses of Virtual Ports for the SCI Channel Virtual Port Name Address Access Unit Description RxD0 H'00088224 16 Channel 0 receive data 0 TxD0 H'00088226 16 Channel 0 transmit data RxD1 H'00088228 16 Channel 1 receive data 1 TxD1 H'0008822A 16 Channel 1 transmit data RxD2 H'0008822C 16 Channel 2 receive data 2 TxD2 H'0008822E 16 Channel 2 transmit data RxD3 H'00088230 16 Channel 3 receive data 3 TxD3 H'00088232 16 Channel 3 transmit data RxD4 H'00088234 16 Channel 4 receive data 4 TxD4 H'00088236 16 Channel 4 transmit data RxD5 H'00088238 16 Channel 5 receive data 5 TxD5 H'0008823A 16 Channel 5 transmit data 6 RxD6 H'0008823C 16 Channel 6 receive data TxD6 H'0008823E 16 Channel 6 transmit data Tables 2.5 and 2.6 show the configurations of virtual ports RxD and TxD, respectively. Table 2.7 lists the functions of the bits in RxD and TxD. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 10 of 136 Dec 24, 2010 Table 2.5 Configuration of RxD Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 SB PE FE D7 D6 D5 D4 D3 D2 D1 D0 Table 2.6 Configuration of TxD Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 SB D7 D6 D5 D4 D3 D2 D1 D0 Table 2.7 Bits in RxD and TxD Bit Bit Name Initial Value R/W Description 0 D0 0 R/W 1 D1 0 R/W 2 D2 0 R/W 3 D3 0 R/W 4 D4 0 R/W 5 D5 0 R/W 6 D6 0 R/W 7 D7 0 R/W Data Bits D7 to D0 are used for reception or transmission of 8-bit data. D6 to D0 are used for reception or transmission of 7-bit data. 12 to 8 - All 0 - Reserved These bits are always read as 0. The write value should always be 0. 13 FE 0 R/W Framing Error Bit The SCI detects a framing error if this bit included in a frame is 1. 14 PE 0 R/W Parity Error Bit The SCI detects a parity error if this bit included in a frame is 1. 15 SB 1 R/W Start Bit The value of this bit changes from 1 to 0 when transmission starts and from 0 to 1 when transmission ends. Reception and transmission of data that are visible in the simulator debugger are abstract: all data are transmitted and received at the same time. Figures 2.1 and 2.2 respectively show the reception and transmission of data in the simulator debugger. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 11 of 136 Dec 24, 2010 RxD.SB(virtual port) RxD.Dn (virtual port) RSRregister RDRregister Received data Received data Received data WhenRxD.SBis set to1, the SCI transfers data in RSRto RDR. Note: RxD.SBis not used in clock synchronous mode. When RxD.SBis set to 0, the SCI transfers received data to RSR. Figure 2.1 Reception of Data in the Simulator Debugger TDRregister TSRregister TxD.Dn (virtual port) TxD.SB(virtual port) Writing to TDRcauses the SCI to transfer the data to TxD.Dn and set TxD.SBto 0. When the data transfer is completed, the SCI sets TxD.SBto 1. Note: The time taken for transmission of one frame differs with the selected mode. Asynchronous mode: (Time taken for transmission of one bit) * (start bit + data size [7,8] + parity bit [0,1] + stop bit [1,2]) Clock synchronous mode: (Time taken for transmission of one bit) * (data size [8]) Time taken for transmission of one frame Transmit data Transmit data Transmit data Figure 2.2 Transmission of Data in the Simulator Debugger The simulator debugger allows input to and output from files through virtual ports. For details, refer to section 3.4.6, Input to and Output from Files through Virtual Ports. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 12 of 136 Dec 24, 2010 2.8.3 Interrupt Controller (1) Supported Range The RX600 series simulator debugger supports the interrupt controller unit (ICU) that is related to the CMT and SCI. The RX200 series simulator debugger supports the ICU that is related to the CMT. The ICU can convey interrupts to the CPU but cannot activate the DTC or DMAC. (2) Control Registers Table 2.8 shows control registers of the ICU that are supported by the simulator debugger. In access to control registers, ensure that the unit of access is the same as the size of the register. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 13 of 136 Dec 24, 2010 Table 2.8 Control Registers of the ICU Supported by the Simulator Debugger Peripheral Module Supported Control Register Support IRn (n = 028 to 029) { IRn (n = 214 to 241)* 1 { ISELR028* 2 Δ ISELR029* 2 Δ ISELR030* 2 Δ ISELR031* 2 Δ ISELR215* 2 Δ ISELR216* 2 Δ ICU ISELR219* 2 Δ ISELR220* 2 Δ ISELR223* 2 Δ ISELR224* 2 Δ ISELR227* 2 Δ ISELR228* 2 Δ ISELR231* 2 Δ ISELR232* 2 Δ ISELR235* 2 Δ ISELR236* 2 Δ ISELR239* 2 Δ ISELR240* 2 Δ IER03 Δ IER1A* 1 Δ IER1B* 1 { IER1C* 1 { IER1D* 1 { IER1E* 1 Δ IPRm (m = 04 to 07) { IPRm (m = 80 to 86)* 1 { FIR { Notes: {: Supported Δ: Partly supported (bits for the function described in section 2.8.3 (1), Supported Range) 1: These registers are only supported for products of the RX600 series. 2: These registers are only supported for products of the RX610 group. The addresses of the control registers, the interrupt vector numbers, and the position of the priority register can be referred to or modified in the [Peripheral Module Configuration] dialog box. Refer to section 3.4, Simulating Peripheral Functions, for details on this dialog box. (3) Note on Using the ICU To select whether an interrupt should cause a break in execution, use the [Simulator System] dialog box or EXEC_STOP_SET command. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 14 of 136 Dec 24, 2010 2.8.4 Clocks The simulator debugger supports a system clock that provides timing in access to memory, a peripheral function clock, and clocks for operating the timers. The numbers of cycles of the internal clock required for access to memory correspond to the specifications for the memory map. Set the frequency ratio of the system clock to the peripheral function clock in the [Set Peripheral Function Simulation] dialog box. Use the timer control register to specify the division ratio to create the clock for operating the timers. 2.8.5 Using Peripheral Functions To use a peripheral function, the corresponding module must be registered in the [Set Peripheral Function Simulation] dialog box, which is opened on initiation of the simulator debugger. For details on the module registration, refer to section 3.4, Simulating Peripheral Functions. 2.9 Trace The simulator debugger writes the execution results of each instruction into the trace buffer. The conditions for trace information acquisition can be specified in the [Trace Acquisition] dialog box. Right-clicking on the [Trace] window displays the pop-up menu. Choose [Acquisition...] from the pop-up menu to display the [Trace Acquisition] dialog box. The acquired trace information is displayed in the [Trace] window. The trace information can be searched. The search conditions can be specified in the [Find] dialog box. Right-clicking on the [Trace] window displays the pop-up menu. Choose [Find -> Find…] from the pop-up menu to display the [Find] dialog box. For details, refer to section 3.7, Viewing Trace Information. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 15 of 136 Dec 24, 2010 2.10 Standard I/O and File I/O Processing The simulator debugger enables the standard I/O and file I/O processing to be executed by the user program. When the I/O processing is executed, the [DebugConsole] window must be open. Table 2.9 shows the supported I/O functions. Table 2.9 I/O Functions No. Function Code Function Name Description 1 H'21 GETC Inputs one byte from the standard input 2 H'22 PUTC Outputs one byte to the standard output 3 H'23 GETS Inputs one line from the standard input 4 H'24 PUTS Outputs one line to the standard output 5 H'25 FOPEN Opens a file 6 H'06 FCLOSE Closes a file 7 H'27 FGETC Inputs one byte from a file 8 H'28 FPUTC Outputs one byte to a file 9 H'29 FGETS Inputs one line from a file 10 H'2A FPUTS Outputs one line to a file 11 H'0B FEOF Checks for end of the file 12 H'0C FSEEK Moves the file pointer 13 H'0D FTELL Returns the current position of the file pointer For details on I/O functions, refer to section 3.12, Standard I/O and File I/O Processing. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 16 of 136 Dec 24, 2010 2.11 Break Conditions The simulator debugger provides the following conditions for interrupting the simulation of a user program during execution. ? Break due to the satisfaction of a break command condition ? Break due to the detection of an error during execution of the user program ? Break due to a trace buffer overflow ? Break due to execution of the WAIT instruction ? Break due to the [STOP] button Break Due to Satisfaction of a Break Command Condition: There are nine break commands as follows: ? BREAKPOINT: Break based on the address of the instruction executed ? BREAK_ACCESS: Break based on access to a memory range ? BREAK_CYCLE: Break based on the instruction execution cycles ? BREAK_DATA: Break based on the value of data written to memory ? BREAK_DATA_DIFFERENCE: Break based on a difference between values in memory ? BREAK_DATA_INVERSE: Break based on sign inversion of a value in memory ? BREAK_DATA_RANGE: Break based on the range of values in memory ? BREAK_REGISTER: Break based on the value of data written to a register ? BREAK_SEQUENCE: Break based on a specified execution sequence If [Stop] is specified as the action to take when a break condition is satisfied, user program execution stops when the break condition is satisfied. For details, refer to section 3.6, Using the Simulator Debugger Breakpoints. When a break condition is satisfied and user program execution stops, the instruction at the breakpoint may or may not be executed before a break depending on the type of break, as listed in table 2.10. Table 2.10 Processing When a Break Condition is Satisfied Command Instruction When a Break Condition is Satisfied BREAKPOINT Not executed BREAK_ACCESS Executed BREAK_CYCLE Executed BREAK_DATA Executed BREAK_DATA_DIFFERENCE Executed BREAK_DATA_INVERSE Executed BREAK_DATA_RANGE Executed BREAK_REGISTER Executed BREAK_SEQUENCE Not executed For BREAKPOINT and BREAK_SEQUENCE, if a breakpoint is specified at an address that is not the beginning of an instruction, the break will not be detected. When a break condition is satisfied during user program execution, a break condition satisfaction message is displayed in the [Output] window and the execution stops. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 17 of 136 Dec 24, 2010 Break Due to Error Detection during User Program Execution: The simulator debugger detects simulation errors, that is, program errors that cannot be detected by the CPU exception generation functions. The [Simulator System] dialog box specifies whether to stop or continue the simulation when such an error occurs. Table 2.11 lists the error messages, error causes, and the action of the simulator debugger in the continuation mode. Table 2.11 Simulation Errors Error Message Error Cause Processing in Continuation Mode Access to a memory area that has not been allocated Write to a memory area having the write-protected attribute Memory Access Error (ADDRESS: H'nnnnnnnn) Read from a memory area having the read disable attribute On memory write, nothing is written; on memory read, all bits are read as 1. Access to an area where memory data do not exist When a simulation error occurs in the stop mode, the simulator debugger returns to the command input wait state after stopping instruction execution and displaying the error message. Table 2.12 lists the states of the program counter (PC) at a simulation error stop. Also, after a stop due to a simulation error, the contents of the PSW are not changed. Table 2.12 Register States at Simulation Error Stop Error Message PC Value Memory Access Error ? When an instruction is read: The start address of the instruction that caused the error. ? When an instruction is executed: The instruction address following the instruction that caused the error. Use the following procedure when debugging programs that include instructions that generate simulation errors. 1. First execute the program in the stop mode and confirm that there are no errors except those in the intended locations. 2. After confirming the above, execute the program in the continuation mode. Note: If an error occurs in the stop mode and simulation is continued after changing the simulator debugger mode to the continuation mode, simulation may not be performed correctly. When restarting simulation, always restore the register contents and the memory contents to the state prior to the occurrence of the error. Break Due to a Trace Buffer Overflow: After the [Stop] mode is specified with [Trace Buffer Full Handling] in the [Trace Acquisition] dialog box, the simulator debugger stops execution when the trace buffer becomes full. The following message is displayed in the [Output] window when execution is stopped. Trace Buffer Full Break Due to Execution of a WAIT Instruction: Execution of a WAIT instruction causes execution by the simulator debugger to stop. The following message is displayed in the [Output] window. WAIT Instruction Note: When restarting execution, change the PC value to the instruction address at the restart location. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 18 of 136 Dec 24, 2010 Break Due to the [Stop] Button: Users can forcibly terminate execution by clicking the [HALT] button during instruction execution. The following message is displayed on the status bar when execution is stopped. Stop Execution can be resumed with the GO or STEP command. 2.12 Floating-Point Data Floating-point numbers can be used for the following real-number data, which makes floating-point data processing easier. The following data can be specified for floating-point data: ? Data when the break type is set to [Break Data] or [Break Register] in the [Select Break Type] dialog box ? Data in the [Memory] window ? Data in the [Fill Memory] dialog box ? Data in the [Search Memory] dialog box ? Input data in the [Register] dialog box The floating-point data format conforms to the ANSI C standard. In the simulator debugger, the round-to-nearest (RN) mode is applied as the rounding mode for floating-point decimal- to-binary conversion. If a denormalized number is specified for binary-to-decimal or decimal-to-binary conversion, it is left as a denormalized number in RN mode. If an overflow occurs during decimal-to-binary conversion, the infinity is returned in RN mode. 2.13 Display of Function Call History The simulator debugger displays the function call history in the [Stack Trace] window when simulation stops, which enables program execution flow to be checked easily. Selecting a function name in the [Stack Trace] window displays the corresponding source program in the [Editor] window. This allows the function that has called the current function to also be checked. The displayed function call history is updated in the following cases: ? When simulation stops due to the break conditions described in section 2.11, Break Conditions. ? When register values are modified while simulation stops due to the above break conditions. ? While single-step execution is performed. For details, refer to the High-performance Embedded Workshop User's Manual. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 19 of 136 Dec 24, 2010 2.14 Performance Measurement The simulator debugger has the profiler function and performance analysis function for performance measurement of the user program. 2.14.1 Profiler The profiler function displays the memory address and size allocated to functions and global variables, the number of function calls, and the profile data for the entire user program. The profile data to be displayed depends on the CPU. Profile information is displayed in list, tree, and chart formats. Profile information is useful in optimizing user programs by reducing the size and putting the most frequently called functions in-line. When using the profile information saved in a file, it is possible to optimize user programs based on dynamic information using the optimizing linkage editor. For details, refer to section 3.8, Viewing the Profile Information. 2.14.2 Performance Analysis The performance analysis function displays the number of execution cycles and function calls for the specified function in the user program. Since performance data for only the specified function is acquired, faster simulation is possible. For details, refer to section 3.9, Analyzing Performance. 2.15 Pseudo-Interrupts The simulator debugger can generate pseudo-interrupts during simulation in the following two ways: 1. Pseudo-interrupts generated by satisfaction of break conditions A pseudo-interrupt can be generated using a break command to specify [Interrupt] as the action when a break condition is satisfied. For details, refer to section 3.6, Using the Simulator Debugger Breakpoints. 2. Pseudo-interrupts generated from windows A pseudo-interrupt can be generated by clicking a button in the [Trigger] or [GUI I/O] window. For details, refer to section 3.11, Generating a Pseudo-Interrupt Manually. If another pseudo-interrupt occurs between a pseudo-interrupt occurrence and its acceptance, only the interrupt that has a higher priority can be accepted. 3. Break by pseudo-interrupts The user can select whether or not to cause a break when a pseudo-interrupt occurs. This can be set in the [Simulator System] dialog box or by the EXEC_STOP_SET command. Notes: 1. For a pseudo-interrupt, the vector number and priority level of the interrupt are specified. The priority level of an interrupt can be specified as a value from 0 to 8 or from 0 to H'10. The fast interrupt is specified by the value 8 when the range is from 0 to 8 and H'10 when the range is from 0 to H'10. If 0 is specified, the interrupt will not occur even if the condition is satisfied. 2. Operation of the interrupt controller is not simulated for pseudo-interrupts. Therefore, the interrupt status flag is not changed even if an interrupt occurs. RX Family Simulator Debugger V.1.02 Section 2 Simulator Debugger Functions R20UT0445EJ0100 Rev. 1.00 Page 20 of 136 Dec 24, 2010 2.16 Coverage The simulator debugger acquires instruction coverage information during instruction execution within the measurement range specified by the user. In the measurement range, addresses are directly specified, and all functions in a file whose name has been specified are set. The state of each instruction execution can be monitored through the instruction coverage information. In addition, this information can be used to determine which part of a program has not been executed. The [Coverage] window displays the acquired instruction coverage information. The instruction coverage information can be displayed in the [Editor] window by highlighting the column corresponding to the source line of the executed instruction. For the address range or function to be measured, the coverage statistical information is displayed in percentage. This gives the user a clear idea how much the program has been executed. The instruction coverage information can be saved in or loaded from a file. Only a file in the .COV format can be loaded. For details, refer to section 3.10, Measuring Code Coverage. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 21 of 136 Dec 24, 2010 Section 3 Debugging This section describes the simulator debugger operations and their related windows and dialog boxes. For details on the functions common to the HEW listed below, refer to the HEW help information. ? Preparations for Debugging ? Viewing a Program ? Operating Memory ? Displaying Memory Contents as Waveforms ? Displaying Memory Contents as an Image ? Modifying the Memory Contents ? Viewing the I/O Memory ? Looking at Registers ? Executing Your Program ? Viewing the Current Status ? Synchronizing Multiple Debugging Platforms ? Debugging with the Command Line Interface ? Elf/Dwarf2 Support ? Looking at Labels RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 22 of 136 Dec 24, 2010 3.1 Creating the Workspace for Simulator Debugger To use the simulator debugger, a workspace for the simulator debugger must be created. This section only describes the procedures specific to the simulator debugger. For details, refer to the High-performance Embedded Workshop user's manual. 3.1.1 Selecting a Debugging Platform When you create a new workspace, the dialog box shown below appears. Specify the debugging platform in step 8. Figure 3.1 Debugger Target Setting Display (8/10) [Targets] Sets the debugger targets. Select (by checking) the debugger targets. No selection or a selection of more than one target is possible. [Target type] Specifies the type of the targets displayed under [Targets]. [Target CPU] Specifies the type of the CPUs displayed under [Targets]. 3.1.2 Setting up a Workspace for the Simulator Debugger Set up the workspace for the simulator debugger in step 9/10. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 23 of 136 Dec 24, 2010 Figure 3.2 Debugger Option Setting Display (9/10) [Detail options] Sets the debugger target options. To modify an option, select [Item] and click [Modify]. If the selected item cannot be modified, [Modify] remains gray even when [Item] is selected. [Simulator I/O] Indicates whether simulation of standard I/O and file I/O by the user program is enabled ([Enable]) or disabled ([Disable]). Simulated I/O is enabled if [Using I/O Library] was selected in the window for setting up the generated file. [Simulator I/O addr.] Displays address for the above simulated I/O. [Bus mode] Currently not used by the simulator debugger. [Endian] Displays the endian of CPU. The endian specified on the screen for setting this option is reflected. [Patch] Indicates the priority levels in use for interrupts and whether the MVTIPL instruction is enabled or disabled. [Off] Available priority levels for interrupts are from 0 to 15. The MVTIPL instruction is enabled. [RX610] Available priority levels for interrupts are from 0 to 7. The MVTIPL instruction is disabled. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 24 of 136 Dec 24, 2010 Refer to the High-performance Embedded Workshop User's Manual for items other than those listed under [Detail options]. 3.2 Starting up the Simulator Debugger You can connect to the simulator debugger by selecting a session file in which simulator debugger settings have already been defined. When you have selected targets in the process of creating a project, the number of session files is the same as the number of selected targets. Select the session file that corresponds to the current target from the drop-down list shown in figure 3.3. Figure 3.3 Selecting a Session File If you have selected a session file with which the simulator debugger has been registered but the simulator debugger is disconnected, select [Debug -> Connect] or click on the [Connect] toolbar button . To disconnect the simulator debugger, on the other hand, select [Debug -> Disconnect] or click on the [Disconnect] toolbar button . 3.3 Modifying the Simulator Debugger Settings This section describes how to modify the simulator system after the simulator debugger is started. 3.3.1 Setting the Endian and Frequency of CPU The endian and operating frequency of CPU are set on the [CPU Configuration] tabbed page in the [Set Simulator] dialog box, which is displayed on initiation of the simulator debugger. Figure 3.4 Set Simulator Dialog Box (CPU Configuration) RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 25 of 136 Dec 24, 2010 The following items can be specified in this dialog box: [Endian] Endian of CPU. [Big] Big endian [Little] Little endian [System Clock (ICLK) Frequency] Operating frequency of the CPU (unit: MHz) Specifiable range: 1 to 1000 If you do not wish this dialog box to be opened when the simulator debugger is subsequently initiated, check [Don't show this dialog box]. 3.3.2 Modifying the Simulator System The [System] tab in the [Simulator System] dialog box is used to modify the location to start the simulated I/O and execution mode. Choose [Setup -> Simulator -> System...] or click the [Simulator System] toolbar button to open the [System] tab in this dialog box. Figure 3.5 Simulator System Dialog Box (System Tab) RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 26 of 136 Dec 24, 2010 The following items can be specified in this dialog box: [CPU] The current CPU. [Bit Size] Size of the address space (as the number of bits in addresses. [Endian] Endian of the CPU. [Priority Level of Interrupts] Priority levels of interrupts and whether the MVTIPL instruction is enabled or disabled. 0 to 7 (Disable MVTIPL instruction): Available priority levels for interrupts are from 0 to 7. 0 to 15 (Enable MVTIPL instruction): Available priority levels for interrupts are from 0 to 15. [Simulated I/O Address] Specifies the start address of a simulated I/O that performs standard input/output or file input/output processing from the user program. [Enable] Checking this box enables the simulated I/O. [Response] Specifies the window refresh timing; that is, how many instructions should be executed between refresh operations (D'1 to D'2,147,483,647. The default is D'40000). [Execution Mode] Specifies whether the simulator debugger stops or continues operation when a simulation error (including interrupts) occurs. [Stop] Stops simulation. It is also possible to specify this as the operation to follow specific exceptions in RX-family microcomputers by clicking on the [Detail…] button. [Continue] Continues simulation. [Cache the results of decoding instructions and accelerate simulation] Selects whether or not to save the results of decoding instructions at the time of their execution and reuse the results of decoding when instructions at the same addresses are reused. Selecting this box enables the caching facility for decoded instructions, making simulation faster. Clicking the [OK] or [Apply] button stores the modified settings. Clicking the [Cancel] button closes this dialog box without modifying the settings. Note: The caching facility for decoded instructions reuses results of decoding so is not applicable to programs that contain self-modifying code. Furthermore, errors in the form of an instruction being overwritten due to unexpected behavior of the program may not be correctly detected. Clicking on the [Detail] button when [Stop] is specified for [Execution Mode] opens the [Stoppage Setting] dialog box. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 27 of 136 Dec 24, 2010 Figure 3.6 [Stoppage Setting] Dialog Box In this dialog box, whether or not operation stops when an exception occurs is specified for individual exception events. Simulation will stop when an event for which the checkbox has been selected occurs. The following exception events are specifiable: ? Undefined instruction exception ? Privileged instruction exception ? Floating-point exceptions (only for RX600 series) ? Interrupts ? INT instruction ? BRK instruction RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 28 of 136 Dec 24, 2010 3.3.3 Modifying the Memory Map and Memory Resource Settings The [Memory] tab in the [Simulator System] dialog box is used to set and modify the memory map and memory resource. Figure 3.7 Simulator System Dialog Box (Memory Tab) The following items can be specified in this dialog box: [Memory Map] Displays the memory type, start and end addresses, data bus width, and the number of access cycles. [Memory Resource] Displays the access type and start and end addresses of the current memory resource. [Memory Map] can be added, modified, or deleted using the following buttons: Adds [Memory Map] items. Clicking this button opens the [Set Memory Map] dialog box (figure 3.7), and memory map items can be added. Modifies [Memory Map] items. Select an item to be modified in the list box and click this button. The [Set Memory Map] dialog box (figure 3.8) opens and memory map items can be modified. Deletes [Memory Map] items. Select an item to be deleted in the list box and click this button. [Memory Resource] can be added, modified, or deleted using the following buttons: Adds [Memory Resource] items. Clicking this button opens the [Set Memory Resource] dialog box, and memory resource items can be specified. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 29 of 136 Dec 24, 2010 Modifies [Memory Resource] items. Select an item to be modified in the list box and click this button. The [Set Memory Resource] dialog box opens and memory resource items can be modified. Deletes [Memory Resource] items. Select an item to be deleted in the list box and click this button. [Memory Resource] is the same setting information as that of [Memory Resource] of the [Debugger] sheet in the [RX Standard Toolchain] dialog box. Modifications are reflected on both items. [Memory Map] can be reset to the default value by the button. Clicking the [OK] or [Apply] button stores the modified settings. Clicking the [Cancel] button closes this dialog box without modifying the settings. When there is a linkage list file (.map) output by the optimizing linkage editor, the memory resource can be automatically allocated according to the memory map and linkage map information. For details, refer to Automatically Allocating the Memory Resource, in the High-performance Embedded Workshop User's Manual. 3.3.4 Set Memory Map Dialog Box The [Set Memory Map] dialog box specifies the memory map of the target CPU. The contents displayed in this dialog box depend on the target CPU. The values are used in simulation of memory access by the simulator debugger. Figure 3.8 Set Memory Map Dialog Box RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 30 of 136 Dec 24, 2010 The following items are specified: [Memory type] Memory type [ROM] Internal ROM [RAM] Internal RAM [EXT] External memory [IO] Internal I/O [Begin address] Start address of the memory corresponding the memory type [End address] End address of the memory corresponding to the memory type [Data bus size] Memory data bus width [Read state count] Number of cycles ("states") for read access to the specified type of memory [Write state count] Number of cycles ("states") for write access to the specified type of memory [Endian] Endian of the specified area of memory Clicking the [OK] button stores the settings. Clicking the [Cancel] button closes this dialog box without modifying the settings. Notes: 1. The memory map setting for the area allocated to a system memory resource cannot be deleted or modified. First delete the system memory resource allocation on the [Memory] tab of the [Simulator System] dialog box, then delete or modify the memory map setting. 2. The data bus size cannot be displayed or modified for any type of memory other than external memory. 3. The data bus size, read state count, and write state count do not affect to the instruction simulations. The number of states (cycles) for memory access is always 1. 4. The memory map must start and end on 16-byte boundaries. If any other setting is made, the map is adjusted to the closest 16-byte boundaries that include the set values. 5. It is not possible to view or modify the current endian for the internal I/O area. 6. The endian for the internal ROM and RAM areas is only modifiable through the [Set Simulator] dialog box. For details on the [Set Simulator] dialog box, refer to section 3.3.1, Setting the Endian and Frequency of CPU. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 31 of 136 Dec 24, 2010 3.3.5 Set Memory Resource Dialog Box The [Set Memory Resource] dialog box sets and modifies memory resources. Figure 3.9 Set Memory Resource Dialog Box The following items are specified: [Begin Address] Address where the memory area to be secured starts [End Address] Address where the memory area to be secured ends [Attribute] Access type [Read] Read only [Write] Write only [Read/Write] Readable/writable Click the [OK] button after specifying the [Begin Address], [End Address], and [Attribute]. Clicking the [Cancel] button closes this dialog box without modifying the settings. Notes: 1. If memory resources are set, memory in the host computer will be used. If the user allocates too much memory resources, operation of the host computer will be extremely slow. 2. The memory area must start and end on 16-byte boundaries. If any other setting is made, the area is adjusted to the closest 16-byte boundaries that include the set values. Furthermore, concerning the type of access, boundaries become 16 bytes. When using a resource with units smaller than 16 bytes, use the memory within an area in accord with the hardware manual. 3. Attempts by instructions to write to memory for which only reading is permitted or to read from memory for which only writing is permitted cause memory-access errors. 3.4 Simulating Peripheral Functions The simulator debugger is able to simulate peripheral functions by using DLL modules. This section describes how to register the peripheral function simulation modules to enable the simulation of individual peripheral functions, and how to set their configurations. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 32 of 136 Dec 24, 2010 3.4.1 Registering Peripheral Function Simulation Modules Peripheral function simulation modules can be registered in the [Peripheral Function Simulation] tabbed page of the [Set Simulator] dialog box, which is opened on initiation of the simulator debugger. Once a peripheral function simulation module has been registered in this dialog box, the simulated peripheral function provided by that simulation module becomes available. The registered settings cannot be modified after the simulator debugger has fully started up. To change the peripheral function simulation modules that are in use, restart the simulator debugger to bring up this dialog box. Figure 3.10 Set Simulator Dialog Box (Peripheral Function Simulation Tab) The following items are specified in this dialog box: [Peripheral Functions] Shows information on the peripheral function simulation modules. [Module Name] Names of peripheral functions to be simulated [File Name] Names of files holding peripheral function simulation modules Check the checkbox under [Module Name] to register the corresponding peripheral function simulation module and make it available. [Enable All] Enables all peripheral function simulation modules. [Disable All] Disables all peripheral function simulation modules. [Detail…] Opens the [Peripheral Module Configuration] dialog box, allowing you to view information on the corresponding peripheral function, and change the address where it starts and the interrupt-source information. [Peripheral Clock Rate] The ratio between the peripheral clock and the system clock (the number of cycles of the system clock corresponding to one cycle of the peripheral clock) is specified here. The clock rate setting can be selected as 1, 2, 3, 4, 6, 8, 12, 16, 24, or 32. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 33 of 136 Dec 24, 2010 Clicking the [OK] button makes the settings effective. Clicking the [Cancel] button closes this dialog box without storing the settings. If you do not wish this dialog box to be opened when the simulator debugger is subsequently initiated, check [Don't show this dialog box]. 3.4.2 Changing the Addresses of Peripheral Functions The addresses of peripheral functions can be changed on the [Peripheral Module Configuration] dialog box. The addresses of the peripheral functions which have interrupt source information can be changed on the [Address] tabbed page of the [Peripheral Module Configuration] dialog box. To open this dialog box, select a peripheral function in [Peripheral Functions] on the [Peripheral Function Simulation] tabbed page of the [Set Simulator] dialog box and then press the [Detail…] button. Figure 3.11 Peripheral Module Configuration Dialog Box (Address Tab) The following items can be set or displayed in this dialog box: [Module] Name of the peripheral function supported by the selected peripheral function simulation module [Start Address] Start address of the peripheral function selected in [Module] [Register Address] Names and addresses of registers of the peripheral function selected in [Module]. It is not possible to change the register addresses. Clicking the [OK] or [Set] button makes the settings effective. Clicking the [Cancel] button closes this dialog box without storing the settings. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 34 of 136 Dec 24, 2010 3.4.3 Changing the Interrupt Source Information of Peripheral Functions The interrupt source information of peripheral functions can be changed in the [Interrupt] tab of the [Peripheral Module Configuration] dialog box. To open this dialog box, select a peripheral function in [Peripheral Functions] on the [Peripheral Function Simulation] tabbed page of the [Set Simulator] dialog box and then press the [Detail…] button. Figure 3.12 Peripheral Module Configuration Dialog Box (Interrupt Tab) The following items can be displayed in this dialog box: Interrupt Source: Name of the interrupt source (or sources) supported by the peripheral function Vector Number: Interrupt vector number Priority Register Address/ Address of the interrupt priority register and positions of bits in Bit Field Position: the register To change the interrupt-source information, open the [Set Interrupt Source Information] dialog box by double-clicking on the line for the interrupt source to be changed. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 35 of 136 Dec 24, 2010 Figure 3.13 Set Interrupt Source Information Dialog Box The following items can be set or displayed in this dialog box: Interrupt Source: Interrupt source name Interrupt Vector Number: Interrupt vector number (when the prefix is omitted, values input are taken as decimal, and the display is in decimal notation) Priority Register Address: Address of the interrupt priority register Priority Register Size: Size of the interrupt priority register Priority Register Bit Position: Positions of bits in the interrupt priority register Clicking the [OK] button makes the settings effective. Clicking the [Cancel] button closes this dialog box without storing the settings. 3.4.4 Memory Resources for Control Registers The peripheral function simulation module secures memory resources in the control register area. Do not perform operations that lead to the deletion or alteration of memory resources for control registers after they have been allocated. For details on the setting of memory resources, refer to section 3.3.3, Modifying the Memory Map and Memory Resource Settings. 3.4.5 Viewing the Names of Connected Peripheral Functions After the simulator debugger has been initiated, [Peripheral Modules] on the [Platform] sheet of the [Status] window shows the names of the peripheral functions that are connected. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 36 of 136 Dec 24, 2010 3.4.6 Input to and Output from Virtual Ports For the simulator debugger, some pins are allocated to memory as virtual ports. These can be used for input to and output from files. For details on the virtual ports supported by the simulator debugger, refer to section 2.8.2 (3), Input and Output of Data. (1) Viewing the List of File Input and Output To view the list of file input and output that is currently defined, open the [Port I/O] tabbed page of the [Simulator System] dialog box that is displayed by selecting [Setup -> Simulator -> System…]. If no modules with virtual ports have been registered, the [Port I/O] tab does not appear. Figure 3.14 Simulator System Dialog Box (Port I/O Tab) RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 37 of 136 Dec 24, 2010 The following items are displayed in this dialog box: [Module]: Module name [Port]: Port name [File Name]: Filename [I/O]: Input or output [In]: File input [Out]: File output [Mode]: Mode of file input or output [Repeat]: Repeated input [Once]: Input only once [Overwrite]: Write output over existing files [Append]: Append output to existing files [Repeat Start]: Line number where repeated input starts [State]: Whether the file is open or closed [Open]: Open [Close]: Closed (2) Adding a File Right-click on the [Port I/O] tabbed page and select [Add] from the popup menu or double-click on an item in the list to open the [Set Port I/O] dialog box. Figure 3.15 Set Port I/O Dialog Box The following items can be set in this dialog box: RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 38 of 136 Dec 24, 2010 [Port select] [Module]: Select the module for the port that data are to be input to or output from. [Port]: Select the port name. [File setting] [File]: Specify the filename. If the filename extension is omitted, .csv is automatically appended. [I/O] [Input]: File input [Output]: File output [Input mode] [Repeat]: When the end of the file is reached, the input is repeated from the start. [Start Line]: Line number where repeated input starts (1 to 65535) [Once]: When the end of the file is reached, the input is ended. [Output mode] [Overwrite]: If an output file with the specified name already exists, that file is overwritten. [Append]: If an output file with the specified name already exists, output data are appended to the end of the file. Each port can be allocated to one file for input and one file for output. A single file can also be allocated to two or more input ports. (3) Opening a File To open a file, click on the line where the filename appears on the [Port I/O] tabbed page and select [Open] from the popup menu. (4) Opening All Files To open all files, right-click on the [Port I/O] tabbed page and select [Open All] from the popup menu. (5) Closing a File To close a file, click on the line where the filename appears on the [Port I/O] tabbed page and select [Close] from the popup menu. (6) Closing All Files To close all files, right-click on the [Port I/O] tabbed page and select [Close All] from the popup menu. (7) Modifying File Setting Click on the line where the filename appears and select [Edit] from the popup menu or simply double-click on the line to open the [Set Port I/O] dialog box, where the settings for the file can be modified. (8) Deleting a File To delete a file, click on the line where the filename appears on the [Port I/O] tabbed page and select [Delete] from the popup menu. RX Family Simulator Debugger V.1.02 Section 3 Debugging R20UT0445EJ0100 Rev. 1.00 Page 39 of 136 Dec 24, 2010 (9) Format for Virtual Port Files Virtual port files are in the CSV format. The input file format is as follows.
  • 下载地址 (推荐使用迅雷下载地址,速度快,支持断点续传)
  • 免费下载 PDF格式下载
  • 您可能感兴趣的
  • x3daudio16dll  xercesc26dll  x3daudio16dll下载  vba6dll  aclstl6dll  计算机丢失aclst6dll  winobj6dll  libstdc6dll  ac1st6dll  pecms6dll