← Flash to hardware

Hardware · SWD

Connect a debug probe

To flash and debug, your STM32 talks to a debug probe over four SWD wires. Nucleo boards have a built-in ST-Link, so they need no wiring — but bare boards like the Black Pill require an external probe (ST-Link, DAPLink, and similar). This guide wires up an ST-Link V2; step through it below — each tap draws and highlights one jumper at a time.

ST-Link V2 GND SWCLK SWDIO 3.3V Black Pill GND SCK DIO 3V3

Ready when you are

Press Next wire to connect the first jumper. You can step forward and back through all four SWD connections.

The four connections

Block Designer flashes over ST-Link / OpenOCD, so these four pins are all you need for both flashing and live debugging:

#ST-Link V2Black PillWire
1 GND GND
2 SWCLK SCK
3 SWDIO DIO
4 3.3V 3V3
Don't double-power the board. If your Black Pill is already powered over its own USB port, leave the 3.3V wire off. Feeding 3.3V from the ST-Link and USB at once can back-feed the regulators. GND + SWCLK + SWDIO are enough to flash a self-powered board.

Once it's wired

Plug the ST-Link into your computer's USB, head back to Flash to hardware, and click Program STM32. Block Designer probes the attached chip, generates firmware, and flashes it over this SWD link.

Wiring not taking? Open a discussion or file an issue — happy to help.