JTAG based Debugging

JTAG (Joint Test Action Group) is an interface standard for in/on-chip debugging. Today the classic JTAG interface is not any more of that relevance, the predominant wire interface is SWD (single wire debug), which is still referred to as JTAG and offered by JTAG adapters. Choose the SWD mode of your JTAG adapter whenever unsure.

A typical setup consists of the debugging application (arm-none-eabi-gdb for all setups) and either a direct serial connection to the adapter or a so-called GDB-server (a server GDB can connect to via TCP).

PX4 supports three default JTAG setups: The Black Magic Probe, any OpenOCD supported probe and SEGGER J-Link. If unsure, we recommend the Black Magic Probe.

Black Magic Probe

Main page: Black Magic Probe

Quick Setup for Pros

The black magic probe does not need a GDB server and can be operated via serial directly. Only this GDB init is needed.

target extended NAME_OF_SERIAL_PORT_GOES_HERE
monitor swdp_scan
attach 1
monitor vector_catch disable hard
set mem inaccessible-by-default off
set print pretty
source Debug/PX4

And if code should be auto loaded and run, add:

load
run

OpenOCD Adapters

OpenOCD is a GDB server and supports a range of JTAG adapters.

Main page: OpenOCD based debugging

Quick Setup for Pros: .gdbinit

Segger adapters are the de-facto industry standard in JTAG tools, but the price range of their professional line is non-suitable for hobby or educational markets. That is why the Segger J-Link EDU adapter is very attractive for just $60.00.

Main page: segger_j-link

Quick Setup for Pros

Arguments for the J-Link GDB server:

-select USB=0 -device STM32F405RG -if SWD-DP -speed 20000

.gdbinit:

tar ext :2331

And if code should be auto loaded and run, add:

load
run
Translations of this page:


Quick Links

QR Code: URL of current page