DirtyJTAG Firmware Convert $2 STM32 “Bluepill” Boards or ST-Link V2 Clones into JTAG Adapters

DirtyJTAG is a JTAG adapter firmware for cheap STM32 boards like BluePill or equally inexpensive ST-Link V2 clones that was developed to create an  alternative to the cheap – but now obsolete – LPT Wiggler cables, and more expensive USB JTAG probes.

Bluepill Board Connected to Router as JTAG Adapter – Click to Enlarge

You’ll find the source, and documentation on Github. First, you’ll need to flash the firmware using the DFU method or an SWD programmer (for ST-Link) or USB to TLL debug board (for STM32 dev boards), before making the connection to the target board as shown below (for Bluepill).

STM32 JTAG
PA0 TDI
PA1 TDO
PA2 TCK
PA3 TMS
PA4 TRST
PA5 SRST

You can then use mainline UrJTAG for your newly flashed JTAG adapter. If you prefer OpenOCD, it might eventually be possible to use Versaloon firmware instead on STM32 Bluepill board.

Thanks to Zoobab for the tip.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
7 Comments
oldest
newest
zoobab
6 years ago

Nice, his blog is a gold mine. I recently used his pill_serial firmware to have 3 serial ports on the bluepill. Will try that one as well.

I also found another firmware last week:

https://github.com/zoobab/armblaster

But could not make it work on a bluepill. A friend of mine will ship me an STBee board from Japan so at least I have a reference board where I am sure the code works.

ben
ben
6 years ago

So when you program a Bluepill/V2Clone with one of these images, can you program/debug any JTAG device? Not just ST?

Also, since JTAG and SWD share the same pins, I assume none of these project ( UrJtag/DirtyJtag, OpenOCD/Versaloon, BlackMagicProbe) support the Single Wire Interface? Even though the factory ST-Link v2 says it can do SWIM?

Jean
Jean
6 years ago

Yup, I wrote DirtyJTAG to debug Broadcom MIPS boards. You’re limited to what UrJTAG is compatible with, its code base is quite simple to understand so if needed you can code it yourself.

DirtyJTAG doesn’t supports SWD, I think you’d better be using an ST-Link dongle with its stock firmware and texane/stlink + OpenOCD.

Garoux
Garoux
6 years ago

While that is indeed an interesting project, from a practical point of view there are imho better options that are already supported by OpenOCD:
* for $2.65 incl shipping (aliexpress), you get an Altera USB Blaster clone ready made incl. housing, USB cable and JTAG ribbon cable
* for $6,70 incl. shipping, you get a FT232H based USB-JTAG adapter which does usb hi-speed and is therefore much faster than any of the above.

Jean
Jean
6 years ago

There are indeed better&faster solutions if you’re prefering OpenOCD. There’s the “versaloon” firmware for STM32 boards, which is available on Zoobab’s GitHub repository.

IMHO, I’d stay away from Altera Blaster clones unless you’re doing FPGA stuff, as there are a ton of hardware variants, each with a different MCU+firmware combination. Mine got a PIC 18F14K50, which only seems to be compatible with Altera FPGA software…

Benjamin HENRION
5 years ago

There is now a binary release of the Versaloon firmware, thanks to the big cleanup made by Jean Thomas, testers welcomed: https://github.com/zoobab/versaloon/blob/master/README.md

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...