© 2003 Xilinx, Inc. All Rights Reserved Debugging.

Slides:



Advertisements
Similar presentations
RUAG Aerospace 11 Using SpaceWire as EGSE Interface Anders Petersén, Torbjörn Hult RUAG Aerospace Sweden AB (Saab Space) International SpaceWire Conference.
Advertisements

Presenter : Chien-Hung Chen Tsung-Cheng Lin Kuan-Fu Kuo EICE team Open On-Chip Debugger Ch6. Design and Architecture.
© ABB Group Jun-15 Evaluation of Real-Time Operating Systems for Xilinx MicroBlaze CPU Anders Rönnholm.
BEEKeeper Remote Management and Debugging of Large FPGA Clusters Terry Filiba Navtej Sadhal.
VirtexIIPRO FPGA Device Functional Testing In Space environment. Performed by: Mati Musry, Yahav Bar Yosef Instuctor: Inna Rivkin Semester: Winter/Spring.
Configurable System-on-Chip: Xilinx EDK
The Xilinx EDK Toolset: Xilinx Platform Studio (XPS) Building a base system platform.
Performance Analysis of Processor Characterization Presentation Performed by : Winter 2005 Alexei Iolin Alexander Faingersh Instructor:
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
1 Fast Communication for Multi – Core SOPC Technion – Israel Institute of Technology Department of Electrical Engineering High Speed Digital Systems Lab.
Students:Gilad Goldman Lior Kamran Supervisor:Mony Orbach Part A Presentation Network Sniffer.
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
This material exempt per Department of Commerce license exception TSU Debugging.
Lecture 7 Lecture 7: Hardware/Software Systems on the XUP Board ECE 412: Microcomputer Laboratory.
Programming & Development of Mobile & Embedded Systems Lin Zhong ELEC424, Fall 2010.
© 2011 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU Xilinx Tool Flow.
Introduction Purpose Objectives Content Learning Time
Cortex-M3 Debugging System
Silicon Labs ToolStick Development Platform
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
© 2003 Xilinx, Inc. All Rights Reserved Address Management.
© 2005 Xilinx, Inc. All Rights Reserved This material exempt per Department of Commerce license exception TSU Software Development and Debugging Using.
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
© 2004 Xilinx, Inc. All Rights Reserved EDK Overview.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
집적회로 Spring 2007 Prof. Sang Sik AHN Signal Processing LAB.
Linux development on embedded PowerPC 405 Jarosław Szewiński.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Ch.2 – Introduction to Routers
NIOS II Ethernet Communication Final Presentation
LAB1 Summary Zhaofeng SJTU.SOME. Embedded Software Tools CPU Logic Design Tools I/O FPGA Memory Logic Design Tools FPGA + Memory + IP + High Speed IO.
1 EDK 7.1 Tutorial -- SystemACE and EthernetMAC on Avnet Virtex II pro Development Boards Chia-Tien Dan Lo Department of Computer Science University of.
Part A Presentation Implementation of DSP Algorithm on SoC Student : Einat Tevel Supervisor : Isaschar Walter Accompanying engineer : Emilia Burlak The.
© 2003 Xilinx, Inc. All Rights Reserved System Simulation.
© 2004 Xilinx, Inc. All Rights Reserved Embedded Processor Design.
© 2004 Xilinx, Inc. All Rights Reserved EDK Overview.
This material exempt per Department of Commerce license exception TSU Address Management.
This material exempt per Department of Commerce license exception TSU Xilinx On-Chip Debug.
© 2004 Xilinx, Inc. All Rights Reserved Adding a Processor System to an FPGA Design.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
Proposal for an Open Source Flash Failure Analysis Platform (FLAP) By Michael Tomer, Cory Shirts, SzeHsiang Harper, Jake Johns
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
© 2000 Morgan Kaufman Overheads for Computers as Components Host/target design  Use a host system to prepare software for target system: target system.
ChibiOS/RT Demo A free embedded RTOS
Survey of Reconfigurable Logic Technologies
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
HCS12 Technical Training Module 15 – Break Module Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
SEPTEMBER 8, 2015 Computer Hardware 1-1. HARDWARE TERMS CPU — Central Processing Unit RAM — Random-Access Memory  “random-access” means the CPU can read.
 Wind River Systems, Inc Chapter - 4 CrossWind.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Compute Node Tutorial(2) Agenda Introduce to RocketIO How to build a optical link connection Backplane and cross link communications How to.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Maj Jeffrey Falkinburg Room 2E46E
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
Using Xilinx ChipScope Pro Tools
Debugging with gdb gdb is the GNU debugger on our CS machines.
Lab6 HW/SW System Debug Lab : MicroBlaze
ChipScope Pro Software
Software Setup & Validation
ChipScope Pro Software
Computer System Laboratory
Presentation transcript:

© 2003 Xilinx, Inc. All Rights Reserved Debugging

Debugging © 2003 Xilinx, Inc. All Rights Reserved Objectives After completing this module, you will be able to: Describe GDB functionality Describe XMD functionality Describe the integration of GDB with XMD List supported third-party tools

Debugging © 2003 Xilinx, Inc. All Rights Reserved Outline Introduction GDB Functionality XMD Functionality – MicroBlaze Processor – PowerPC Processor

Debugging © 2003 Xilinx, Inc. All Rights Reserved Introduction Debugging is an integral part of embedded systems development The debugging process is defined as testing, stabilizing, localizing, and correcting errors Two methods of debugging – Hardware debugging via a logic probe, logic analyzer, in-circuit emulator, or background debugger – Software debugging via a debugging instrument A software debugging instrument is source code that is added to the program for the purpose of debugging Debugging types – Functional debugging – Performance debugging

Debugging © 2003 Xilinx, Inc. All Rights Reserved Hardware Debugging Support ChipScope™ Pro cores are now included for adding to a Platform Studio design – PLB IBA (Integrated Bus Analyzer) – OPB IBA – VIO (Virtual I/O) ChipScope Pro evaluation version shipped with EDK – Analyzer evaluation ends after 90 days – Core insertion/generation works indefinitely – Supports Solaris™ OS and Windows® platforms Linux to be added in an upcoming release Enables co-debug of software with GNU gdb and hardware with ChipScope Analyzer

Debugging © 2003 Xilinx, Inc. All Rights Reserved Simultaneous HW/SW Debug ChipScope™ Pro PLB & IBA cores in target ChipScope Pro Analyzer on host GDB debugger on host XMD supports simultaneous access over Xilinx parallel cables PLB/OPB IBA instantiation in XPS – Are treated like the peripheral cores IBA MDM Set breakpoint in GDB – when hit → triggers ChipScope Set trigger in ChipScope – when hit → halts CPU and debugger stops Minimal “skid-by” as cross triggering is done on chip between IBA cores and PPC & MicroBlaze debug interfaces

Debugging © 2003 Xilinx, Inc. All Rights Reserved Simultaneous HW/SW Debug XMD Xilinx Parallel Cable Active trigger when addr bus = 0xC200 Trigger out signal from IBA to CPU debug halt signal in

Debugging © 2003 Xilinx, Inc. All Rights Reserved Software Debugging Support EDK supports software debugging via: – GNU Debugger (GDB) tools Unified interface for debugging and verifying MicroBlaze  and PowerPC  systems – Xilinx Microprocessor Debugger (XMD) Runs all of the hardware debugging tools and communicates with the hardware – GNU tools communicate with hardware through XMD Third-party support – Wind River: SingleStep  XE debugger visionPROBE II  XE debugger – Nohau: EMUL-MicroBlaze-PC  debugger

Debugging © 2003 Xilinx, Inc. All Rights Reserved Outline Introduction GDB Functionality XMD Functionality – MicroBlaze Processor – PowerPC Processor

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB Functionality User Interface Target Hardware (TCP/IP) GDB Remote Protocol JTAG UART PowerPC System MicroBlaze System PPC405 Debug PortJTAG UART UARTlite XMD stub Host Software PowerPC-eabi-gdb Host Software mb-gdb Host Software Tcl/Terminal Interface XMD JTAG MB Cycle-Accurate Instruction Set Simulator JTAG MicroBlaze System MDM Host Software

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB Functionality GDB is a source-level debugger that helps you debug your program: – Start your program – Set breakpoints (make your program stop on specified conditions) – Examine what has happened, when your program encounters breakpoints Registers Memory Stack Variables Expressions – Change things in your program, so you can experiment with correcting the effects of one bug and go on to learn about another You can use GDB to debug programs written in C and C++

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB Memory Location Assembly Instructions C Code

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB GUI Run-time control – S: Step by source lines (Step into functions) – SI: Step by machine instruction – C: Continue to next breakpoint – N: Next source line (Steps over functions) – NI: Next machine instruction – F: Finish (Ignores all breakpoints)

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB Functionality Breakpoints can be enabled or disabled To change any memory value, simply double-click in a memory field

Debugging © 2003 Xilinx, Inc. All Rights Reserved GDB Functionality Blue represents registers that have changed To change any value, double-click in a field

Debugging © 2003 Xilinx, Inc. All Rights Reserved Outline Introduction GDB Functionality XMD Functionality – MicroBlaze Processor – PowerPC Processor

Debugging © 2003 Xilinx, Inc. All Rights Reserved XMD Functionality User Interface Target Hardware (TCP/IP) GDB Remote Protocol JTAG UART PowerPC System MicroBlaze System PPC405 Debug PortJTAG UART UARTlite XMD stub Host Software PowerPC-eabi-gdb Host Software mb-gdb Host Software Tcl/Terminal Interface XMD JTAG MB Cycle-Accurate Instruction Set Simulator JTAG MicroBlaze System MDM Host Software

Debugging © 2003 Xilinx, Inc. All Rights Reserved XMD Functionality Xilinx Microprocessor Debug (XMD) engine – A program that facilitates a unified GDB interface – A Tcl (Tool command language) interface XMD supports debugging user programs on different targets – Cycle-accurate MicroBlaze  processor instruction set simulator – MicroBlaze system running xmdstub on a hardware board – MicroBlaze system using MDM peripheral – PowerPC  system on a hardware board mb-gdb and powerpc-eabi-gdb communicate with xmd by using the Remote TCP protocol and control the corresponding targets GDB can connect to xmd on the same computer or on a remote computer on the Internet

Debugging © 2003 Xilinx, Inc. All Rights Reserved XMD Tcl Interface x? - lists all Tcl commands xrmem target addr [ num ] - Reads num bytes or 1 byte from the memory address addr xwmem target addr value - Writes an 8-bit byte value at the specified memory addr xrreg target [ reg ] - Reads all registers or only register number reg xwreg target reg value - Writes a 32-bit value into register number reg xdownload target [-data] filename [ addr ] - Downloads the given ELF or data file (with -data option) onto the memory of the current target xcontinue target [ addr ] - Continues execution from the current PC or from the optional address argument xstep target - Single steps one MicroBlaze  processor instruction. If the PC is at an IMM instruction, the next instruction is executed as well

Debugging © 2003 Xilinx, Inc. All Rights Reserved Outline Introduction GDB Functionality XMD Functionality – MicroBlaze Processor – PowerPC Processor

Debugging © 2003 Xilinx, Inc. All Rights Reserved MicroBlaze Processor: XMD There are three ways to debug MicroBlaze  processor code: – OPB JTAG UART core Intrusive: requires xmdstub software – OPB UART core Intrusive: requires xmdstub software – OPB MDM core Non-intrusive: hardware interface MicroBlaze (TCP/IP) GDB Remote Protocol UART Host Software mb-gdb Host Software Tcl/Terminal Interface XMD JTAG MB Cycle-Accurate Instruction Set Simulator JTAG UART MDM OPB Bus

Debugging © 2003 Xilinx, Inc. All Rights Reserved MicroBlaze Processor: XMD MicroBlaze  processor stub target (xmdstub) – User programs can be downloaded or executed directly from mb-gdb To debug programs on the hardware by using xmdstub 1. A JTAG UART or a UART must be included in the hardware system 2. A JTAG UART or a UART must be specified as the DEBUG_PERIPHERAL 3. The xmdstub executable must be included in the MicroBlaze processor’s local memory at system startup Sample session of XMD with a hardware stub target – XMD% mbconnect stub -comm jtag -posit 2 Connect to a MicroBlaze processor target via a stub, using JTAC communication, and an FPGA which is second in the JTAG chain

Debugging © 2003 Xilinx, Inc. All Rights Reserved MicroBlaze Processor: XMD MicroBlaze processor simulator target mb-gdb and xmd can be used to debug programs on the cycle-accurate simulator built into XMD Simulator target requirements – Programs should be compiled for debugging and should be linked with the startup code in crt0.o – Programs can have a maximum size of 64 KB only – Does not support the simulation of OPB peripherals Sample session of XMD and GDB – XMD% mbconnect sim

Debugging © 2003 Xilinx, Inc. All Rights Reserved MicroBlaze Processor: XMD MicroBlaze  processor MDM (hardware OPB_MDM debug core on-board) The MDM target supports non-intrusive debugging by using: – Hardware breakpoints – Hardware single step – This removes the need to run xmdstub – This removes the requirement to have large memory Sample session of XMD and GDB – XMD% mbconnect mdm

Debugging © 2003 Xilinx, Inc. All Rights Reserved XMD Options mbconnect [ options ] Simulator target options – -memsize size xmdstub target options – -comm – -posit device position – -chain device count – -port serial port – -baud baud rate

Debugging © 2003 Xilinx, Inc. All Rights Reserved Outline Introduction GDB Functionality XMD Functionality – MicroBlaze Processor – PowerPC Processor

Debugging © 2003 Xilinx, Inc. All Rights Reserved PowerPC Processor: XMD Use xmd to connect a hardware PowerPC  target over a JTAG connection to a board containing a Virtex-II Pro  device Use the ppcconnect command to connect to the PowerPC processor target and start a remote GDB server (TCP/IP) GDB Remote Protocol JTAG PowerPC System PPC405 Debug Port Host Software PowerPC-eabi-gdb Host Software Tcl/Terminal Interface XMD

Debugging © 2003 Xilinx, Inc. All Rights Reserved A Debugging Sample Compile with the debugging option 1 Download the bitstream 2 This will go through the necessary steps, generate a bitstream file, and download the file

Debugging © 2003 Xilinx, Inc. All Rights Reserved Start XMD Start the XMD shell 3 In XMD, type ppc to connect to the hardware 4 This opens a connection with the hardware, indicating the connecting port, caches, DCR, TLB enabled or not

Debugging © 2003 Xilinx, Inc. All Rights Reserved Start Software Debugger 5 A source code window will be displayed A source code window will be displayed 6 Change the code window display from SOURCE to MIXED to show C and assembly code

Debugging © 2003 Xilinx, Inc. All Rights Reserved Software Debugger Connect A window displaying C and assembly code A window displaying C and assembly code 7 Select the target as Remote/TCP: XMD Select the target as Remote/TCP: XMD 8 Enter that port number that was displayed during ppc-connect

Debugging © 2003 Xilinx, Inc. All Rights Reserved Debug Program Set any breakpoints as necessary 9 Click the Run button 10 When a breakpoint is encountered, the debugger will stop 11 View the necessary windows 12 Exit debugger by typing quit in the console window

Debugging © 2003 Xilinx, Inc. All Rights Reserved Skills Check

Debugging © 2003 Xilinx, Inc. All Rights Reserved Review Questions What is the XMD command line used to connect to a MicroBlaze  processor core via JTAG? What is the advantage of using MDM over a JTAG UART? Into what parts of the design do debuggers provide visibility?

Debugging © 2003 Xilinx, Inc. All Rights Reserved Answers What is the XMD command line used to connect to a MicroBlaze  processor core via JTAG? – XMD% mbconnect stub -comm jtag -posit 2 What is the advantage of using MDM over a JTAG UART? – Non-intrusive – Less memory required Into what parts of the design do debuggers provide visibility? – Registers – Memory – Stack – Variables – Expressions

Debugging © 2003 Xilinx, Inc. All Rights Reserved Where Can I Learn More? Tool documentation – Embedded System Tools Guide  GNU Compiler Tools – Embedded System Tools Guide  GNU Debugger – Embedded System Tools Guide  Xilinx Microprocessor Debugger Support website – EDK Home Page: support.xilinx.com/edk