Posted on

Loading a Bootloader on the STM32 Blue Pill

Here is how I loaded the bootloader on a new STM32 Blue Pill.

Installed Arduino 1.8.5

 

Tools->Boards->Boards Manager

Install SAM Cortex-M3

Download:

https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zip

Unzip to My Documents->Arduino->Hardware

Rename folder. (Remove -master, so it is simply Arduino_STM32)

Navigate into drivers->win

Execute install_drivers.bat as administrator. (Right-click, run as administrator)

 

Visit:

https://github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/binaries

And select:

Generic_boot20_pc13.bin

Save it in “tools/win/”

 

Set the Boot0 jumper to 1

Wire up the CH340 USB to TTL-232, G-G, TX-A10, RX-A9

USB (for power)

stm32flash.exe -w generic_boot20_pc13.bin COM4 (whatever com port your CH340 is on)

Put jumper back to 0

Reset

Use Arduino to upload a sketch to test. (Blink, for example)