My Raspberry Pi 4 + JTAG setup — Part 1 — introduction

In our Tools series, we will discuss software and hardware tools that facilitate embedded systems development. For each tool, we will discuss the primary purpose, typical installations, and demonstrate a common use.

JTAG (Joint Test Action Group) is a standard system for verifying and testing circuits after fabrication. Originally developed in 1985 as a validation tool, engineers quickly realized that its ability to control a CPU and communicate system state information could be used in conjunction with a debugger to create a powerful development and debug environment that could rival an ICE. In fact, many of these setups were and are still referred to as JTAG ICE setups. This series of articles will describe how to create a JTAG debug setup for bare metal and OS development and testing on a Raspberry Pi 4 board.

Specifically, we will cover:

    • Setting up “openocd”
    • Setting up gdb
    • Setting up VSCode to use gdb so you have a full IDE for debug of HW.

The hardware consists of a FT232H breakout board from Adafruit (under $20 at the time of writing this article), your Raspberry Pi 4, some jumper wires and a USB-C cable. This hardware is combined with several Open Source software tools to create complete development system.

The software stack for this article includes openOCD (Open On Chip Debugger), GDB (Gnu Debugger) and Visual Studio Code. In part 3 we will cover turning on the jtag in the Raspberry Pi 4 and a “Null” boot image for the Raspberry Pi. Then we will cover setting up the software in Parts 4, 5 and 6