Hi. I was tinkering around Arduino IDE when I first tried the Bluepill STM32F103C8T6 board and I’ve successfully uploaded my program into it via serial. Then I wanted to try uploading a sample program to the Bluepill board with VSCode PlatformIO via serial too, this happened…
I noticed that /dev/ was put into the bash command 2 times so it can’t actually detect the USB port. I tried finding out the solution through the Internet and thankfully I found one by changing the bash script according to this github issue.
I changed the line in ~/.platformio/packages/tool-stm32duino/serial_upload from this:
$(dirname $0)/stm32flash/stm32flash -g 0x8000000 -b 230400 -w "$4" /dev/"$1"
to this:
$(dirname $0)/stm32flash/stm32flash -g 0x8000000 -b 230400 -w "$4" "$1"
And it worked like a charm.
It would be nice for the devs to fix this up in the next release.