Raspberry Pi debugging with JTAG

Similar documents
Section 24. Programming and Diagnostics

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

Section 24. Programming and Diagnostics

Embest Emlink for ARM Cortex-M3. User Manual

OpenOCD - Beyond Simple Software Debugging

Using the XC9500/XL/XV JTAG Boundary Scan Interface

SignalTap Plus System Analyzer

Tools to Debug Dead Boards

CoLinkEx JTAG/SWD adapter USER MANUAL

Chapter 19 IEEE Test Access Port (JTAG)

3. Configuration and Testing

Product Update. JTAG Issues and the Use of RT54SX Devices

Testing Sequential Logic. CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Testing Sequential Logic (cont d) Testing Sequential Logic (cont d)

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Ilmenau, 9 Dec 2016 Testing and programming PCBA s. 1 JTAG Technologies

Laboratory Exercise 4

7 Nov 2017 Testing and programming PCBA s

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies

Comparing JTAG, SPI, and I2C

A Primer: ARM Trace. Including: ETM, ETB and Serial Wire Viewer, JTAG and SWD V 2.1

Remote programming. On-Board Computer

Ashling Product Brief APB219 v1.0.3, 12 th October 2018

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies

Training JTAG Interface

SAU510-USB ISO PLUS v.2 JTAG Emulator. User s Guide 2013.

Using the XSV Board Xchecker Interface

MSP430-HG2231 development board Users Manual

@DonAndrewBailey

12. IEEE (JTAG) Boundary-Scan Testing for the Cyclone III Device Family

Virtex-II Pro and VxWorks for Embedded Solutions. Systems Engineering Group

SPI Serial Communication and Nokia 5110 LCD Screen

XJTAG DFT Assistant for

of Boundary Scan techniques.

DSTREAM ARM. System and Interface Design Reference. Version 4.4. Copyright ARM. All rights reserved. ARM DUI 0499E (ID091611)

Introduction to JTAG / boundary scan-based testing for 3D integrated systems. (C) GOEPEL Electronics -

The Haply Development Kit

BABAR IFR TDC Board (ITB): system design

ARM JTAG Interface Specifications

MSP430-H2618 development board Users Manual

XJTAG DFT Assistant for

XJTAG DFT Assistant for

XJTAG DFT Assistant for

Design and Implementation of an AHB VGA Peripheral

BTW03 DESIGN CONSIDERATIONS IN USING AS A BACKPLANE TEST BUS International Test Conference. Pete Collins

In-System Programmability Guidelines

On-Chip Instrumentation and In-Silicon Debug Tools for SoC Dr. Neal Stollon HDL Dynamics

AN1775 APPLICATION NOTE

Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG

Document Part Number: Copyright 2010, Corelis Inc.

Dynamic Animation Cube Group 1 Joseph Clark Michael Alberts Isaiah Walker Arnold Li

UNIT IV CMOS TESTING. EC2354_Unit IV 1

Y. Tsiatouhas. VLSI Systems and Computer Architecture Lab. Boundary Scan (JTAG ) 2

SµMMIT E & LXE/DXE JTAG Testability for the SJ02 Die

JRC ( JTAG Route Controller ) Data Sheet

Lecture 17: Introduction to Design For Testability (DFT) & Manufacturing Test

Connecting To and Programming the LPC2148 Blue Board. Method 1 ISP (In-System Programming) w/ Flash Magic

Image generator. Hardware Specification

Serial Peripheral Interface

JTAG Test Controller

Solutions to Embedded System Design Challenges Part II

RX460 4GB PCIEX16 4 X DisplayPort

Instruction manual Universal Fieldbus-Gateway UNIGATE IC - RS

Saving time & money with JTAG

DMC550 Technical Reference

Memec Spartan-II LC User s Guide

JTAG ICE... User Guide

Logic Analysis Basics

Logic Analysis Basics

SµMMIT E & LXE/DXE Built-In-Self-Test Functionality for the JA01 Die

APPLICATION NOTE 4312 Getting Started with DeepCover Secure Microcontroller (MAXQ1850) EV KIT and the CrossWorks Compiler for the MAXQ30

the Boundary Scan perspective

Configuring FLASHlogic Devices

How to Enable Debugging for FLEXSPI NOR Flash

Enhancing the TMS320C6713 DSK for DSP Education

Unit V Design for Testability

OpenXLR8: How to Load Custom FPGA Blocks

Laptop Lcd To Vga Interface Circuit Diagram

Chenguang Guo, Lei Chen, and Yanlong Zhang

CMOS Testing-2. Design for testability (DFT) Design and Test Flow: Old View Test was merely an afterthought. Specification. Design errors.

APPLICATION NOTE. Atmel AVR32850: ATSAM4L-EK User Guide. Atmel SAM4L. Features. Introduction

BUSES IN COMPUTER ARCHITECTURE

Device 1 Device 2 Device 3 Device 4

Spider. datasheet V 1.0. Communication and fault injection of embedded chips. rev 1

STA2051E VESPUCCI 32-BIT SINGLE CHIP BASEBAND CONTROLLER FOR GPS AND TELEMATIC APPLICATIONS 1 FEATURES. Figure 1. Packages

This is part 4 of our ShanghaiTech Lecture on Asynchronous Computing.

Certus TM Silicon Debug: Don t Prototype Without It by Doug Amos, Mentor Graphics

An Approach to Raspberry Pi Synchronization in a Multimedia Projection System for Applications in Presentation of Historical and Cultural Heritage

EEM Digital Systems II

11. JTAG Boundary-Scan Testing in Stratix V Devices

LAX_x Logic Analyzer

Manual Version Ver 1.0

Remote Diagnostics and Upgrades

Error connecting to the target: TMS320F28379D. 1 Error message on connecting the target.

Embedded Master Module

Make technology more simple, Make life more intelligent. Firefly-PX3-SE. Product. Specifications. Version Date Updated content

Digital Integrated Circuits Lecture 19: Design for Testability

IEEE Standard (JTAG) in the Axcelerator Family

SWITCH: Microcontroller Touch-switch Design & Test (Part 2)

2.13inch e-paper HAT (D) User Manual

DX-10 tm Digital Interface User s Guide

Transcription:

Arseny Kurnikov Aalto University December 13, 2013

Outline JTAG JTAG on RPi Linux kernel debugging

JTAG Joint Test Action Group is a standard for a generic transport interface for integrated circuits. Boundary scan - read the outputs of the pins Debugging - if a board has debug ports (TAP - test access port)

JTAG signals and registers Registers Signals Data Register - read/write the data Instruction Register - data register selector Test Data In (TDI) - write data Test Data Out (TDO) - read data Test Clock (TDI) - synchronization Test Mode Select (TMS) - state diagram transitions Other optional signals for a specific circuit. For example TRST, System Reset.

JTAG transition diagram

JTAG hardware Adapter that implements JTAG for a particular board. Throughput Voltage range Supported host software Price

Raspberry Pi ARM processor, 700 MHz 256 Mb - 512 Mb of RAM HDMI output Runs Linux 1 Image courtesy of Switched On Tech Design (www.sotechdesign.com.au)

RPi GPIO General Purpose Input Output. UART (Universal Asyncrhonous Receiver/Transmitter) - serial port SPI (Serial Peripheral Interface) I 2 C (Inter Integrated Circuit) PWM (Pulse Width Modulator) ARM JTAG

GPIO function selection Alternative functions on the same pins. Selection registers Table: RPi GPIO configuration for JTAG Register Pin Configuration JTAG signal GPFSEL0 GPIO4 ALT5 TDI GPFSEL2 GPIO22 ALT4 TRST GPFSEL2 GPIO24 ALT4 TDO GPFSEL2 GPIO25 ALT4 TCK GPFSEL2 GPIO27 ALT4 TMS

RPi booting GPU boots from ROM The execution is passed to kernel.img on SD card

Configure JTAG on RPi The snapshot is from the JTAG enabling program 1.... ra = GET32(GPFSEL0); ra &= ~(7<<12); //gpio4 ra = 2<<12; //gpio4 alt5 ARM_TDI PUT32(GPFSEL0,ra);... 1 David Welch, https://github.com/dwelch67

Principal setup

OpenOCD Open On-Chip Debugger. JTAG and SWD (Serial Wire Debug) Boundary scan and debug GDB protocol for various processors

OpenOCD configuration for the adapter interface ft2232 ft2232_device_desc "Olimex OpenOCD JTAG ARM-USB-TINY-H" ft2232_layout olimex-jtag ft2232_vid_pid 0x15ba 0x002a FT2232 - USB driver, Future Technology Devices Internationatl

OpenOCD configuration for RPi # Broadcom 2835 on Raspberry Pi telnet_port 4444 gdb_port 5555 adapter_khz 1000 set _CHIPNAME raspi reset_config none set _CPU_TAPID 0x07b7617F jtag newtap $_CHIPNAME arm -irlen 5 -expected-id $_CPU_TAPID set _TARGETNAME $_CHIPNAME.arm target create $_TARGETNAME arm11 -chain-position $_TARGETNAME

Session example Open On-Chip Debugger 0.5.0 (2011-08-11-06:56) Licensed under GNU GPL v2 For bug reports, read http://openocd.berlios.de/doc/doxygen/bugs.html Info : only one transport option; autoselect jtag 1000 khz none separate raspi.arm Info : max TCK change to: 30000 khz Info : clock speed 1000 khz Info : JTAG tap: raspi.arm tap/device found: 0x07b7617f (mfg: 0x0bf, part: 0x7b76, ver: 0x0) Info : found ARM1176 Info : raspi.arm: hardware has 6 breakpoints, 2 watchpoints Info : accepting telnet connection from 4444 target state: halted

OpenOCD commands adapter khz [khz] adapter name arm core state arm disassemble arm reg exit halt jtag load image file address mww mdw step display/change maximum JTAG speed the name of the currently selected adapter display/change ARM core state disassemble instructions display ARM core registers exit telnet session request target to halt perform JTAG TAP actions loads a file into the target memory write memory word display memory words step one instruction

Linux kernel build it for ARM architecture create a kernel.img by the provided tool will put the kernel to 0x8000 and continue execution from there usually a compressed kernel image

JTAG enabled before kernel the tool is modified JTAG enabling code is put at 0x8000 the kernel image is put afterwards requires manual resume from the kernel address to continue booting

Drivers kernel drivers might override JTAG pins SPI and I 2 C disabled by default do not interleave with JTAG pins From spi-bcm2708.c /* SPI is on GPIO 7..11 */ for (pin = 7; pin <= 11; pin++) { INP_GPIO(pin); /* set mode to GPIO input */ SET_GPIO_ALT(pin, 0); /* set mode to ALT 0 */ }

Kernel debugging load symbols specify remote target debug like a normal program breakpoints examine memory stepping

Conclusions JTAG deugging instrument for integrated circuits enable JTAG on RPi through GPIO debug bare metal programs enable JTAG before Linux kernel booting

The end Questions?