Wiring View
Start the Bit Pirate adapter
In the Bit Pirate terminal, enter JTAG mode and start the OpenOCD adapter setup:
mode jtag
openocdConfirm, select the GPIOs and let the board reboot into USB CDC adapter mode. Close the serial terminal before starting OpenOCD.
Run OpenOCD on your computer
Run the command matching your wiring on the computer. Replace /dev/ttyACM0 with the adapter's USB port and target/stm32f1x.cfg with your target configuration.
SWD target example
openocd -f interface/buspirate.cfg -c "buspirate port /dev/ttyACM0; transport select swd" -f target/stm32f1x.cfgJTAG target example
openocd -f interface/buspirate.cfg -c "buspirate port /dev/ttyACM0; transport select jtag" -f target/stm32f1x.cfgResult
What success looks like
OpenOCD opens the adapter and detects the target through the selected SWD or JTAG transport.
Troubleshooting
- Port missing or busy: recheck the USB device name and close other serial clients.
- Missing driver or transport: check OpenOCD Bus Pirate support.
- Target not detected: verify GPIOs, ground, power and target configuration.
- Check whether the target is held in reset or low-power mode.
OpenOCD JTAG/SWD adapter FAQ
Should I scan pins before OpenOCD?
Yes. OpenOCD adapter mode expects a known JTAG or SWD mapping. Use the scan recipes first when the target pads are not labelled or not trusted.
What role does Bit Pirate play in an OpenOCD session?
Bit Pirate acts as the USB-facing transport adapter. OpenOCD still provides the target configuration, reset strategy and debug protocol logic for the MCU or SoC you are investigating.
Is Bit Pirate a replacement for a high-speed debug probe?
No. The USB adapter is useful for bring-up, recovery, experiments and low-speed debug access, but dedicated JTAG/SWD probes are better for production flashing and heavy debug sessions.