Skip to content

Maple upload broken #2436

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

Closed
maxgerhardt opened this issue Jul 13, 2024 · 4 comments · Fixed by #2440
Closed

Maple upload broken #2436

maxgerhardt opened this issue Jul 13, 2024 · 4 comments · Fixed by #2440
Labels
bug 🐛 Something isn't working
Milestone

Comments

@maxgerhardt
Copy link
Contributor

maxgerhardt commented Jul 13, 2024

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:

  1. Use ST-Link or USB-to-UART adapter to first mass erase the flash
  2. Burn in generic_boot20_pc13.bin
  3. Reboot the Bluepill, "Maple DFU" device shows up (asssumes driver is installed
  4. Select Bluepill C8 and Maple Bootloader 2.0 in the Tool settings
  5. Hit upload
  6. 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
    grafik
  • 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.

@maxgerhardt
Copy link
Contributor Author

And wtf is this doing

Arduino_Core_STM32/boards.txt

Lines 2526 to 2528 in b24801b

# DFU mode on built-in bootloader not available, assuming using STM32duino-bootloader
GenF1.upload.vid.0=0xleaf
GenF1.upload.pid.0=0x0003

It spells 0xLEAF but L for sure is not a hexadecimal number, it should be 1EAF

@maxgerhardt
Copy link
Contributor Author

Oh lookie lookie there, when I change

upload.vid=0x0483
upload.pid=0xdf11

to be

upload.vid=0x1eaf
upload.pid=0x0003

I do get a successfull upload

grafik

@maxgerhardt
Copy link
Contributor Author

maxgerhardt commented 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.

grafik

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
Copy link
Member

fpistm commented Jul 15, 2024

Hi @maxgerhardt
Thanks for reporting this

And wtf is this doing

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....

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-

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.

@fpistm fpistm added the bug 🐛 Something isn't working label Jul 15, 2024
@fpistm fpistm added this to the 2.8.1 milestone Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants