I’m using VS Code with PlatformIO for the “ST STM32” platform with the “Arduino Framework” and I am trying to upload firmware to an STM32F103 bluepill that has probably been flashed with the default STM32duino / Maple bootloader (GitHub - rogerclarkmelbourne/STM32duino-bootloader: Bootloader for STM32F103 boards, for use with the Arduino_STM32 repo and the Arduino IDE).
With the Arduino IDE everything works, i.e. VCP shows up and can upload firmware (I need to reset the board manually ocasionally).
With VSCode and PlatformIO, I first got a “java” not found error. I was able to “bend” the VSCode batch files to use the java version supplied with the Arduino IDE to eliminate that error (other Java versions cause an access violation).
Then uploading to the microcontroller worked once, and afterwards no COM port is shown but a “Maple 003” device, resulting in
Looking for upload port... Error: Please specify `upload_port` for environment or use global `--upload-port` option.
What is the issue here, is there a fix?
Is there documentation on the “dfu” upload protocol for the “arduino” platform anywhere?
What is the recommended way to use PlatformIO with the bluepill and the Arduino framework?
- GitHub - stm32duino/Arduino_Core_STM32: STM32 core support for Arduino
- STM32F103C8T6 - Blue Pill | STM32-base project
- BluePill F103C8 — PlatformIO latest documentation
[env:bluepill_f103c8] platform = ststm32 board = bluepill_f103c8 framework = arduino upload_protocol = dfu #upload_port=COM20