IDE Tools->Port is inactive when using STM32 Blue Pill board with maple bootloader

Hello.
I want to flash a program into my STM32F103C6T6 Blue Pill board.
I found that in order to flash a program via USB with Arduino, one of the possible ways, is through maple bootloader.
I tried the "maple_mini_boot20.bin" from https://github.com/rogerclarkmelbourne/STM32duino-bootloader/tree/master/binaries.
I flashed the bootloader into the microcontroller with OpenOCD and ST-Link V2 programmer.
I disconnected the programmer, connected the board to my PC via USB and checked whether the USB connected is working (I am using linux):

$ lsusb
...
Bus 003 Device 010: ID 1eaf:0003 Leaflabs Maple DFU interface
...
$ dmesg | tail
[   84.501385] usb 3-2: new full-speed USB device number 10 using xhci_hcd
[   84.642293] usb 3-2: New USB device found, idVendor=1eaf, idProduct=0003, bcdDevice= 2.01
[   84.642296] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   84.642297] usb 3-2: Product: Maple 003
[   84.642298] usb 3-2: Manufacturer: LeafLabs
[   84.642298] usb 3-2: SerialNumber: LLM 003
$ dfu-util --list
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
dfu-util: Failed to retrieve language identifiers
Found DFU: [1eaf:0003] ver=0201, devnum=10, cfg=1, intf=0, path="3-2", alt=2, name="UNKNOWN", serial="UNKNOWN"
Found DFU: [1eaf:0003] ver=0201, devnum=10, cfg=1, intf=0, path="3-2", alt=1, name="UNKNOWN", serial="UNKNOWN"
Found DFU: [1eaf:0003] ver=0201, devnum=10, cfg=1, intf=0, path="3-2", alt=0, name="UNKNOWN", serial="UNKNOWN"

Observe, in the last output of "dfu-util" there are some errors "Failed to retrieve language identifiers", and also it displays "UNKNOWN" for both name and serial of the board. I'm not sure if that's how it should be. At least, it detects the USB device, usb ID matches.

I expected to see a USB device in /dev/ttyUSB0, but there is no such device:

$ ls /dev/ttyUSB0
ls: cannot access '/dev/ttyUSB0': No such file or directory

I installed Arduino IDE, added additional boards manager URL for STM32 MCUs: https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/main/package_stmicroelectronics_index.json

And installed "STM32 MCU Based Boards" board.

Then I selected my board and some other configuration:

But as you can see here, the Port item is not active.
I ignored it and tried to upload an example blink program into my board via USB.
It produces the following output in the console:

Sketch uses 23864 bytes (36%) of program storage space. Maximum is 65536 bytes.
Global variables use 4408 bytes (21%) of dynamic memory, leaving 16072 bytes for local variables. Maximum is 20480 bytes.
An error occurred while uploading the sketch
Usage: /home/user/.arduino15/packages/STMicroelectronics/tools/STM32Tools/2.2.1/maple_upload.sh <dummy_port> <altID> <usbID> <binfile> 2 1EAF:0003 /tmp/arduino_build_786932/Blink.ino.bin

The "maple_upload.sh" script expects 4 arguments, but only 3 were given.
I modified the script a little so that it outputs the command line string just after the original "Usage" line. As far as I can tell, it lacks the first "dummy_port" argument. The latest three arguments seem to be correct.

Also, I tried another bootloader binary "generic_boot20_pc13.bin" from the same repository. It didn't help either.

What could be the problem?
Hope for your help!

I'm facing similar problems. Did you ever get this fixed on Linux ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.