Closed
Description
Describe the bug
When selecting a Bluepill STM32F103C8 and the Mapple Bootloader 2.0 from here, the STM32Duino core fails to use the correct USB PID/VID of 0x1EAF:0x003 and instead uses 0x0483:0xdf11. Upload subsequently fails to find the correct device.
To Reproduce
No source code relevant. Blinky sketch for PC13.
Steps to reproduce the behavior:
- Use ST-Link or USB-to-UART adapter to first mass erase the flash
- Burn in generic_boot20_pc13.bin
- Reboot the Bluepill, "Maple DFU" device shows up (asssumes driver is installed
- Select Bluepill C8 and Maple Bootloader 2.0 in the Tool settings
- Hit upload
- See an invocation of
"C:\Users\Max\AppData\Local\Arduino15\packages\STMicroelectronics\tools\STM32Tools\2.2.2/win/busybox.exe" sh "C:\Users\Max\AppData\Local\Arduino15\packages\STMicroelectronics\tools\STM32Tools\2.2.2/maple_upload.sh" COM1 2 0x0483 0xdf11 "C:\Users\Max\AppData\Local\Temp\arduino\sketches\68F814A2F7381590CAB9CFF90ED55329/sketch_jun16a.ino.bin"
Get hit with failure
No DFU capable USB device found
(no wonder if you select teh wrong VID/PID)
Expected behavior
Uploading with the Maple bootloader actually uses the right PID/VID
Screenshots
None
Desktop (please complete the following information):
- OS: Windows 10
- Arduino IDE version: 2.3.2
- STM32 core version: 2.8.0
- Tools menu settings if not the default: per
- Upload method: Maple Bootloader 2.0
Board (please complete the following information):
- Name: Bluepill STM32F103C8
- Hardware Revision: -/-
- Extra hardware used if any: None
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
maxgerhardt commentedon Jul 13, 2024
And wtf is this doing
Arduino_Core_STM32/boards.txt
Lines 2526 to 2528 in b24801b
It spells
0xLEAF
butL
for sure is not a hexadecimal number, it should be1EAF
maxgerhardt commentedon Jul 13, 2024
Oh lookie lookie there, when I change
Arduino_Core_STM32/platform.txt
Lines 113 to 114 in b24801b
to be
I do get a successfull upload
maxgerhardt commentedon Jul 13, 2024
So obviously, when Tools -> Upload Method --> Maple DFU Bootloader 2.0 is selected, it should use 1EAF:0003 as the VID:PID for DFU-Util. This is probably even irregardless of the selected chip (doesn't matter whether "Generic STM32F103C8" or "Bluepill C8", since the Maple DFU bootloader will always show up as that VID:PID. I'm not sure what this core here is doing using that other 0x0483:0xdf11, because that is the generic "STM Device in DFU Mode" VID/PID, not the one for Maple.
I'm a bit baffled that the most popular Bluepill board with the most popular USB bootloader can't be used in this core out of the box-
fpistm commentedon Jul 15, 2024
Hi @maxgerhardt
Thanks for reporting this
A typo mistake, sorry for this. I've made a lot of changes to feat new Arduino specification. I've tested the Blue Pill but when rebased and squashed several branches I've made a mistake. I'm only human so please be comprehensive....
Same here, this kind of comment is really not constructive and only your opinion. It is a community project and all contributions are welcome (PR, review, discussions,...). Doing my best (alone) ...
Fixed by #2440.