ARM® DS-5™ ARM DS-5 Debugger User Guide

Version 5.17


Table of Contents

Preface
About this book
Using this book
Glossary
Typographic conventions
Feedback
Other information
1 Getting started with DS-5™ Debugger
1.1 About the debugger
1.2 Debugger concepts
1.3 Launching the debugger from Eclipse
1.4 About DS-5™ headless command-line debugger
1.5 Headless command-line debugger options
1.6 Specifying a custom configuration database using the headless command-line debugger
1.7 DS-5 Debug perspective keyboard shortcuts
1.8 DS-5 Debugger command-line console keyboard shortcuts
1.9 Standards compliance in the DS-5 Debugger
2 Configuring and connecting to a target
2.1 Types of target connections
2.2 Configuring a connection to a Fixed Virtual Platform (FVP)
2.3 Configuring a connection to a Linux target using gdbserver
2.4 Configuring a connection to a Linux Kernel
2.5 About configuring connections to a Linux target using Application Debug with Rewind Support
2.5.1 Connecting to an existing application and application rewind session
2.5.2 Downloading your application and application rewind server on the target system
2.5.3 Starting the application rewind server and debugging the target-resident application
2.6 About configuring connections to an Android target using Native Application/Library Debug with Rewind Support
2.6.1 Attaching to a running Android application
2.6.2 Downloading and debugging an Android application
2.7 Configuring a connection to a bare-metal target
2.8 Configuring an Event Viewer connection to a bare-metal target
2.9 About the target configuration import utility
2.10 Adding a new platform
2.11 Adding a new configuration database to DS-5
2.12 Exporting an existing launch configuration
2.13 Importing an existing launch configuration
2.14 Disconnecting from a target
3 Working with the target configuration editor
3.1 About the target configuration editor
3.2 Target configuration editor - Overview tab
3.3 Target configuration editor - Memory tab
3.4 Target configuration editor - Peripherals tab
3.5 Target configuration editor - Registers tab
3.6 Target configuration editor - Group View tab
3.7 Target configuration editor - Enumerations tab
3.8 Target configuration editor - Configurations tab
3.9 Scenario demonstrating how to create a new target configuration file
3.9.1 Creating a memory map
3.9.2 Creating a peripheral
3.9.3 Creating a standalone register
3.9.4 Creating a peripheral register
3.9.5 Creating enumerations for use with a peripheral register
3.9.6 Assigning enumerations to a peripheral register
3.9.7 Creating remapping rules for a control register
3.9.8 Creating a memory region for remapping by a control register
3.9.9 Applying the map rules to the overlapping memory regions
3.10 Creating a power domain for a target
3.11 Creating a Group list
3.12 Importing an existing target configuration file
3.13 Exporting a target configuration file
4 Controlling execution
4.1 About loading an image on to the target
4.2 About loading debug information into the debugger
4.3 About passing arguments to main()
4.4 Running an image
4.5 Working with breakpoints and watchpoints
4.5.1 Setting or deleting an execution breakpoint
4.5.2 Setting or removing a data watchpoint
4.5.3 Viewing the properties of a data watchpoint
4.5.4 Importing DS-5™ breakpoint settings from a file
4.5.5 Exporting DS-5™ breakpoint settings to a file
4.6 Working with conditional breakpoints
4.6.1 Assigning conditions to an existing breakpoint
4.7 About pending breakpoints and watchpoints
4.8 Setting a tracepoint
4.9 Setting Streamline start and stop points
4.10 Stepping through an application
4.11 Handling Unix signals
4.12 Handling processor exceptions
4.13 Configuring the debugger path substitution rules
5 Examining the target
5.1 Examining the target execution environment
5.2 Examining the call stack
5.3 About trace support
5.4 About post-mortem debugging of trace data
6 Debugging embedded systems
6.1 About endianness
6.2 About accessing AHB, APB, and AXI buses
6.3 About virtual and physical memory
6.4 About debugging hypervisors
6.5 About debugging big.LITTLE systems
6.6 About debugging bare-metal symmetric multiprocessing systems
6.7 About debugging multi-threaded applications
6.8 About debugging shared libraries
6.9 About debugging a Linux kernel
6.10 About debugging Linux kernel modules
6.11 About debugging FreeRTOS ™
6.12 About debugging TrustZone enabled targets
6.13 About debugging a Unified Extensible Firmware Interface (UEFI)
6.14 About application rewind
6.15 About debugging ThreadX
6.16 About DTSL (Debug and Trace Service Layer)
6.17 About CoreSight™ Target Access Library
7 Controlling runtime messages
7.1 About semihosting and top of memory
7.2 Working with semihosting
7.3 Enabling automatic semihosting support in the debugger
7.4 Controlling semihosting messages using the command-line console
7.5 Controlling the output of logging messages
7.6 About Log4j configuration files
7.7 Customizing the output of logging messages from the debugger
8 Debugging with scripts
8.1 Exporting DS-5 Debugger commands generated during a debug session
8.2 Creating a DS-5 Debugger script
8.3 Creating a CMM-style script
8.4 About Jython scripts
8.5 Jython script concepts and interfaces
8.6 Creating Jython projects in Eclipse for DS-5™
8.6.1 Creating a new Jython project in Eclipse for DS-5™
8.6.2 Configuring an existing project to use the DS-5™ Jython interpreter
8.7 Creating a Jython script
8.8 Running a script
9 Working with the Snapshot Viewer
9.1 About the Snapshot Viewer
9.2 Components of a Snapshot Viewer initialization file
9.3 Connecting to the Snapshot Viewer
9.4 Considerations when creating debugger scripts for the Snapshot Viewer
10 DS-5 Debug perspectives and views
10.1 App Console view
10.2 ARM Asm Info view
10.3 ARM assembler editor
10.4 Breakpoints view
10.5 C/C++ editor
10.6 Commands view
10.7 Debug Control view
10.8 Disassembly view
10.9 Events view
10.10 Expressions view
10.11 Functions view
10.12 History view
10.13 Memory view
10.14 Modules view
10.15 Registers view
10.16 RTOS Data view
10.17 Screen view
10.18 Scripts view
10.19 Target Console view
10.20 Target view
10.21 Trace view
10.22 Trace Control view
10.23 Variables view
10.24 Auto Refresh Properties dialog box
10.25 Memory Exporter dialog box
10.26 Memory Importer dialog box
10.27 Fill Memory dialog box
10.28 Export trace report dialog box
10.29 Breakpoint properties dialog box
10.30 Watchpoint properties dialog box
10.31 Tracepoint properties dialog box
10.32 Manage Signals dialog box
10.33 Event Viewer dialog box
10.34 Functions Filter dialog box
10.35 Jython Script Parameters dialog box
10.36 Debug Configurations - Connection tab
10.37 Debug Configurations - Files tab
10.38 Debug Configurations - Debugger tab
10.39 Debug Configurations - OS Awareness tab
10.40 Debug Configurations - Arguments tab
10.41 Debug Configurations - Environment tab
10.42 DTSL Configuration Editor dialog box
10.43 Configuration database panel
10.44 About the Remote System Explorer
10.45 Remote Systems view
10.46 Remote System Details view
10.47 Target management terminal for serial and SSH connections
10.48 Remote Scratchpad view
10.49 Remote Systems terminal for SSH connections
10.50 New Terminal Connection dialog box
10.51 DS-5 Debugger menu and toolbar icons
11 Troubleshooting
11.1 ARM Linux problems and solutions
11.2 Enabling internal logging from the debugger
11.3 Target connection problems and solutions
12 File-based flash programming in DS-5™
12.1 About file-based flash programming in DS-5™
12.2 Flash programming configuration
12.3 Creating an extension database for flash programming
12.4 About using or extending the supplied Keil flash method
12.4.1 Adding flash support to an existing platform using an existing Keil flash algorithm
12.4.2 Adding flash support to an existing target platform using a new Keil flash algorithm
12.5 About creating a new flash method
12.5.1 About using the default implementation FlashMethodv1
12.5.2 About creating the flash method Python script
12.6 About testing the flash configuration
12.7 About flash method parameters
12.8 About getting data to the flash algorithm
12.9 About interacting with the target
13 Writing OS awareness for DS-5™ Debugger
13.1 About Writing operating system awareness for DS-5™ Debugger
13.2 Creating an OS awareness extension
13.3 Implementing the OS awareness API
13.4 Enabling the OS awareness
13.5 Implementing thread awareness
13.6 Implementing data views
13.7 Programming advice and noteworthy information

List of Figures

2-1 Adding a new configuration database
2-2 Export launch configuration dialog box
2-3 Launch configuration selection panels
2-4 Import launch configuration dialog box
2-5 Launch configuration file selection panels
3-1 Target configuration editor - Overview tab
3-2 Target configuration editor - Memory tab
3-3 Target configuration editor - Peripherals tab
3-4 Target configuration editor - Registers tab
3-5 Target configuration editor - Group View tab
3-6 Target configuration editor - Enumerations tab
3-7 Target configuration editor - Configuration tab
3-8 LED register and bitfields
3-9 Core module and LCD control register
3-10 Creating a Memory map
3-11 Creating a peripheral
3-12 Creating a standalone register
3-13 Creating a peripheral register
3-14 Creating enumerations
3-15 Assigning enumerations
3-16 Creating remapping rules
3-17 Creating a memory region for remapping by a control register
3-18 Applying the Remap_RAM_block1 map rule
3-19 Applying the Remap_ROM map rule
3-20 Power Domain Configurations
3-21 Creating a group list
3-22 Selecting an existing target configuration file
3-23 Importing the target configuration file
3-24 Exporting to C header file
3-25 Selecting the files
4-1 Load File dialog box
4-2 Load additional debug information dialog box
4-3 Setting an execution breakpoint
4-4 Setting a data watchpoint
4-5 Viewing the properties of a data watchpoint
4-6 Breakpoint Properties dialog
4-7 Debug Control view
4-8 Managing signal handler settings
4-9 Manage exception handler settings
4-10 Path Substitution dialog box
4-11 Edit Substitute Path dialog box
5-1 Target execution environment
5-2 Debug Control view
6-1 Threading call stacks in the Debug Control view
6-2 Adding individual shared library files
6-3 Modifying the shared library search paths
7-1 Typical layout between top of memory, stack, and heap
8-1 Commands generated during a debug session
8-2 PyDev project wizard
8-3 PyDev project settings
8-4 Jython auto-completion and help
8-5 Scripts view
10-1 App Console view
10-2 ARM Asm Info view
10-3 ARM assembler editor
10-4 Breakpoints view
10-5 C/C++ editor
10-6 Show disassembly for selected source line
10-7 Commands view
10-8 Set the current working directory
10-9 Debug Control view
10-10 Disassembly view
10-11 Expressions view
10-12 Functions view
10-13 History view
10-14 Memory view
10-15 Modules view showing shared libraries
10-16 Modules view showing operating system modules
10-17 Registers view
10-18 Typical RTOS view for a RTX table
10-19 Screen buffer parameters for the Fireworks example running on a BeagleBoard
10-20 Screen view
10-21 Scripts view
10-22 Target view
10-23 Trace view with a scale of 1:1
10-24 Trace Control view
10-25 Variables view
10-26 Auto Refresh properties dialog box
10-27 Memory Exporter dialog box
10-28 Memory Importer dialog box
10-29 Memory Fill dialog box
10-30 Export trace report dialog box
10-31 Breakpoint properties dialog box
10-32 Watchpoint properties dialog box
10-33 Tracepoint properties dialog box
10-34 Managing signal handler settings
10-35 Manage exception handler settings
10-36 Function filter dialog box
10-37 Jython Script Parameters dialog box
10-38 Connection configuration for a model using VFS
10-39 File system configuration for an application on a model
10-40 Debugger configuration to set application starting point and search paths
10-41 OS Awareness tab
10-42 Application arguments configuration
10-43 Setting up target environment variables
10-44 Environment configuration for a model
10-45 DTSL configuration editor
10-46 Configuration Database panel
10-47 Remote Systems view
10-48 Remote System Details view
10-49 Terminal view
10-50 Remote Scratchpad
10-51 Remote Systems Terminals view
10-52 Terminal Settings dialog box
12-1 DS-5 File Flash Architecture
13-1 Eclipse preferences for mydb
13-2 Custom OS awareness displayed in Eclipse Debug Configurations dialog
13-3 myos No OS Support
13-4 myos waiting for target to stop
13-5 myos Enabled
13-6 myos waiting for OS initialization
13-7 myos Debug Control view data
13-8 myos Empty Tasks table
13-9 myos populated Tasks table

List of Tables

2-1 ETM/PTM versions for each type of processor
3-1 DMA map register SYS_DMAPSR0
3-2 Control bit that remaps an area of memory
7-1 Log4j Components
10-1 Files tab options available for each Debug operation
10-2 DS-5 Debugger icons
10-3 Perspective icons
10-4 View icons
10-5 View markers
10-6 Miscellaneous icons

Release Information

Document History
Issue Date Confidentiality Change
A 30 June 2010 Non-Confidential First release
B 30 September 2010 Non-Confidential Update for DS-5 version 5.2
C 30 November 2010 Non-Confidential Update for DS-5 version 5.3
D 30 January 2011 Non-Confidential Update for DS-5 version 5.4
E 30 May 2011 Non-Confidential Update for DS-5 version 5.5
F 30 July 2011 Non-Confidential Update for DS-5 version 5.6
G 30 September 2011 Non-Confidential Update for DS-5 version 5.7
H 30 November 2012 Non-Confidential Update for DS-5 version 5.8
I 28 February 2012 Non-Confidential Update for DS-5 version 5.9
J 30 May 2012 Non-Confidential Update for DS-5 version 5.10
K 30 July 2012 Non-Confidential Update for DS-5 version 5.11
L 30 October 2012 Non-Confidential Update for DS-5 version 5.12
M 15 December 2012 Non-Confidential Update for DS-5 version 5.13
N 15 March 2013 Non-Confidential Update for DS-5 version 5.14
O 14 June 2013 Non-Confidential Update for DS-5 version 5.15
P 13 September 2013 Non-Confidential Update for DS-5 version 5.16
Q 13 December 2013 Non-Confidential Update for DS-5 version 5.17

Proprietary Notice

Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM® in the EU and other countries, except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the trademarks of their respective owners.

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

The product described in this document is subject to continuous developments and improvements. All particulars of the product and its use contained in this document are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.

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

Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.

Confidentiality Status

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

Unrestricted Access is an ARM internal classification.

Product Status

The information in this document is Final, that is for a developed product.

Web Address

Non-ConfidentialPDF file icon PDF versionARM DUI0446Q
Copyright © 2010-2013 ARM. All rights reserved.