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 (https://github.com/rogerclarkmelbourne/STM32duino-bootloader).
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?
[env:bluepill_f103c8] platform = ststm32 board = bluepill_f103c8 framework = arduino upload_protocol = dfu #upload_port=COM20