Unable to upload a code to STM32 Blue Pill

Hello everyone,

I've been struggling to upload code to my STM32 Blue Pill (STM32F103C8T6) using the Arduino IDE for quite a while now. Here's my current setup:

Arduino IDE Setup:

  1. Maple Mini Driver Installed
    Downloaded from: GitHub - rogerclarkmelbourne/Arduino_STM32: Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
  2. Board Manager URL Added:
    http://dan.drown.org/stm32duino/package_STM32duino_index.json
  3. Board Configuration:
  • Tools > Board: Generic STM32F103C series
  • Tools > Upload Method: STM32duino Bootloader
  • Tools > CPU Speed: 72MHz (Normal)

Test Code (Simple Blink):

void setup() {
  pinMode(PC13, OUTPUT);
  Serial.begin(115200);
  delay(2000);
  Serial.println("Blink test");
}

void loop() {
  digitalWrite(PC13, HIGH);
  delay(1000);
  digitalWrite(PC13, LOW);
  delay(1000);
  Serial.println("Blink");
}

Upload Output:

Sketch uses 12972 bytes (19%) of program storage space. Maximum is 65536 bytes.
Global variables use 2064 bytes (10%) of dynamic memory, leaving 18416 bytes for local variables. Maximum is 20480 bytes.
'java' is not recognized as an internal or external command,
operable program or batch file.

The board has already been flashed with the STM32duino bootloader previously, so it should be ready for upload.

There is no problem arise when compile the code, but, when I upload, there's no result. Can somebody give me a suggestion please ? What should I do ? Thank you for everyone that are willing to help.

Start from checking ON a verbose compilation and upload output in the IDE preferences and show a full upload message.

The Rogerclark core is discontinued.
Did you change the Boot jumper.

Rather use this Core and the ST-Link programmer.

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

... but still maintained by others...

Thanks , I did not know that.

can upload code to my STM32 Blue Pill (STM32F103C8T6) using

  1. FTDI Serial - upload method “STM CubeProgrammer (Serial)” see - Getting-Started-With-Stm32-Using-Arduino-IDE
  2. ST-LINK V2 - upload method “STM CubeProgrammer (SWD)” - see black-blue-pill-stm32-st-link-connection
  3. ST-LINK V3SET upload method “STM CubeProgrammer (SWD)”

ST-Link V3 connect using CN6 SWD

  • ST-Link V3 CN6 GND to BP Ground
  • ST-Link V3 CN6 DIO to BP DIO
  • ST-Link V3 CN6 CLK to BP CLK
  • ST-Link V3 CN6 T_VCC to BP 3V3

but the maintainers have not made it compatible for use with Arduino IDE 2.x:

So if you want to use the Roger Clark STM32 boards platform, the easiest way to accomplish that is to use Arduino IDE 1.x (which can be downloaded from the "Software" page here).

If you want to use the modern Arduino IDE, then use the "STM32 MCU based boards" platform (AKA "STM32duino"), which is fully compatible with Arduino IDE 2.x.