Main Content

Programming STM32F103 Blue Pill using USB Bootloader and PlatformIO

This is the infamous Blue Pill board – a $2 ARM STM32F103 development board with all the capabilities of a Teensy 3.x at a fraction of the price of an Arduino. So what’s the catch?

I’ll tell you – software support.

A couple weeks ago I decided to invest some time learning this platform because I was sick of paying 20+ dollars for a Teensy. While the PJRC platforms are fantastic, they are expensive and need a proprietary boot loader in order to work. I want a small and powerful arm chip which I can integrate INTO my own PCBs and the Teensy does not easily or cheaply allow this. The Blue Pill and it’s derivatives appear to be just the thing I need!

But how do you use one of these things? It should be simple! Just buy one, connect it to your computer over USB, and upload code from the Arduino IDE or PlatformIO just like you would with an Arduino!… WRONG! It appears the Blue Pills are not quite there yet. The main problem is lack of a USB boot loader installed at the factory as well as poor documentation and poor support in PlatformIO.

As a side note, if you are not using the PlatformIO framework with either ATOM or Visual Studio Code as your prototype embedded development environment then you need to get with the program! Just download VS Code and install the PlatformIO plugin – it’s fantastic! Way better than Arduino IDE!”

Link to article