ARM RMHost ® User Guide Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
ARM RMHost User Guide Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved. Release Information The following changes have been made to this document. Change history Date Issue Change December 2000 A First release Proprietary Notice Words and logos marked with ® or ™ are registered trademarks or trademarks owned by ARM Limited, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.
Contents User Guide Preface About this book ............................................................................................ -vi Feedback ..................................................................................................... -ix Chapter 1 Overview of RMHost 1.1 1.2 Chapter 2 Connecting to RMHost 2.1 2.2 Chapter 3 Procedure for connecting to RMHost using AXD ....................................... 2--2 AXD connection messages .................................................
Contents iv Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Preface This preface introduces the User Guide for ARM® RMHost. It contains the following sections: • About this book on page vi • Feedback on page ix. ARM DUI 0137A Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Preface About this book This book describes how to configure the RealMonitor host controller, RealMonitor.dll, and how to debug RealMonitor-enabled applications using RMHost. This book documents only the host-side functionality of RealMonitor. For complete details on the target-side functionality, and how to prepare an RealMonitor-enabled application, see the ARM RMTarget Integration Guide.
Preface italic Highlights special terminology, denotes internal cross-references, and citations. typewriter Denotes text that can be entered at the keyboard, such as commands, file and program names, and source code. typewriter Denotes a permitted abbreviation for a command or option. The underlined text can be entered instead of the full command or option name. typewriter italic Denotes arguments to commands and functions where the argument is to be replaced by a specific value.
Preface Other publications Please refer to the following publications for additional information: • E5903-97000, Trace Port Analysis for ARM ETM User’s Guide, Agilent, 1999. • E3459-97002, Emulation for the ARM7/ARM9 User’s Guide, Agilent, 1999. To access these documents, see the website www.agilent.com. viii Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Preface Feedback ARM Limited welcomes feedback on both RMHost, and its documentation. Feedback on RMHost If you have any problems with RMHost, please contact your supplier.
Preface x Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Chapter 1 Overview of RMHost This chapter introduces RMHost. It describes the host-side functionality of ARM RealMonitor, and how it is distinct from RMTarget. It also describes the system requirements for using RMHost. This chapter contains the following sections: • About RMHost on page 12 • RMHost requirements on page 14. ARM DUI 0137A Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Overview of RMHost 1.1 About RMHost RMHost is the host component of RealMonitor. It allows you to perform nonstop debugging on a RealMonitor-enabled application in a real-time environment. That is, when using RMHost, you can perform certain debugging operations on a foreground application while the processor continues to run (and service interrupts) in the background. The functionality of RMHost is contained in the RMHost controller, RealMonitor.
Overview of RMHost The RMHost controller converts RDI function calls into RealMonitor protocol packets, and uses the chosen JTAG unit to send these over the Debug Communications Channel (DCC) of the ARM processor. Additionally, RMHost uses the signals generated by the JTAG unit to control operation of RMTarget. For these reasons, the software that drives the JTAG unit must comply with RDI 1.5.1rt.
Overview of RMHost 1.2 RMHost requirements This section describes the requirements necessary to use RMHost. RMHost works with any application that has been integrated with RMTarget. For details on building RMTarget, and integrating it with an application or Real-Time Operating System (RTOS), see the ARM RMTarget Integration Guide. To run RMHost, your system must contain the following: RMHost package This is contained on the ARM RealMonitor CD-ROM.
Chapter 2 Connecting to RMHost This chapter describes the procedure for connecting to the debug target using AXD, including details on selecting and configuring the RMHost controller. It also describes the connection messages you receive in AXD when you connect to RMHost. This chapter contains the following sections: • Procedure for connecting to RMHost using AXD on page 22 • AXD connection messages on page 211. ARM DUI 0137A Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Connecting to RMHost 2.1 Procedure for connecting to RMHost using AXD This section describes the steps you must follow to connect to RMHost using AXD 1.1. If you are using another debugger, see its accompanying documentation for details on how to perform these steps using the method that is specific to your debugger. To debug a RealMonitor-enabled image, you must connect with RMHost while your program is executing.
Connecting to RMHost To use RMHost with a RealMonitor-enabled image: 1. Start AXD, and configure the target as follows: a. Select Configure Target from the Options menu. The Choose Target dialog box is displayed. b. Select a supported JTAG unit DLL, such as Multi-ICE.dll version 2.0, in the Choose Target window, as shown in Figure 2-1. If this is not present in the list, click Add, and find the required DLL. (If DLL files do not appear, use Windows Explorer to ensure that files of extension .
Connecting to RMHost Note If Load Image is disabled, you must stop the currently running application by selecting Stop from the Execute menu. The image might stop at main() if the program contains this function. In this case, select Go from the Execute menu to continue from the breakpoint. 3. While your program is running, configure the interface as follows: a. Select Configure Interface from the Options menu. b. Select the General tab. c.
Connecting to RMHost If not present in the list, click Add and select RealMonitor.dll from the Bin directory of the ADS installation. (If DLL files do not appear, use Windows Explorer to ensure that files of extension .dll are not hidden from view.) The Choose Target dialog box is redisplayed. When you select RealMonitor.dll, AXD displays the following message: Connect the ARM Debugger to a target board using a unit such as Multi-ICE. Boards require RMTarget software. Step 5 describes how to do this.
Connecting to RMHost Figure 2-4 RealMonitor Configuration dialog box Select an RDI 1.5.1rt-compliant JTAG controller DLL (see RMHost requirements on page 14), using one of the following methods: • If present in either the Bin directory of the ADS installation, or in one of the PATH environment variable directories, type in the name of the DLL in the JTAG Controller field (with or without the .dll extension), such as Multi-ICE, as shown in Figure 2-4.
Connecting to RMHost Figure 2-5 JTAG controller search dialog box 6. Click Configure... to configure the JTAG controller you have selected. For details on configuring Multi-ICE 2.0, see the Using Multi-ICE with Debuggers chapter of the Multi-ICE User Guide. If you are using another JTAG controller, see its accompanying documentation for details on configuration. Note Optionally, you can enable tracing if you have ARM Trace Debug Tools (TDT) installed.
Connecting to RMHost Caution The module server does not work with the RMHost controller if you disabled support for the ExecuteCode packet when you built RMTarget. See the description of the RM_OPT_EXECUTECODE build option in the building the RMTarget chapter of the ARM RMTarget Integration Guide. 8. Provide the module server with information about the target system.
Connecting to RMHost Note If RMHost detects an error in the configuration you have selected, an error message is displayed. If this happens, you can click one of the following: OK Stores the configuration, although the error can prevent you from using RMHost. Cancel Does not store the configuration, and you are returned to the RealMonitor Configuration dialog box. See Error messages on page 37 for a description of RMHost-related errors.
Connecting to RMHost Figure 2-7 No pc read access message 210 Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Connecting to RMHost 2.2 AXD connection messages When you connect the debugger to RMHost, messages are displayed in the RDI Log window of AXD, as shown in Example 2-1. If you are using a debugger other than AXD, see the documentation that accompanies your debugger for details on where information is displayed when you connect to a new target. Example 2-1 Example of RMHost connection messages ARM RMHost 1.0 (ARM Ltd. RM1.0) [XXX] ARM Multi-ICE Release 2.0. Copyright (c) ARM Limited 1998-2000.
Connecting to RMHost 212 Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Chapter 3 Debugging with RMHost This chapter describes all the debugging features you can use in the real-time debugging environment available when you are connected to RMHost. It also describes the restrictions to debugging a RealMonitor-enabled application, and includes descriptions of RMHost-related error messages. It also describes the use of RMHost with Trace Debug Tools (TDT).
Debugging with RMHost 3.1 Debugging with RMHost When connected to RMHost, the AXD user interface is identical to that when connected to other debug targets such as Multi-ICE. (For details on connecting to RMHost, see Chapter 2 Connecting to RMHost.) You can display, for example, memory windows, register contents, and variables.
Debugging with RMHost 3.1.2 Background memory access In addition to being able to access memory when your application is stopped (as with Multi-ICE, for example), memory can also be read or written to while your application is running. Therefore, the memory and disassembly windows in the debugger you are using can be opened and refreshed while your application is running.
Debugging with RMHost Note This workaround is performed only if you have built RMTarget to support the ExecuteCode packet (see RM_OPT_EXECUTECODE in the building chapter of the ARM RMTarget Integration Guide).
Debugging with RMHost 3.1.5 Background setting and clearing of breakpoints and watchpoints When connected to RMHost, you can set and clear breakpoints and watchpoints without stopping your application. You can also set and clear breakpoints and watchpoints when your application is in a stopped state. 3.1.6 Profiling RMHost supports a low-intrusion code profiling mechanism.
Debugging with RMHost This message is displayed when the application is writing to the console, and you stop your application at the same time RMHost is performing a write. In this case, the data that has not been written is lost, and is not displayed. For complete details on semihosting with an ARM target, see the semihosting chapter of the ADS Debug Target Guide. 36 Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Debugging with RMHost 3.2 Error messages This section describes all error messages you might receive when connecting to, or using, RMHost. Note Error messages can be generated by both the debugger and the JTAG unit you are using. Errors that come from the JTAG unit (such as Multi-ICE) are prefixed in the debugger by the string (JTAG). For a description of these errors, see the documentation that accompanies the JTAG unit you are using.
Debugging with RMHost This error might also be displayed when any of the following occurs: • You connect to a remote target, that is, one that is not connected to the local machine. In this case, a timeout typically results from a network error. • The target is built for polled mode, and the application is not calling RM_PollDCC(). See the description of this function in the API chapter of the ARM RMTarget Integration Guide.
Debugging with RMHost Memory map forbids reading from location Either you or the debugger attempted to read a location, but the memory map on the target forbids the reading of locations in that region. Memory map forbids setting of breakpoint/watchpoint Either you or the debugger attempted to set a breakpoint or watchpoint, but the memory map on the target forbids the setting of watchpoints or breakpoints on that region. (The debugger might attempt to set a breakpoint when single-stepping.
Debugging with RMHost RMHost could not load the specified JTAG controller This is displayed when the JTAG controller DLL could not be loaded. RMHost internal error Indicates some consistency failure inside the RMHost controller. You must report this error to your supplier, along with a description of the events leading up to the error. RMHost protocol error (internal error) The RMHost controller detected that it was about to violate the RealMonitor protocol, and aborted the operation.
Debugging with RMHost 3.2.1 Other messages from RMHost In addition to the messages described in Error messages on page 37, you can also receive a message similar to that shown in Figure 3-1 when either of the following occurs: • you write to the CPSR • the debugger writes to the CPSR after an image load. Figure 3-1 IRQ message In this case, RealMonitor has detected that either you or the debugger are attempting to disable either IRQs or FIQs.
Debugging with RMHost Cancel Abort. RMHost returns an error to the debugger. Note In general, if your application enables interrupts itself, you must start it with interrupts disabled. Otherwise, it is typically safe to start it with interrupts enabled. 312 Copyright © 2000 ARM Limited. All rights reserved.. All rights reserved.
Debugging with RMHost 3.3 Using RMHost with Trace Debug Tools RMHost can work with the ARM Trace Debug Tools (TDT) version 1.1 or later. The system configuration is illustrated in Figure 3-2.
Debugging with RMHost 3.3.1 Configuring AXD to enable tracing with RMHost The process of connecting to a target system using both RMHost and TDT is similar to connecting to a target system using only RMHost. The only difference is that you must enable tracing when you configure your JTAG controller to be used with RealMonitor.dll, as described in step 6 of Procedure for connecting to RMHost using AXD on page 22.
Index The items in this index are listed in alphabetical order, with symbols and numerics appearing at the end. The references given are to page numbers. A C ARM Developer Suite (ADS) 2--5 ARM eXtended Debugger. See AXD. ARM Flash Utility (AFU) 2--2 Autoconf.
Index G GetPC packet 3--5 H Host requirements 1--4 I Image cache 3--14 IRQ 3--11 J JTAG errors 3--7 M main() 2--4 Memory access 3--3 Module server 2--7 Multi-ICE 2--3, 2--6, 3--2, 3--7 N RDI module server 2--7 RealMonitor protocol 1--2 RealMonitor.dll 1--2, 2--4, 3--14 Real-Time Operating System. See RTOS. Register access 3--4 Remote Debug Interface. See RDI.