HydraFW OpenOCD guide - hydrabus/hydrafw GitHub Wiki

OpenOCD mode

This guide is updated towards development firmware

OpenOCD can be used with the same protocol as the bus pirate.

JTAG

Example OpenOCD configuration :

source [find interface/buspirate.cfg]

buspirate_mode open-drain
buspirate_pullup 1

buspirate_port /dev/ttyACM0

transport select jtag

If you know the target JTAG pins, connect them on the default pins and run OpenOCD with your configuration file.

Combining JTAG pin discovery and OpenOCD mode

It is possible to discover the JTAG pins and use them without changing the wiring :

  • Use the brute commands to discover the pins.
  • Once the pins are discovered, validate them using bypass and idcode commands.
  • Run the openocd command
  • Leave the Hydrabus terminal
  • Run OpenOCD with your configuration file

SWD

Hydrabus can also be used as an SWD interface to connect to various devices.

Hydrabus PIN SWD Signal
PB3 SWDCLK
PB4 SWDIO
PC4 nRST

An example configuration can be found in utils/openocd/hydrabus_swd_host.cfg

Debugging Hydrabus with an external debugger

Hydrabus can be debugged using an external SWD interface on the debug pins using the OpenOCD configuration found in utils/openocd/hydrabus_target.cfg

Additional informations about OpenOCD / SWD