Tour of the DS-5 Debugger Using Gnometris

Total Page:16

File Type:pdf, Size:1020Kb

Tour of the DS-5 Debugger Using Gnometris DS-5 Workshop: Linux Kernel and Application Debug, Trace and Profile on Snowball Copyright 2010-2013 ARM Ltd. All rights reserved. This workshop demonstrates the features of the DS-5 Debugger by debugging and tracing U-Boot, the Linux kernel and a game called Gnometris that is an ARM Linux application running on the target. It also demonstrates the ARM Streamline profiler using an application called Xaos. It will introduce the views of DS-5 Debugger and ARM Streamline and demonstrate their features. Some of the features are used in explicit instructions that you are expected to follow and are marked with this symbol . Other features are only mentioned and are not critical to the flow of the workshop. You don't have to use them, but you are generally encouraged to try them out anyway. We will use a Snowball board as the target, but DS-5 can also be used with any ARM Linux target that has networking or the Real Time System Models that come with DS-5. The Gnometris and Xaos applications that we will be using are supplied as examples with DS-5. (version 31 January 2013; v5.13 d1622; HW; HWCortex-A9; DSTREAM; DSTREAMLinaro; DSTREAMSnowball; Snowball) Contents DS-5 Workshop: Linux Kernel and Application Debug, Trace and Profile on Snowball ................................................... 1 Preparation ..................................................................................................................................................................................... 2 Host Setup ................................................................................................................................................................................. 2 Target Setup .............................................................................................................................................................................. 2 Starting Eclipse .......................................................................................................................................................................... 2 Installing a DS-5 License ........................................................................................................................................................... 2 Bare-metal Debug and Trace (U-Boot) ........................................................................................................................................... 4 Setting up your own target: Download, build and setup U-Boot ................................................................................................. 4 Connect the hardware................................................................................................................................................................ 4 Debugging U-Boot on the target ................................................................................................................................................ 5 Quick tour of the debugger ...................................................................................................................................................... 10 Trace view ............................................................................................................................................................................... 12 Registers view ......................................................................................................................................................................... 15 Watchpoints ............................................................................................................................................................................. 15 Functions view ......................................................................................................................................................................... 16 Kernel and module debug ............................................................................................................................................................. 20 Setting up your own target: Download the Linux kernel symbols and sources ........................................................................ 20 Debugging the kernel before the MMU is on ............................................................................................................................ 20 Debugging the kernel initialisation after the MMU is on ........................................................................................................... 22 Peripheral Registers ................................................................................................................................................................ 28 Application debug ......................................................................................................................................................................... 33 Starting the X server on the Host ............................................................................................................................................. 33 Importing Gnometris ................................................................................................................................................................ 34 Connecting to the Target ......................................................................................................................................................... 34 Debugging Gnometris on the Target ........................................................................................................................................ 36 Detailed Debugging ................................................................................................................................................................. 40 Functions view ......................................................................................................................................................................... 40 Breakpoints .............................................................................................................................................................................. 41 Source and Disassembly views ............................................................................................................................................... 43 Variables view .......................................................................................................................................................................... 44 Stepping ................................................................................................................................................................................... 48 Registers view ......................................................................................................................................................................... 49 Debug Control view ................................................................................................................................................................. 50 Call Stack ................................................................................................................................................................................. 50 Play the game .......................................................................................................................................................................... 51 Gaming the game .................................................................................................................................................................... 52 Expressions view ..................................................................................................................................................................... 52 Expression Inspector view ....................................................................................................................................................... 53 Memory view ............................................................................................................................................................................ 53 Commands and History views ................................................................................................................................................. 56 Scripts view .............................................................................................................................................................................. 57 Breakpoint scripts .................................................................................................................................................................... 57 Show off your skills .................................................................................................................................................................. 58 Advanced Breakpoints ............................................................................................................................................................. 58 More features in Source and Disassembly views .................................................................................................................... 58 Shared Libraries and Modules view ......................................................................................................................................... 60 Change of topic ...........................................................................................................................................................................
Recommended publications
  • Chapter 1: Introduction What Is an Operating System?
    Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real -Time Systems Handheld Systems Computing Environments Operating System Concepts 1.1 Silberschatz, Galvin and Gagne 2002 What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals: ) Execute user programs and make solving user problems easier. ) Make the computer system convenient to use. Use the computer hardware in an efficient manner. Operating System Concepts 1.2 Silberschatz, Galvin and Gagne 2002 1 Computer System Components 1. Hardware – provides basic computing resources (CPU, memory, I/O devices). 2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. 3. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4. Users (people, machines, other computers). Operating System Concepts 1.3 Silberschatz, Galvin and Gagne 2002 Abstract View of System Components Operating System Concepts 1.4 Silberschatz, Galvin and Gagne 2002 2 Operating System Definitions Resource allocator – manages and allocates resources. Control program – controls the execution of user programs and operations of I/O devices . Kernel – the one program running at all times (all else being application programs).
    [Show full text]
  • Hematopoietic and Lymphoid Neoplasm Coding Manual
    Hematopoietic and Lymphoid Neoplasm Coding Manual Effective with Cases Diagnosed 1/1/2010 and Forward Published August 2021 Editors: Jennifer Ruhl, MSHCA, RHIT, CCS, CTR, NCI SEER Margaret (Peggy) Adamo, BS, AAS, RHIT, CTR, NCI SEER Lois Dickie, CTR, NCI SEER Serban Negoita, MD, PhD, CTR, NCI SEER Suggested citation: Ruhl J, Adamo M, Dickie L., Negoita, S. (August 2021). Hematopoietic and Lymphoid Neoplasm Coding Manual. National Cancer Institute, Bethesda, MD, 2021. Hematopoietic and Lymphoid Neoplasm Coding Manual 1 In Appreciation NCI SEER gratefully acknowledges the dedicated work of Drs, Charles Platz and Graca Dores since the inception of the Hematopoietic project. They continue to provide support. We deeply appreciate their willingness to serve as advisors for the rules within this manual. The quality of this Hematopoietic project is directly related to their commitment. NCI SEER would also like to acknowledge the following individuals who provided input on the manual and/or the database. Their contributions are greatly appreciated. • Carolyn Callaghan, CTR (SEER Seattle Registry) • Tiffany Janes, CTR (SEER Seattle Registry) We would also like to give a special thanks to the following individuals at Information Management Services, Inc. (IMS) who provide us with document support and web development. • Suzanne Adams, BS, CTR • Ginger Carter, BA • Sean Brennan, BS • Paul Stephenson, BS • Jacob Tomlinson, BS Hematopoietic and Lymphoid Neoplasm Coding Manual 2 Dedication The Hematopoietic and Lymphoid Neoplasm Coding Manual (Heme manual) and the companion Hematopoietic and Lymphoid Neoplasm Database (Heme DB) are dedicated to the hard-working cancer registrars across the world who meticulously identify, abstract, and code cancer data.
    [Show full text]
  • S5U1C88816P Manual (Peripheral Circuit Board for S1C88816/8F360)
    MF1337-02a CMOS 8-BIT SINGLE CHIP MICROCOMPUTER S5U1C88816P Manual (Peripheral Circuit Board for S1C88816/8F360) NOTICE No part of this material may be reproduced or duplicated in any form or by any means without the written permission of Seiko Epson. Seiko Epson reserves the right to make changes to this material without notice. Seiko Epson does not assume any liability of any kind arising out of any inaccuracies contained in this material or due to its application or use in any product or circuit and, further, there is no representation that this material is applicable to products requiring high level reliability, such as medical products. Moreover, no license to any intellectual property rights is granted by implication or otherwise, and there is no representation or warranty that anything made in accordance with this material will be free from any patent or copyright infringement of a third party. This material or portions thereof may contain technology or the subject relating to strategic products under the control of the Foreign Exchange and Foreign Trade Law of Japan and may require an export license from the Ministry of International Trade and Industry or other approval from another government agency. © SEIKO EPSON CORPORATION 2001 All rights reserved. Configuration of product number Devices S1 C 88104 F 0A01 00 Packing specifications 00 : Besides tape & reel 0A : TCP BL 2 directions 0B : Tape & reel BACK 0C : TCP BR 2 directions 0D : TCP BT 2 directions 0E : TCP BD 2 directions 0F : Tape & reel FRONT 0G : TCP BT 4 directions 0H
    [Show full text]
  • The Effect of Muscular Exercise on the Blood Ammonia Concentration in Man
    Yale University EliScholar – A Digital Platform for Scholarly Publishing at Yale Yale Medicine Thesis Digital Library School of Medicine 1959 The effect of muscular exercise on the blood ammonia concentration in man. With particular reference to patients with Laennec's Cirrhosis Scott nI gram Allen Yale University Follow this and additional works at: http://elischolar.library.yale.edu/ymtdl Recommended Citation Allen, Scott nI gram, "The effect of muscular exercise on the blood ammonia concentration in man. With particular reference to patients with Laennec's Cirrhosis" (1959). Yale Medicine Thesis Digital Library. 2334. http://elischolar.library.yale.edu/ymtdl/2334 This Open Access Thesis is brought to you for free and open access by the School of Medicine at EliScholar – A Digital Platform for Scholarly Publishing at Yale. It has been accepted for inclusion in Yale Medicine Thesis Digital Library by an authorized administrator of EliScholar – A Digital Platform for Scholarly Publishing at Yale. For more information, please contact [email protected]. VALE UNIVERSITY LIBRARY 3 9002 067 2 1757 CONCENTRATION IN MAN .A ixMt* MUDD LIBRARY Medical YALE MEDICAL LIBRARY Digitized by the Internet Archive in 2017 with funding from The National Endowment for the Humanities and the Arcadia Fund https://archive.org/details/effectofmuscularOOalle THE EFFECT OF MUSCULAR EXERCISE OH THE BLOOD AMMONIA CONCENTRATION IN MAN With Particular Reference To Patients With Laennec's Cirrhosis by Scott I. Allen, A.B. Nl Pomona College, 1955 A Thesis Submitted to the Faculty of the Yale University School of Medicine In Candidacy for the Degree of Doctor of Medicine Department of Internal.
    [Show full text]
  • Personal-Computer Systems • Parallel Systems • Distributed Systems • Real -Time Systems
    Module 1: Introduction • What is an operating system? • Simple Batch Systems • Multiprogramming Batched Systems • Time-Sharing Systems • Personal-Computer Systems • Parallel Systems • Distributed Systems • Real -Time Systems Applied Operating System Concepts 1.1 Silberschatz, Galvin, and Gagne Ď 1999 What is an Operating System? • A program that acts as an intermediary between a user of a computer and the computer hardware. • Operating system goals: – Execute user programs and make solving user problems easier. – Make the computer system convenient to use. • Use the computer hardware in an efficient manner. Applied Operating System Concepts 1.2 Silberschatz, Galvin, and Gagne Ď 1999 Computer System Components 1. Hardware – provides basic computing resources (CPU, memory, I/O devices). 2. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. 3. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4. Users (people, machines, other computers). Applied Operating System Concepts 1.3 Silberschatz, Galvin, and Gagne Ď 1999 Abstract View of System Components Applied Operating System Concepts 1.4 Silberschatz, Galvin, and Gagne Ď 1999 Operating System Definitions • Resource allocator – manages and allocates resources. • Control program – controls the execution of user programs and operations of I/O devices . • Kernel – the one program running at all times (all else being application programs). Applied Operating System Concepts 1.5 Silberschatz, Galvin, and Gagne Ď 1999 Memory Layout for a Simple Batch System Applied Operating System Concepts 1.7 Silberschatz, Galvin, and Gagne Ď 1999 Multiprogrammed Batch Systems Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.
    [Show full text]
  • Energy Estimation of Peripheral Devices in Embedded Systems Ozgur Celebican Vincent J
    Energy Estimation of Peripheral Devices in Embedded Systems Ozgur Celebican Vincent J. Mooney III Center for Research on Embedded Tajana Simunic Rosing Center for Research on Embedded Systems and Technology, Hewlett-Packard Labs Systems and Technology, Electrical and Computer Engineering Palo Alto, CA, 94304-1126, USA Electrical and Computer Georgia Institute of Technology (1) 650 725 3647 Engineering Atlanta, GA, 30332-0250, USA [email protected] Georgia Institute of Technology (1) 404 3851722 Atlanta, GA, 30332-0250, USA [email protected] (1) 404 3850437 [email protected] ABSTRACT system. While increasing the energy capacity of the system is one approach to solve the problem, another approach is to optimize the This paper introduces a methodology for estimation of energy energy consumption of the system. A significant ratio of the energy consumption in peripherals such as audio and video devices. consumption for a state-of-the-art embedded system comes from Peripherals can be responsible for significant amount of the energy peripheral devices such as audio, video or network devices. Up to consumption in current embedded systems. We introduce a cycle- now, energy optimization for peripheral devices has been done with accurate energy simulator and profiler capable of simulating restricted methods. One method is to add up datasheet values for peripheral devices. Our energy estimation tool for peripherals can be each component. This method can give a rough estimate but cannot useful for hardware and software energy optimization of multimedia show effects of software. Another method is using prototypes. applications and device drivers. The simulator and profiler use Prototypes can give exact energy and performance numbers, but the cycle-accurate energy and performance models for peripheral devices cost of the prototype and time spent building the prototype is huge.
    [Show full text]
  • Operating System
    OPERATING SYSTEM INDEX LESSON 1: INTRODUCTION TO OPERATING SYSTEM LESSON 2: FILE SYSTEM – I LESSON 3: FILE SYSTEM – II LESSON 4: CPU SCHEDULING LESSON 5: MEMORY MANAGEMENT – I LESSON 6: MEMORY MANAGEMENT – II LESSON 7: DISK SCHEDULING LESSON 8: PROCESS MANAGEMENT LESSON 9: DEADLOCKS LESSON 10: CASE STUDY OF UNIX LESSON 11: CASE STUDY OF MS-DOS LESSON 12: CASE STUDY OF MS-WINDOWS NT Lesson No. 1 Intro. to Operating System 1 Lesson Number: 1 Writer: Dr. Rakesh Kumar Introduction to Operating System Vetter: Prof. Dharminder Kr. 1.0 OBJECTIVE The objective of this lesson is to make the students familiar with the basics of operating system. After studying this lesson they will be familiar with: 1. What is an operating system? 2. Important functions performed by an operating system. 3. Different types of operating systems. 1. 1 INTRODUCTION Operating system (OS) is a program or set of programs, which acts as an interface between a user of the computer & the computer hardware. The main purpose of an OS is to provide an environment in which we can execute programs. The main goals of the OS are (i) To make the computer system convenient to use, (ii) To make the use of computer hardware in efficient way. Operating System is system software, which may be viewed as collection of software consisting of procedures for operating the computer & providing an environment for execution of programs. It’s an interface between user & computer. So an OS makes everything in the computer to work together smoothly & efficiently. Figure 1: The relationship between application & system software Lesson No.
    [Show full text]
  • COSC 6385 Computer Architecture - Multi-Processors (IV) Simultaneous Multi-Threading and Multi-Core Processors Edgar Gabriel Spring 2011
    COSC 6385 Computer Architecture - Multi-Processors (IV) Simultaneous multi-threading and multi-core processors Edgar Gabriel Spring 2011 Edgar Gabriel Moore’s Law • Long-term trend on the number of transistor per integrated circuit • Number of transistors double every ~18 month Source: http://en.wikipedia.org/wki/Images:Moores_law.svg COSC 6385 – Computer Architecture Edgar Gabriel 1 What do we do with that many transistors? • Optimizing the execution of a single instruction stream through – Pipelining • Overlap the execution of multiple instructions • Example: all RISC architectures; Intel x86 underneath the hood – Out-of-order execution: • Allow instructions to overtake each other in accordance with code dependencies (RAW, WAW, WAR) • Example: all commercial processors (Intel, AMD, IBM, SUN) – Branch prediction and speculative execution: • Reduce the number of stall cycles due to unresolved branches • Example: (nearly) all commercial processors COSC 6385 – Computer Architecture Edgar Gabriel What do we do with that many transistors? (II) – Multi-issue processors: • Allow multiple instructions to start execution per clock cycle • Superscalar (Intel x86, AMD, …) vs. VLIW architectures – VLIW/EPIC architectures: • Allow compilers to indicate independent instructions per issue packet • Example: Intel Itanium series – Vector units: • Allow for the efficient expression and execution of vector operations • Example: SSE, SSE2, SSE3, SSE4 instructions COSC 6385 – Computer Architecture Edgar Gabriel 2 Limitations of optimizing a single instruction
    [Show full text]
  • Chapter 20: the Linux System
    Chapter 20: The Linux System Operating System Concepts – 10th dition Silberschatz, Galvin and Gagne ©2018 Chapter 20: The Linux System Linux History Design Principles Kernel Modules Process Management Scheduling Memory Management File Systems Input and Output Interprocess Communication Network Structure Security Operating System Concepts – 10th dition 20!2 Silberschatz, Galvin and Gagne ©2018 Objectives To explore the history o# the UNIX operating system from hich Linux is derived and the principles upon which Linux’s design is based To examine the Linux process model and illustrate how Linux schedules processes and provides interprocess communication To look at memory management in Linux To explore how Linux implements file systems and manages I/O devices Operating System Concepts – 10th dition 20!" Silberschatz, Galvin and Gagne ©2018 History Linux is a modern, free operating system (ased on $NIX standards First developed as a small (ut sel#-contained kernel in -.91 by Linus Torvalds, with the major design goal o# UNIX compatibility, released as open source Its history has (een one o# collaboration by many users from all around the orld, corresponding almost exclusively over the Internet It has been designed to run efficiently and reliably on common PC hardware, but also runs on a variety of other platforms The core Linux operating system kernel is entirely original, but it can run much existing free UNIX soft are, resulting in an entire UNIX-compatible operating system free from proprietary code Linux system has
    [Show full text]
  • UNIT 2 PERPHERAL DEVICES a Peripheral Device Connects to a Computer System to Add Functionality
    UNIT 2 PERPHERAL DEVICES A peripheral device connects to a computer system to add functionality. Examples are a mouse, keyboard, monitor, printer and scanner. Learn about the different types of peripheral devices and how they allow you to do more with your computer. Definition. Say you just bought a new computer and, with excitement, you unpack it and set it all up. The first thing you want to do is print out some photographs of the last family party. So it's time to head back to the store to buy a printer. A printer is known as a peripheral device. A computer peripheral is a device that is connected to a computer but is not part of the core computer architecture. The core elements of a computer are the central processing unit, power supply, motherboard and the computer case that contains those three components. Technically speaking, everything else is considered a peripheral device. However, this is a somewhat narrow view, since various other elements are required for a computer to actually function, such as a hard drive and random-access memory (or RAM). Most people use the term peripheral more loosely to refer to a device external to the computer case. You connect the device to the computer to expand the functionality of the system. For example, consider a printer. Once the printer is connected to a computer, you can print out documents. Another way to look at peripheral devices is that they are dependent on the computer system. For example, most printers can't do much on their own, and they only become functional when connected to a computer system.
    [Show full text]
  • The UNIX Time- Sharing System
    1. Introduction There have been three versions of UNIX. The earliest version (circa 1969–70) ran on the Digital Equipment Cor- poration PDP-7 and -9 computers. The second version ran on the unprotected PDP-11/20 computer. This paper describes only the PDP-11/40 and /45 [l] system since it is The UNIX Time- more modern and many of the differences between it and older UNIX systems result from redesign of features found Sharing System to be deficient or lacking. Since PDP-11 UNIX became operational in February Dennis M. Ritchie and Ken Thompson 1971, about 40 installations have been put into service; they Bell Laboratories are generally smaller than the system described here. Most of them are engaged in applications such as the preparation and formatting of patent applications and other textual material, the collection and processing of trouble data from various switching machines within the Bell System, and recording and checking telephone service orders. Our own installation is used mainly for research in operating sys- tems, languages, computer networks, and other topics in computer science, and also for document preparation. UNIX is a general-purpose, multi-user, interactive Perhaps the most important achievement of UNIX is to operating system for the Digital Equipment Corpora- demonstrate that a powerful operating system for interac- tion PDP-11/40 and 11/45 computers. It offers a number tive use need not be expensive either in equipment or in of features seldom found even in larger operating sys- human effort: UNIX can run on hardware costing as little as tems, including: (1) a hierarchical file system incorpo- $40,000, and less than two man years were spent on the rating demountable volumes; (2) compatible file, device, main system software.
    [Show full text]
  • A Requirements Modeling Language for the Component Behavior of Cyber Physical Robotics Systems
    A Requirements Modeling Language for the Component Behavior of Cyber Physical Robotics Systems Jan Oliver Ringert, Bernhard Rumpe, and Andreas Wortmann RWTH Aachen University, Software Engineering, Aachen, Germany {ringert,rumpe,wortmann}@se-rwth.de Abstract. Software development for robotics applications is a sophisticated en- deavor as robots are inherently complex. Explicit modeling of the architecture and behavior of robotics application yields many advantages to cope with this complexity by identifying and separating logically and physically independent components and by hierarchically structuring the system under development. On top of component and connector models we propose modeling the requirements on the behavior of robotics software components using I/O! automata [29]. This approach facilitates early simulation of requirements model, allows to subject these to formal analysis and to generate the software from them. In this paper, we introduce an extension of the architecture description language MontiArc to model the requirements on components with I/O! automata, which are defined in the spirit of Martin Glinz’ Statecharts for requirements modeling [10]. We fur- thermore present a case study based on a robotics application generated for the Lego NXT robotic platform. “In der Robotik dachte man vor 30 Jahren, dass man heute alles perfekt beherrschen würde”, Martin Glinz [38] 1 Introduction Robotics is a field of Cyber-Physical Systems (CPS) which yields complex challenges due to the variety of robots, their forms of use and the overwhelming complexity of the possible environments they have to operate in. Software development for robotics ap- plications is still at least as complex as it was 30 years ago: even a simple robot requires the integration of multiple distributed software components.
    [Show full text]