An all-in-one-place guide to prepare an STM32F103 to be used with the Arduino IDE.
First of all, check the board. Most boards come with a wrong resistor value, which may cause some computers to not detect them. R10 must be changed to 1.5K (1.8K is ok).
Connect an USB-2-Serial converter to USART1, PA9 (TX) PA10(RX). WARNING: Set the converter to 3.3V operation mode, usually by changing a jumper.
Change the BOOT0 jumper (the upper one) to 1 (right) and BOOT1 to 0.
Download the loader script from github at jsnyder/stm32loader . It’s a Python script so it must be installed before. You can find a Python3-ready version at bmpenuelas/stm32loader . Try to run it, if the serial module is not found, you can run:
pip install pyserial
When it’s ready, put the script and the bootloader in the same folder and run:
python ./stm32loader.py -e -w -v -p COM8 ./generic_boot20_pc13.bin
After the program confirms successful writing, put BOOT0 jumper back to 0.
These are the STM32F103 Windows drivers, run the .bat, it will handle the installation.
Sources and resources: