platformio / platform-ststm32

ST STM32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm32
Apache License 2.0
389 stars 305 forks source link

Serial support for blue and black pill #351

Open Trance-Paradox opened 4 years ago

Trance-Paradox commented 4 years ago

Can you please add support for bluepill and blackpill stm32f103c8 Upload protocol = serial

lnlp commented 4 years ago

Do you mean serial or serial over USB? IIRC latter would require upload_protocol = dfu. stm32f103c8 does not support this by default and will require a custom bootloader like https://github.com/rogerclarkmelbourne/STM32duino-bootloader. The upload protocol will then be dependant on the custom bootloader.

Trance-Paradox commented 4 years ago

I mean serial not serial over usb

Do you mean serial or serial over USB? IIRC latter would require upload_protocol = dfu. stm32f103c8 does not support this by default and will require a custom bootloader like https://github.com/rogerclarkmelbourne/STM32duino-bootloader. The upload protocol will then be dependant on the custom bootloader.

jnr2820 commented 4 years ago

Hi @Trance-Paradox , If you are referring to uploading code to a Blackpill such as the one from RobotDyn, with the "arduino" boot loader that it ships with, that function is working in current build. I was able to do a code upload by using an FTDI serial to USB adapter, connected directly to the serial pins (9 and 10 on mine) of the board. Remember to flip the jumper closest to the USB port to "1" and reset to change the mode to allow uploads, first.

Here's the relevant piece from my platformio.ini. Note that both "upload_port" and "upload_protocol" seem to be required. The "upload_port" below is the address of my FTDI adapter as detected by my Macbook.

[env:blackpill] platform = ststm32 framework = arduino board = blackpill_f103c8_128 <- change to the correct board that you have. upload_port = /dev/cu.usbserial-AD0JVIWC <- change to the correct port for your adapter. upload_protocol = serial