Even if you aren't interested in the BlackMagic Probe software, you might be interested in the Virtual COM port feature it offers. This firmware turns a Blue Pill into a USB serial dongle.
For this Blue Pill version the pins are configured like this:
the Serial Wire Debug Pins are connected to:
- PB14 is SWDIO
- PA5 is SWCLK
- PA2 is TX
- PA3 is RX
The Virtual USB tty port on linux is usually (/dev/ttyACM1) * the one that acts like a USB serial dongle
I've attached a zip file here with a readme.txt, a blackmagic.bin and the changes I made to the Makefile.inc
[commit 568655063faecd24dbaf7359d582fdd9020b2d4b Nov 7th, 2017 Download file:] On linux you load the binary like this:
$ stm32flash -w blackmagic.bin -S 0x08000000 -v /dev/ttyUSB0
* assuming /dev/ttyUSB0 is an FTDI serial dongle connected to pins PA9/PA10 of the Blue Pill
Note: The bluepill and the stlink devices are electrically the same ( they don't have USB reset circuitry )
Note: This binary will not work with a Baite Maple Mini.