Black Magic Probe firmware installation instructions for STM32F103 Blue Pill and STM32F401/STM32F411 Black Pill follow.
Download and extract the latest blackmagic-firmware.zip from Releases. Connect a STM32F103 Blue Pill for serial upload:
- Set boot jumpers for boot from rom: Boot0=1, Boot1=0.
- Connect a USB-Serial adapter with A9 to RX, A10 to TX.
- Press reset.
- Upload the firmware:
stm32flash -w blackmagic_allinone-bluepill.bin /dev/ttyUSB0
with /dev/ttyUSB0 the USB-serial adapter - After upload, set boot jumpers for boot from flash: Boot0=0, Boot1=0.
- Remove usb-serial adapter
- Connect to usb.
Signal | Pin |
---|---|
SWDIO | B14 |
SWCLK | A5 |
Download and extract the latest blackmagic-firmware.zip from Releases.
Connect a STM32F401 or STM32F411 Black Pill for upload:
- Download dfu-util
- Connect the Black Pill to usb. Make sure it's a data cable, not a charging cable.
- Push NRST and BOOT0
- Wait a few seconds
- Release NRST
- Wait a few seconds
- Release BOOT0
- Upload the firmware:
./dfu-util -a 0 --dfuse-address 0x08000000:leave -R -D blackmagic-blackpillv2.bin
- If dfu-util gives the error Cannot open DFU device xxxx:xxxx download zadig, select "STM32 Bootloader", install the WinUSB driver and run dfu-util again.
- Disconnect and reconnect to usb
Connect a STM32F401 or STM32F411 Black Pill for upload:
- Install dfu-util. On Debian/Ubuntu, type
sudo apt-get install dfu-util
- Connect the Black Pill to usb. Make sure it's a data cable, not a charging cable.
- Push NRST and BOOT0
- Wait a few seconds
- Release NRST
- Wait a few seconds
- Release BOOT0
- Upload the firmware:
dfu-util -a 0 --dfuse-address 0x08000000:leave -R -D blackmagic-blackpillv2.bin
- If dfu-util does not find the black pill, execute dfu-util as root.
- Install udev rules
- Disconnect and reconnect to usb
I am using this blackpill board: STM32F411 with 8MB flash.
Pinout:
Signal | Pin |
---|---|
SWDIO | B9 |
SWCLK | B8 |
Pinout on release v1.9.x and earlier:
Signal | Pin |
---|---|
SWDIO | A13 |
SWCLK | A14 |
Open the source tree, go to the subdirectory for your platform and check the "readme" for installation instructions. The exact pinout used is in the file "platform.h".