BMP bleeding edge binary for bluepill

Post Reply
User avatar
Rick Kimball
Posts: 1058
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

BMP bleeding edge binary for bluepill

Post by Rick Kimball » Tue Nov 07, 2017 5:12 pm

As a convenience for everyone, I built a version of blackmagic probe from the latest github repository and attached the resulting binary here. This is meant to be loaded on a Blue Pill using the stm32flash software. I modified the Makefile.inc to run without the DFU loader. This reduces the size and fits without issue on the 64k Blue Pill (60912 bytes)

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
the Virtual Com Port pins are connected to:
  • PA2 is TX
  • PA3 is RX
The GDB tty port on linux is usually (/dev/ttyACM0) * the one you connect to with arm-none-eabi-gdb
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:]
blackmagic_be.zip
(39.57 KiB) Downloaded 44 times
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.
-rick

User avatar
Slammer
Posts: 255
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: BMP bleeding edge binary for bluepill

Post by Slammer » Wed Nov 08, 2017 12:44 am

Thanks Rick.

BMP is very convenient, I am using 2 Bluepills on a breadboard, one as BMP and the other as Target, with just one USB cable I have everything... very nice!

MartynC
Posts: 7
Joined: Thu Nov 16, 2017 1:14 pm

Re: BMP bleeding edge binary for bluepill

Post by MartynC » Wed Nov 22, 2017 2:28 pm

Which version of stm32flash.exe is recommended; Roger's modified version [https://github.com/rogerclarkmelbourne/ ... /tools/win] or the one on Sourceforge [https://sourceforge.net/projects/stm32flash/]?

Are there any simple to understand instructions on burning the firmware to a STMF103 board using stm32flash? My Google-fu has let me down.

TIA.

User avatar
Kenjutsu
Posts: 134
Joined: Fri May 29, 2015 8:26 am

Re: BMP bleeding edge binary for bluepill

Post by Kenjutsu » Fri Nov 24, 2017 12:25 pm

Rick Kimball wrote:
Tue Nov 07, 2017 5:12 pm
As a convenience for everyone, ...
Thanks Rick! It works like a charm 8-) Does the BMP also provide NRST?
Pieter

OSX: 10.12.6
Arduino IDE: 1.6.12
Blue pill STM32F103C8T6 Dev Board
Maple Mini Clones

User avatar
Kenjutsu
Posts: 134
Joined: Fri May 29, 2015 8:26 am

Re: BMP bleeding edge binary for bluepill

Post by Kenjutsu » Fri Nov 24, 2017 12:47 pm

MartynC wrote:
Wed Nov 22, 2017 2:28 pm
Which version of stm32flash.exe is recommended...

Are there any simple to understand instructions on burning the firmware to a STMF103 board using stm32flash? My Google-fu has let me down.

TIA.
re:stm32flash - I do not know which version is the recommended version, but I use the one from Arduino_STM32

I am using OSX, and from the command line, I do the following:
./stm32flash -w blackmagic.bin -S 0x08000000 -v -b 115200 /dev/tty.wchusbserialfd12140

blackmagic.bin is from the zip file
/dev/tty.wchusbserialfd12140 is the port of the USB <-> Serial converter connected to the BluePill, and the BluePill is in Serial bootloader mode
Pieter

OSX: 10.12.6
Arduino IDE: 1.6.12
Blue pill STM32F103C8T6 Dev Board
Maple Mini Clones

Post Reply