IAR C-SPY Hardware Debugger Systems User Guide for Renesas PC7501 Emulator and Compact Emulator CSPC7501R-3 CSPC7501R-3
COPYRIGHT NOTICE Copyright © 1995–2010 IAR Systems AB. No part of this document may be reproduced without the prior written consent of IAR Systems AB. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. DISCLAIMER The information in this document is subject to change without notice and does not represent a commitment on any part of IAR Systems.
Contents Preface .................................................................................................................................... v Who should read this guide ...........................................................................v How to use this guide .........................................................................................v What this guide contains ................................................................................vi Other documentation .............
Using breakpoints .............................................................................................. 17 Breakpoint Usage dialog box .....................................................................
Preface Welcome to the IAR C-SPY Hardware Debugger Systems User Guide for Renesas PC7501 Emulator and Compact Emulator. The purpose of this guide is to provide you with detailed reference information that can help you use the features in the IAR C-SPY® Hardware Debugger Systems.
What this guide contains Note that additional features may have been added to the software after the IAR C-SPY Hardware Debugger Systems User Guide was produced. The release notes contain the latest information. What this guide contains Below is a brief outline and summary of the chapters in this guide. ● ● ● Introduction to C-SPY hardware debugger systems introduces you to the available C-SPY hardware debugger systems to be used with the target board.
Preface Document conventions This book uses the following typographic conventions: Style Used for computer Filename or text that you type or that appears on the screen. parameter A label representing the actual value you should type as part of a command. bold Names of menus, menu commands, buttons, and dialog boxes that appear on the screen. reference A cross-reference within this guide or to another guide. Identifies instructions specific to the IAR Embedded Workbench IDE interface.
Document conventions IAR C-SPY Hardware Debugger Systems viii User Guide CSPC7501R-2:1
Introduction to C-SPY hardware debugger systems This guide introduces you to the IAR C-SPY hardware debugger systems and to how they differ from the IAR C-SPY Simulator. This guide assumes that you already have some working knowledge of the target system you are using, as well as some working knowledge of the IAR C-SPY Debugger. For a quick introduction, see the tutorials in the IAR Embedded Workbench® IDE User Guide.
The emulator drivers DIFFERENCES BETWEEN THE C-SPY SYSTEMS The following table summarizes the key differences between the C-SPY target systems: Feature Simulator Data breakpoints x Code breakpoint (OP-fetch) x Execution in real time Simulated interrupts x x x x x x x1 x1 x Data coverage x Profiling x Trace x x2 Execution time counter Code coverage Compact Emulator x Real interrupts Cycle counter PC7501 Emulator x3 x x x Table 2: Differences between available debug support fo
Introduction to C-SPY hardware debugger systems boxes—to the functions provided by the target system, for instance, control of the available hardware breakpoints. Host computer C-SPY Debugger C-SPY driver LAN or USB connection On-chip emulation CPU Memory Emulator Figure 1: Communication overview GETTING STARTED WITH THE EMULATOR This section demonstrates how to get started with the IAR C-SPY Emulator. The application is built and downloaded to the target system, and then executed.
The emulator drivers 3 Choose Project>Make to compile and link the source code. 4 Start C-SPY by clicking the Debug button or by choosing Project>Debug. The Hardware Setup dialog box appears. Press OK; C-SPY will download the application to the target system. 5 To open the Terminal I/O window, choose View>Terminal I/O. 6 Choose Debug>Go or click the Go button to start the execution. 7 Click the Stop button to stop the execution or wait until program exit is reached.
Setting up C-SPY hardware debugger systems This chapter describes the generic options and settings for the drivers. Generic options for hardware debugging Before you start the C-SPY debugger you must set up the generic options for the debugger system. Choose Project>Options to open the Options dialog box. SETUP OPTIONS On the Setup page, select the appropriate driver.
Generic options for hardware debugging For information about the settings Setup macros, Run to, and Device description file, as well as for information about the Plugins page, see the IAR Embedded Workbench® IDE User Guide. To set the driver-specific options, select the appropriate driver from the Category list. When you have set all the required options, click OK in the Options dialog box. See Using the emulator, page 9 for details about these options.
Setting up C-SPY hardware debugger systems EXTRA OPTIONS The Extra Options page provides you with a command line interface to the C-SPY debugger. Figure 4: Extra Options page for C-SPY command line options Use command line options Additional command line arguments (not supported by the IAR Embedded Workbench IDE) for the C-SPY debugger can be specified here. IMAGES On the Images page you can specify additional debug files to be downloaded.
Generic options for hardware debugging Use Extra Images Use the text boxes to specify additional images that you want to be downloaded: Path Specifies the debug file to be downloaded. A browse button is available for your convenience. Suppress download Downloads only debug information, and not the complete debug file. If you want to download more than three images, use the related C-SPY macro described in the IAR Embedded Workbench® IDE User Guide.
Using the emulator This chapter describes the driver-specific options and settings needed for using the C-SPY PC7501 or Compact Emulator debugger system. The chapter also describes how to use the debugger. The application can be run in real time when using these features, which provides a powerful tool for locating problems in the application or the hardware. Note: Not all options and features apply to your particular combination of emulator debugger and microcontroller.
Setting up the debugger system USB Use this option if an emulator is connected to your host computer via a USB cable. If more than one emulator is connected, choose which one to use with the Serial No option. LAN Use this option to debug using a PC7501 Emulator on the same local area network that your host computer is connected to. The emulator must first be assigned a TCP/IP address with the Emulator>TCP/IP Setup command, see Emulator menu, page 11.
Using the emulator Emulator menu The Emulator menu appears when you run any of the C-SPY emulator drivers. Figure 8: The Emulator menu Menu command Description Hardware Setup Displays the Hardware Setup dialog box, in which the basic configuration for the emulator is done. Download Firmware Opens a dialog box for selecting a firmware file to download to the target board. TCP/IP Setup Opens a dialog box where you can assign a TCP/IP address to the emulator.
Emulator menu HARDWARE SETUP In the Hardware Setup dialog box—available from the Emulator menu—you can configure the emulator debugger. Figure 9: Emulator Hardware Setup dialog box Processor mode/Bus width Use the Processor mode/Bus width options to specify the processor mode. You can choose between: ● ● ● ● ● Single-chip mode Memory expansion mode, 8-bit bus Memory expansion mode, 16-bit bus Microprocessor mode, 8-bit bus Microprocessor mode, 16-bit bus.
Using the emulator ● 4 Mbytes. PM13 (enable FLASH > 192K & RAM > 16K) To extend the internal reserved memory area, select this option to set the control bit (PM13, bit 3 at 000005H) to 1. By default, the internal reserved area expansion bit is set to 0. When this option is selected, flash memory larger than 192 Kbytes and RAM larger than 16 Kbytes can be used. PM10 (enable data FLASH) Select this option to set the CS2 area select bit (PM10, bit 0 at 000005H) to 1.
Emulator menu Disable internal FLASH ROM Select this option to prevent your application to be downloaded into the microcontroller unit’s internal FLASH ROM. You might have to use this option if the internal FLASH ROM cannot be rewritten. This is the case, for instance, when you are using the MCU in low power mode; typically at a clock frequency below 10,000 kHz. By default, this option is not selected.
Using the emulator EDIT MEMORY MAP DIALOG BOX In the Edit Memory Map dialog box—available from the Hardware Setup dialog box—you can specify emulation memory areas. Figure 10: Edit Memory Map dialog box Memory range Use these settings to define the emulation memory areas: Type The memory type; see Table 4, Available memory types in the emulator. Start address The start address for the memory area, in hexadecimal notation. End address The end address for the memory area, in hexadecimal notation.
Emulator menu DOWNLOAD FIRMWARE If you need to download new firmware, for example if you are changing the processor configuration or if you need to upgrade the firmware, choose the Emulator>Download Firmware command. The emulator firmware files have the filename extension .s and are located in subdirectories of the target_processor\config\Renesas\ directory of your product installation. TCP/IP SETUP Opens a dialog box where you can assign a TCP/IP address to the PC7501 Emulator.
Using the emulator TRACE The Trace window—available from the Emulator menu—displays a recorded sequence of executed machine instructions. In addition, the window can display trace data for expressions. For more information, see the IAR Embedded Workbench® IDE User Guide. Using breakpoints This section describes issues related to using breakpoints in the C-SPY hardware debugger systems.
Using breakpoints IAR C-SPY Hardware Debugger Systems 18 User Guide CSPC7501R-2:1