Turning a BluePill into a BMP

Post Reply
Y@@J
Posts: 57
Joined: Mon Sep 28, 2020 8:51 pm

Turning a BluePill into a BMP

Post by Y@@J »

Hello,

I am experimenting with a BluePill as a BMP.
I'm not really used to Linux, I didn't want to bother with the toolchain. I didn't find anything about Windows, all tutorials being for Linux, including building from sources. I attempted to flash precompiled files with the Windows STM32 ST-Link Utility. This way :

First, I flashed a BluePill with bluepill-diagnostics-v1.631.bin, using a ST-Link v2 and verified it is genuine, and comes with the 64KB bonus. Test = OK.
Then, I downloaded blackmagic_dfu.bin and blackmagic.bin from this page : https://jeelabs.org/202x/bmp/

I flashed blackmagic_dfu.bin (8KB) starting from 0x08000000 using ST-Link Utility
and then blackmagic.bin (80KB) starting from 0x08002000

ST-Link utility didn't complain about writing memory addresses beyond the displayed capacity (64KB). Reading memory with ST-Link Utility, it seems 80KB of data were written... At the end of the 80KB, I can read "ASCII", and I also read this string at the end of the bin file. Seems OK.

Then, I connected the BluePill to a USB port, installed drivers using Zadig, and got new devices in the Device Manager. 2x "Black Magic xxx" USB devices and 2x generic serial ports over USB.

Before I eventually fail attempting to use this BMP, does this look OK ?

Next steps : getting this to work with Arduino IDE (at least for flashing Blink), and then with Visual Studio + Visual Micro, running the GDB server with a couple of breakpoints. (until now, I've only been using GDB server on a RasPi, compiling from Visual Studio). Crossing fingers.
Attachments
Capture.JPG
Capture.JPG (20.47 KiB) Viewed 2939 times
doubleaswi
Posts: 14
Joined: Mon Aug 22, 2022 7:42 am

Re: Turning a BluePill into a BMP

Post by doubleaswi »

It sounds like you have successfully flashed the BluePill with the Black Magic firmware using the ST-Link Utility on Windows. The fact that you were able to read "ASCII" at the end of the 80KB of data and that the utility did not complain about writing to memory addresses beyond the 64KB capacity is a good indication that the flashing process was successful.

Regarding your next steps, it should be possible to use the Arduino IDE to flash the Blink example to the BluePill, as the Black Magic firmware is compatible with the Arduino ecosystem. However, it may be necessary to install the appropriate board definition files for the BluePill in the Arduino IDE. As for using Visual Studio with Visual Micro and a GDB server, it is possible but may require additional setup and configuration.

Overall, it seems that you are on the right track and it's good that you have crossed your fingers. Good luck with your experimentation!



_____________________________________
https://www.rst.software/blog/top-12-aw ... ed-startup
Post Reply

Return to “Black Magic Probe & other”