Closed amyspark closed 4 years ago
Hi,
I do not know if you managed to get this working, but this is what I do with each Blue Pill I want to load the bootloader on:
I flash the latest medium density bootloader .bin file to my BP using a serial adapter.
I then disconnect the serial adapter and completely remove power from the BP, and restore the BOOT jumpers
I reconnect the BP via USB
USB Prober now displays the following:
I start the Arduino IDE and create a new Blink sketch
I change the settings as follows: Note: There is no serial port available
I then upload the Blink sketch:
error, counldn't open [/dev/cu.wchusbserialfd12120]
+-----------------------------------------------------------------------+
| HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool |
| (c) 2018 - Bruno Freitas http://www.brunofreitas.com |
| (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr |
| Customized for STM32duino ecosystem https://www.stm32duino.com |
+-----------------------------------------------------------------------+
Trying to open the [cu.wchusbserialfd12120]... Unable to open the [cu.wchusbserialfd12120] Searching for [1209:BEBA] device... # [1209:BEBA] device is found ! Sending
command... Flashing firmware... . 1024 Bytes . 2048 Bytes . 3072 Bytes . 4096 Bytes . 5120 Bytes . 6144 Bytes . 7168 Bytes . 8192 Bytes . 9216 Bytes . 10240 Bytes . 11264 Bytes . 12288 Bytes . 13312 Bytes . 14336 Bytes . 15360 Bytes . 16384 Bytes . 17408 Bytes . 18432 Bytes . 19456 Bytes . 20480 Bytes . 21504 Bytes Done! Sending
command... Searching for [cu.wchusbserialfd12120] ... error, counldn't open [/dev/cu.wchusbserialfd12120] error, counldn't open [/dev/cu.wchusbserialfd12120] error, counldn't open [/dev/cu.wchusbserialfd12120] error, counldn't open [/dev/cu.wchusbserialfd12120] error, counldn't open [/dev/cu.wchusbserialfd12120] Finish 8. USB Proper now displays: ![USBProber02](https://user-images.githubusercontent.com/11071556/85287138-21982500-b494-11ea-8703-ee4198613860.png) and the Blink sketch is successfully executing 9. Back in the Arduino IDE, the correct serial port is now available: ![Arduino02](https://user-images.githubusercontent.com/11071556/85287279-54dab400-b494-11ea-838f-959de5c79df9.png) 10. When I now modify and upload the Blink sketch again:
+-----------------------------------------------------------------------+ | HID-Flash v2.2.1 - STM32 HID Bootloader Flash Tool | | (c) 2018 - Bruno Freitas http://www.brunofreitas.com | | (c) 2018-2019 - Vassilis Serasidis https://www.serasidis.gr | | Customized for STM32duino ecosystem https://www.stm32duino.com | +-----------------------------------------------------------------------+
Trying to open the [cu.usbmodemFD1221]... Toggling DTR... Searching for [1209:BEBA] device...
[1209:BEBA] device is found ! Sending
command... Flashing firmware... . 1024 Bytes . 2048 Bytes . 3072 Bytes . 4096 Bytes . 5120 Bytes . 6144 Bytes . 7168 Bytes . 8192 Bytes . 9216 Bytes . 10240 Bytes . 11264 Bytes . 12288 Bytes . 13312 Bytes . 14336 Bytes . 15360 Bytes . 16384 Bytes . 17408 Bytes . 18432 Bytes . 19456 Bytes . 20480 Bytes . 21504 Bytes Done! Sending
command... Searching for [cu.usbmodemFD1221] ... error, counldn't open [/dev/cu.usbmodemFD1221] [cu.usbmodemFD1221] is found ! Finish
Hey,
I was able to flash the bootloader to my blue pill (F103C8T6) using the
st-flash
utility. However, I cannot flash any sketches because macOS doesn't seem to detect a COM port in it (/dev/cu.*
). The only way to flash a sketch reliably is to switch to a Windows machine, use the CDC mode (#19) to flash a first sketch with USART serial enabled, and only then to switch the jumpers to BOOT0-0 and BOOT1-0.If somehow I forget to keep USART enabled in macOS, the COM port disappears and I cannot flash anything again until I reflash the bootloader and a sketch in Windows.