openpilot/panda/board/debug
Vehicle Researcher c5d5c5d1f3 openpilot v0.10.1 release
date: 2025-10-24T00:30:59
master commit: 405631baf9685e171a0dd19547cb763f1b163d18
2025-10-24 00:31:03 -07:00
..
debug_h7.sh openpilot v0.10.1 release 2025-10-24 00:31:03 -07:00
dfu_util_h7.sh openpilot v0.10.1 release 2025-10-24 00:31:03 -07:00
gdb.sh openpilot v0.10.1 release 2025-10-24 00:31:03 -07:00
README.md openpilot v0.10.1 release 2025-10-24 00:31:03 -07:00

In-circuit debugging using openocd and gdb

Hardware

Connect an ST-Link V2 programmer to the SWD pins on the board. The pins that need to be connected are:

  • GND
  • VTref
  • SWDIO
  • SWCLK
  • NRST

Make sure you're using a genuine one for boards that do not have a 3.3V panda power rail. For example, the tres runs at 1.8V, which is not supported by the clones.

Openocd

Install openocd. For Ubuntu 24.04, the one in the package manager works fine: sudo apt install openocd.

GDB

You need gdb-multiarch.

Once openocd is running, you can connect from gdb as follows:

$ gdb-multiarch
(gdb) target ext :3333

To reset and break, use monitor reset halt.