Programming bluepill board with arduino IDE

Bluepill comes with STM32F103C8T6 controller. This controller can be programmed with arduino ide using USB-Serial board.

Connections

Boot0 – 3v3

PB2 (Boot1) – Gnd

A9 (Tx) – Rx of Serial board

A10 (Rx) – Tx of Serial board

Gnd – Serial board Gnd

Arduino IDE Setup

First we need to add STM32 support to Arduino IDE, for that goto File -> Preferences – > Additional boards URL’s

https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json

past this link in text and save

STM32 Arduino IDE Support

Then Goto Tools -> Board -> BoardManager and search for STM32

Install STM32 support

Once installation is complete, you can see STM32 boards in the board menu.

IDE Settings for BluePill

Select STM32F1 as board and select the remaining setting as shown in above screenshot.

We also need to download and install STM32CubeProgammer software, you can download it for your platform from here. Once the installation is completed, we need to add the location to path.

Now you can simply program the board as you would do for arduino UNO board.

Once programmed, you need disconnect Boot0 from 3v3 and connect it to ground and reset the controller to start the program. To program the board again connect Boot0 back to 3v3 and reset the controller, the controller will be read to receive the program.

Add a Comment

Your email address will not be published. Required fields are marked *