RealView ® DeveloperKit Debugger User Guide

Version 2.2


Table of Contents

Preface
About this book
Intended audience
Examples
Using this book
Typographical conventions
Further reading
Feedback
Feedback on RealView Debugger
Feedback on this book
1. Starting to use RealView Debugger
1.1. Starting RealView Debugger
1.1.1. Starting from Windows
1.1.2. Starting from the command line
1.1.3. Setting environment variables
1.2. RealView Debugger directories
1.2.1. Defining the installation directory
1.2.2. Defining the home directory on Windows
1.2.3. Using the examples directories
2. Connecting to Targets
2.1. Working with the Connection Controlwindow
2.1.1. Groups in the Connection Control window
2.1.2. Using the Connection Control window
2.1.3. Changing your board file
2.2. Managing connections
2.2.1. Working with target vehicles
2.2.2. Working with access-providers
2.2.3. Working with endpoint connections
2.3. Connecting to a target
2.3.1. Connections during debugging mode
2.3.2. Using the Connection Control window
2.3.3. Setting connect mode
2.3.4. Including the connection in the workspace
2.3.5. Using CLI commands
2.4. Failing to make a connection
2.4.1. Troubleshooting
2.5. Disconnecting from a target
2.5.1. Disconnect behavior in RealView Debugger
2.5.2. Using auto-disconnect
2.5.3. Using the Target menu
2.5.4. Using the Connection Control window
2.5.5. Setting disconnect mode
2.5.6. Disconnecting by exiting
2.5.7. Using the CLI
3. Working with Images
3.1. Loading images
3.1.1. Loading from a user-defined project
3.1.2. Using the Load File to Target dialogbox
3.1.3. Loading from the Process Control pane
3.1.4. Quick loading
3.1.5. Loading from the command line
3.1.6. Loading and runtime visualization
3.2. Managing images
3.2.1. Viewing image details in the Codewindow
3.2.2. Viewing image details in the ProcessControl pane
3.2.3. Working with auto-projects
3.2.4. Working with user-defined projects
3.3. Working with symbols
3.4. Working with multiple images
3.5. Unloading and reloading images
3.5.1. Resetting your target processor
3.5.2. Unloading an image
3.5.3. Replacing the currently loaded image
3.5.4. Reloading an image
4. Controlling Execution
4.1. Submitting commands
4.2. Defining execution context
4.2.1. Code views
4.2.2. Defining scope and context
4.3. Using execution controls
4.3.1. Using the Execution group
4.3.2. Using shortcuts
4.4. Working with the Debug menu
4.4.1. Using the Debug menu
4.5. Automating debugging operations
4.5.1. Creating log and journal files
4.5.2. Using include files
4.6. Searching for source files
4.6.1. Example of locating source files
4.6.2. Autoconfiguring search rules
4.6.3. Manually configuring search rules
4.6.4. Source path mappings
5. Working with Breakpoints
5.1. Breakpoints in RealView Debugger
5.1.1. Breakpoint types
5.1.2. Qualifying breakpoint line numberreferences with module names
5.1.3. Specifying address ranges
5.1.4. Specifying the entry point to a function
5.1.5. Breakpoints and memory map locations
5.1.6. Viewing breakpoints in your code view
5.1.7. Halted System Debug and Running SystemDebug
5.1.8. Using hardware breakpoints
5.1.9. Breakpoints and image restarts
5.1.10. Using breakpoints with RealView ICEand RVI-ME
5.2. Setting default breakpoints
5.2.1. Default breakpointsin source-level view
5.2.2. Default breakpoints in disassembly-levelview
5.2.3. Setting breakpointson branch instructions
5.2.4. Setting default breakpoints in otherways
5.3. Generic breakpoint operations
5.4. Setting unconditional breakpointsexplicitly
5.4.1. Using the Simple Break if X dialogbox
5.4.2. Setting unconditional breakpoints in other ways
5.5. Setting hardware breakpoints explicitly
5.5.1. Using the HW Break if in Range dialogbox
5.5.2. Using the HW While in function/range,Break if X dialog box
5.5.3. Using the HW Break if X, then if Ydialog box
5.5.4. Using the HW Break on Data Value match dialogbox
5.5.5. Chaining breakpoints
5.6. Specifying processor exceptions (globalbreakpoints)
5.6.1. Displaying the List Selection dialog box
5.6.2. List Selection dialog box interface components
5.7. Setting conditional breakpoints
5.7.1. Considerations when using conditionalbreakpoints
5.7.2. Using the Simple Break if X, N timesdialog box
5.7.3. Using the Simple Break if X, whenY is True dialog box
5.7.4. Setting conditional hardware breakpoints
5.7.5. Setting conditional breakpoints inother ways
5.8. Using the Set Address/Data Breakpointdialog box
5.8.1. Displaying the Set Address/Data Breakpointdialog box
5.8.2. Editing an existing breakpoint
5.8.3. Set Address/Data Breakpoint dialogbox interface components
5.8.4. Setting software breakpoints
5.8.5. Setting hardware breakpoints
5.8.6. HW Support settings for target hardware
5.8.7. Using ranges and masks with hardwarebreakpoints
5.8.8. Specifying Qualifiers
5.8.9. Specifying Actions
5.8.10. Managing the qualifier and actionlists
5.9. Attaching macros to breakpoints
5.9.1. Defining a user-created macro as asymbol
5.9.2. Attaching a macro to a breakpoint
5.10. Controlling the behavior of breakpoints
5.10.1. Demonstrating breakpoint behaviorwith the Dhrystone example project
5.10.2. Using a macro as an argument to abreak command
5.11. Using the Break/Tracepoints pane
5.11.1. Displaying the Break/Tracepointspane
5.11.2. Viewing breakpointsin the Break/Tracepoints pane
5.11.3. Using the Break/Tracepoints Entrycontext menu
5.11.4. Using the Break/Tracepoints context menu
5.11.5. Working in the Break/Tracepoints pane
5.11.6. Using the Pane menu
5.12. Disabling and clearing breakpoints
5.12.1. Disabling breakpoints
5.12.2. Clearing breakpoints
5.12.3. Clearing all breakpoints
5.13. Setting breakpoints from saved lists
5.13.1. Setting breakpoints from the Function/Labellist
5.13.2. Setting breakpoints from the breakpointhistory lists
5.13.3. Setting breakpoints from your breakpointFavorites List
6. Memory Mapping
6.1. About memory mapping
6.1.1. Uses for memory mapping
6.1.2. Memory map considerations
6.2. Enabling and disabling memory mapping
6.3. Setting up a memory map
6.4. Viewing the memory map
6.4.1. Working with the Map tab
6.4.2. Memory map configuration
6.4.3. Using the Map tab context menu
6.5. Editing map entries
6.5.1. Updating map entries based on registers
6.6. Setting top_of_memory and stack values
6.7. Generating linker command files fornon-ARM targets
7. Working with Debug Views
7.1. Working with registers
7.1.1. Displaying register contents
7.1.2. Formatting options
7.1.3. Changing register contents
7.1.4. Understanding the register view
7.1.5. Viewing debugger internals
7.1.6. Defining new registers
7.1.7. Interactive operations
7.2. Working with memory
7.2.1. Displaying memory contents
7.2.2. Formatting options
7.2.3. Operating on memory contents
7.2.4. Data width on memory accesses
7.2.5. Changing memory contents
7.2.6. Interactive operations
7.3. Working with the stack
7.3.1. Using the Stack pane
7.3.2. Formatting options
7.3.3. Operating on stack contents
7.3.4. Context controls
7.3.5. Setting a breakpoint
7.3.6. Interactive operations
7.4. Using the call stack
7.4.1. Using the Stack pane
7.4.2. Using the Call Stack pane
7.4.3. Using context menus
7.4.4. Stack controls
7.5. Working with watches
7.5.1. Setting watches in source-level view
7.5.2. Working with the Watch pane
7.5.3. Managing watches
7.5.4. Saving watches as favorites
8. Reading and Writing Memory, Registers and Flash
8.1. About interactive operations
8.2. Using the Memory/Register Operationsmenu
8.3. Accessing interactive operations inother ways
8.3.1. From the Memory pane
8.3.2. From the Stack pane
8.4. Working with Flash
8.4.1. Flash Method files
8.4.2. Flash examples
8.4.3. Flash programming
8.4.4. Using the Flash Memory Control
8.5. Examples of interactive operations
8.5.1. Setting memory
8.5.2. Setting registers
8.5.3. Downloading memory to a file
8.5.4. Comparing memory with file contents
8.5.5. Filling memory with a pattern
8.5.6. Loading Flash memory with the Upload/Downloadfile from/to Memory dialog box
8.5.7. Setting Flash memory
9. Working with Browsers
9.1. Using browsers
9.1.1. Scope of symbols in RealView Debugger
9.1.2. Browser panes
9.1.3. List browser dialog boxes
9.2. Using the Data Navigator pane
9.2.1. Displaying the Data Navigator pane
9.2.2. Data Navigator pane interface components
9.2.3. Applying a filter
9.2.4. Refining the list of functions andvariables
9.2.5. Setting a default breakpoint on afunction
9.2.6. Setting a non-default breakpoint ona function
9.2.7. Setting a hardware breakpoint on avariable
9.2.8. Working with the Images tab
9.2.9. Working with the Modules tab
9.2.10. Working with the Functions tab
9.2.11. Working with the Variables tab
9.3. Using the Symbol Browser pane
9.3.1. Viewing details of a class
9.3.2. Viewing details of a function
9.4. Using the Function List dialog box
9.4.1. Displaying the Function List dialogbox
9.4.2. Specifying the list
9.4.3. Refining the list
9.4.4. Selecting a function
9.4.5. Closing the browser
9.5. Using the Variable List dialog box
9.5.1. Displaying the Variable List dialogbox
9.5.2. Specifying the list
9.5.3. Refining the list
9.5.4. Closing the browser
9.6. Using the Module/File List dialogbox
9.6.1. Displaying the Module/File List dialogbox
9.6.2. Specifying the list
9.6.3. Selecting a module
9.6.4. Closing the browser
9.7. Using the Register List Selectiondialog box
9.7.1. Displaying the Register List Selectiondialog box
9.7.2. Selecting a register
9.7.3. Closing the browser
9.8. Specifying browser lists
9.8.1. Specifying a list
9.8.2. Applying a filter
9.9. Using the Favorites Chooser/Editordialog box
9.9.1. Overview of the Favorites Chooser/Editordialog box
9.9.2. Displaying the Favorites Chooser/Editordialog box
9.9.3. Favorites Chooser/Editor dialog boxinterface components
9.9.4. Favorites categories used by RealView Debugger features
10. Working with Macros
10.1. About macros
10.1.1. Properties of macros
10.1.2. Debugger commands in macros
10.1.3. Defining macros
10.1.4. Calling macros
10.1.5. Macro return values
10.1.6. Using macros with breakpoints
10.1.7. Attaching macros
10.1.8. Stopping macros
10.2. Using macros
10.2.1. Creating a macro
10.2.2. Viewing a macro
10.2.3. Testing a macro
10.2.4. Editing a macro
10.2.5. Copying a macro
10.2.6. Deleting a macro
10.2.7. Calling a macro
10.3. Getting more information
11. Configuring Workspace Settings
11.1. Using workspaces
11.1.1. Initializing the workspace
11.1.2. Workspace menu
11.1.3. Opening workspaces
11.1.4. Closing workspaces
11.1.5. Projects in workspaces
11.1.6. Creating an empty workspace
11.2. Viewing workspace settings
11.2.1. Using Settings windows
11.2.2. Options window
11.2.3. Workspace Options window
11.2.4. Groups and settings
11.3. Configuring workspace settings
11.3.1. Restoring settings
11.3.2. Changing settings
11.3.3. Copying entries
11.3.4. Pasting entries
11.3.5. Cutting entries
11.3.6. Resetting entries
12. Connection and Target Configration
12.1. About target connections and configuration
12.1.1. Comparing target connection and targetconfiguration
12.1.2. Connection Control window
12.1.3. Connection Propertieswindow
12.2. Viewing board file properties
12.2.1. Connection Properties window
12.2.2. Connection entries
12.2.3. Configuration entries
12.3. Configuration files
12.3.1. What the configuration files contain
12.3.2. Finding configuration files
13. Configuring Custom Targets
13.1. About target configuration
13.1.1. Target configuration settings
13.1.2. Default configuration files
13.1.3. How configuration filesare linked together
13.1.4. Board file contents
13.2. Linking a board, chip, or componentto a connection
13.2.1. Avoiding conflicts between linkedboard groups
13.2.2. Linking one board group to one connection
13.2.3. Linking several boardgroups to one connection
13.2.4. Linking one or moreboard groups to another board group
13.3. Creating new target descriptions
13.3.1. Using the examples
13.3.2. Creating a new .bcd file
13.3.3. Creating and naming a board, chip,or component
13.3.4. Creating multiple board groups andlinking to another board group
13.3.5. Managing configuration settings
13.4. Example descriptions
13.4.1. Setting up an Integrator board andcore module
13.4.2. Specifying connect and disconnectmode
13.4.3. Configuring a memory map
13.4.4. Setting up a custom register
13.4.5. Setting up memory blocks
13.4.6. Setting top of memory and stack heapvalues
13.4.7. Flash programming
13.4.8. Restoring your .brd file
13.4.9. Troubleshooting
14. Configuring Custom Connections
14.1. Working with connection properties
14.1.1. Connection entries in the ConnectionControl window
14.1.2. Enabling or disabling a board fileentry
14.1.3. Changing entries containing user-informationvalues
14.1.4. Restoring board file entry defaults
14.2. Working with RVI/RVI-ME targets
14.2.1. Creating a new RVI/RVI-ME connection
14.2.2. Configuring an RVI/RVI-ME interfaceunit
15. RTOS Support
15.1. About Real Time Operating Systems
15.1.1. Debugging an RTOS application with RealView Debugger
15.2. Using RealView Debugger RTOS extensions
15.2.1. Enabling RTOS support
15.2.2. Creating a new RTOS-enabled connection
15.2.3. Configuring an RTOS-enabled connectionto reference a vendor-supplied .bcd file
15.2.4. Configuring an RTOS-enabled connectionwithout a vendor-supplied .bcd file
15.2.5. Managing configuration settings
15.3. Connecting to the target and loadingan image
15.3.1. Before connecting
15.3.2. Connecting from the Code window
15.3.3. Connecting to a running target
15.3.4. RTOS Exit Options
15.3.5. Interrupts when loading an image
15.3.6. Resetting OS state
15.3.7. Loading from the command line
15.4. Associating threads with views
15.4.1. Attaching and unattaching windows
15.4.2. The current thread
15.4.3. Using the Cycle Threads button
15.4.4. Working with the threadlist
15.5. Working with OS-aware images in theProcess Control pane
15.5.1. OS marker in the Process tab
15.5.2. Using the Thread tab
15.6. Using the Resource Viewer window
15.6.1. Displaying the Resource Viewer window
15.6.2. Working with RTOS resources
15.6.3. Resource Viewer window interface components
15.6.4. Using Action context menus
15.6.5. Interaction of RTOS resources and RealView Debugger
15.7. Debugging your RTOS application
15.7.1. About breakpoints
15.7.2. Setting breakpoints
15.7.3. Using the Set Address/Data Breakpointdialog box
15.7.4. Using the Break/Tracepoints pane
15.7.5. Stepping threads
15.7.6. Manipulating registers and variables
15.7.7. Updating your debug view
15.8. Using CLI commands
16. Programming Flash with RealView Debugger
16.1. Introduction to Flash programmingwith RealView Debugger
16.2. Programming an image into Flash
16.2.1. Writing the image to Flash
16.2.2. Using CLI commands to program Flash
16.2.3. Checking the contents of Flash
16.3. Troubleshooting
A. Workspace Settings Reference
A.1. DEBUGGER
A.1.1. Command
A.1.2. Disassembler
A.1.3. Board_file
A.2. CODE
A.2.1. Pos_size
A.2.2. Button
A.2.3. Asm_type
A.3. ALL
A.3.1. Text
A.3.2. Search
A.3.3. Edit
B. Configuration Properties Reference
B.1. About this appendix
B.2. Target configuration and connections
B.2.1. Types of entry
B.3. Generic groups and settings
B.4. Target configuration reference
B.4.1. The Advanced_Information block
B.4.2. BOARD, CHIP, and COMPONENT groups
B.5. Custom connection reference
B.5.1. CONNECTION groups
B.5.2. DEVICE groups
Glossary

List of Figures

2.1. Connection Control window
2.2. Groups in the Connection Controlwindow
2.3. Connect Mode selection box
2.4. Failing to make a connection
2.5. Disconnect Mode selection box
2.6. Disconnect confirmation
2.7. Disconnect reconfiguration or retry
3.1. Load File to Target dialog box
3.2. Connection prompt
3.3. Code window with image loaded
3.4. Image details in the Process Controlpane
3.5. Auto-projects in the Process Controlpane
3.6. Changing auto-project settings
3.7. Multiple images in the Process Controlpane
4.1. Disassembly Mode selection box
4.2. Output files recording
4.3. Close log and journal files selectionbox
4.4. Source search prompt
4.5. Search rules in the Project Propertieswindow
5.1. Working with multiple breakpointunits
5.2. Example hardware break characteristics
5.3. Setting an unconditional breakpointon a line
5.4. Setting an unconditional breakpointon an instruction
5.5. Simple Break if X dialog box
5.6. HW Break if in Range dialog box
5.7. HW While in func/range, Break ifX dialog box
5.8. HW break if X, then if Y dialog box
5.9. HW Break on Data Value match dialogbox
5.10. Processor Exceptions list selectionbox
5.11. Simple Break if X, N times dialogbox
5.12. Simple Break if X, when Y is Truedialog box
5.13. Set Address/Data Breakpoint dialogbox
5.14. Configuring hardware tests
5.15. Assigning qualifiers to breakpoints
5.16. Assigning actions to breakpoints
5.17. Breakpoint macro entry prompt
5.18. Set breakpoint with macro attached
5.19. Break/Tracepoints pane
5.20. Breakpoints in the Break/Tracepointspane
5.21. Hardware breakpoints in the Break/Tracepointspane
6.1. Add/Copy/Edit Memory Map dialog box
6.2. Memory mapped
6.3. Colors in the memory map
7.1. Register pane
7.2. Setting enumeration values
7.3. Viewing registers
7.4. Viewing internal variables (RVI)
7.5. Memory pane
7.6. Memory start address selection box
7.7. Example memory display
7.8. Viewing the stack
7.9. Multistatement details in the CallStack pane
7.10. Watch pane with watches
7.11. Watches in the Watch pane
7.12. New/Edit Favorite dialog box
7.13. Existing watches in the FavoritesChooser/Editor
7.14. Adding a new favorite
8.1. Flash Memory Control dialog box
8.2. Interactive Memory Setting dialogbox
8.3. Upload/Download file from/to Memorydialog box
8.4. Fill Memory with Pattern dialog box
8.5. Upload/Download file from/to Memory dialog box
8.6. Flash memory details
9.1. Data Navigator pane
9.2. C++ symbols in the Symbol Browserpane
9.3. Function List dialog box
9.4. The Variable List
9.5. Module/File List dialog box
9.6. Register List Selection dialog box
9.7. Favorites Chooser/Editor dialog box
10.1. Creating a macro
10.2. Editing a macro body
10.3. Loading macros on connection
10.4. Loading macros from a project
11.1. Close Open Objects selection box
11.2. Workspace Options window
11.3. Example Workspace Options
12.1. Connection Control window
12.2. Connection Properties window
12.3. Viewing .bcd files in the ConnectionProperties window
13.1. Configuration files in the boardfile
13.2. Linking one connection to one board
13.3. testconn2 connection properties
13.4. Linking a board
13.5. New BoardChip_name setting in connectionproperties
13.6. Linking one connection to two boards
13.7. Linking a second board
13.8. Board and chip groups for the Evaluator-7T
13.9. Linking one board into another board
13.10. Board and chip groups for the EtherRouter
13.11. Linking one board into other boards
13.12. Saving an existing .bcd file witha new name
13.13. Viewing the new group in the .bcdfile
13.14. Setting up EtherRouter
13.15. Setting up EtherRouter
13.16. Creating a new connection
13.17. Displaying the new MP3Player connectionproperties
13.18. Board groups linked to the new connection
13.19. Connecting to the new target
13.20. AP tab in the Register pane
13.21. Viewing the contents of the new group
13.22. New memory map in the Process Controlpane
13.23. Configuring REGS
13.24. Creating enumerations
13.25. Creating bit field descriptions
13.26. The MYREG group
13.27. MYREG in the Register pane
13.28. Creating a new memory block
13.29. Creating a map rule
13.30. Settings for the second map rule
13.31. New memory block in the Map tab
13.32. Settings in the Stack_Heap group
13.33. Relating top_of_memory to singlesection program layout
14.1. Connection properties entries inthe Connection Control window
14.2. RVI-ME targets in the ConnectionControl window
14.3. Specifying a new CONNECTION group
14.4. Configuring an RVI-ME interface unit
14.5. Recommended settings for an ARM Integratorboard
15.1. RealView Debugger and RTOS components
15.2. Connection Control window
15.3. CONNECTION groups in the ConnectionProperties window
15.4. Specifying a new CONNECTION group
15.5. New connection in the ConnectionControl window
15.6. Referencing the RTOS .bcd file
15.7. RTOS group in the Connection Propertieswindow
15.8. ARM_config group in the ConnectionProperties window
15.9. Default group in the Connection Propertieswindow
15.10. RTOS Exit Options selection box
15.11. Example thread list
15.12. Example thread list in an attachedwindow
15.13. Thread selection box
15.14. OS marker initial state in the ProcessControl pane (HSD)
15.15. OS marker with loaded image in theProcess Control pane (HSD)
15.16. OS marker in the Process Controlpane (RSD)
15.17. Thread tab in the Process Controlpane
15.18. Resource Viewer showing thread details
15.19. Action argument prompt
15.20. RTOS Breakpoint Class selector
15.21. RTOS (RSD) breakpoints in the Break/Tracepointspane
15.22. RTOS (HSD) breakpoints in the Break/Tracepointspane
15.23. Stepping and stopping threads
B.1. How connections, boards, and chipsfit together
B.2. Viewing generic settings

ProprietaryNotice

Words and logos marked with ® or ™ are registered trademarks or trademarksowned by ARM Limited. Other brands and names mentioned herein maybe the trademarks of their respective owners.

Neither the whole nor any part of the information containedin, or the product described in, this document may be adapted orreproduced in any material form except with the prior written permissionof the copyright holder.

The product described in this document is subject to continuousdevelopments and improvements. All particulars of the product andits use contained in this document are given by ARM in good faith.However, all warranties implied or expressed, including but notlimited to implied warranties of merchantability, or fitness forpurpose, are excluded.

This document is intended only to assist the reader in theuse of the product. ARM Limited shall not be liable for any lossor damage arising from the use of any information in this document,or any error or omission in such information, or any incorrect useof the product.

ConfidentialityStatus

This document is Non-Confidential. The right to use, copyand disclose this document may be subject to license restrictionsin accordance with the terms of the agreement entered into by ARMand the party that ARM delivered this document to.

Product Status

The information in this document is final, that is for a developedproduct.

Revision History
Revision B April 2005 Releasefor RVDK v2.2
Revision C January 2006 Includestrace support
Copyright © 2005, 2006 ARM Limited. All rights reserved. ARM DUI 0281C
Non-Confidential