Programming an STM32F103 board using its USB port (Blue Pill)

While the $2 board is cheap and very commonly found, getting up and running is slightly convoluted. Here is a short guide on how to set it up to program directly from USB.

Image for post
Image for post
A generic $2 STM32F103 board on AliExpress (aka Blue Pill)
Image for post
Image for post
(source)
python ./stm32loader -p /dev/tty.SLAB_USBtoUART -w ~/Downloads/generic_boot20_pc13.bin
Image for post
Image for post

Written by

Software guy. When you try to tell computers what to do, you eventually learn about human nature as well. (http://paramaggarwal.com)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store