Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blue Pill recognized in macOS, but no port available #27

Closed
amyspark opened this issue Dec 23, 2019 · 1 comment
Closed

Blue Pill recognized in macOS, but no port available #27

amyspark opened this issue Dec 23, 2019 · 1 comment

Comments

@amyspark
Copy link

amyspark commented Dec 23, 2019

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.

@KenjutsuGH
Copy link

KenjutsuGH commented Jun 22, 2020

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:

  1. I flash the latest medium density bootloader .bin file to my BP using a serial adapter.

  2. I then disconnect the serial adapter and completely remove power from the BP, and restore the BOOT jumpers

  3. I reconnect the BP via USB

  4. USB Prober now displays the following:
    USBProber01

  5. I start the Arduino IDE and create a new Blink sketch

  6. I change the settings as follows:
    Arduino01
    Note: There is no serial port available

  7. 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 <reset pages> 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 <reboot mcu> 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
  1. USB Proper now displays:
    USBProber02
    and the Blink sketch is successfully executing
  2. Back in the Arduino IDE, the correct serial port is now available:
    Arduino02
  3. 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 <reset pages> 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 <reboot mcu> command...
> Searching for [cu.usbmodemFD1221] ...
error, counldn't open [/dev/cu.usbmodemFD1221]
> [cu.usbmodemFD1221] is found !
> Finish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants