Skip to content

fix: Update dfu-util to 0.11 on Windows and Linux#114

Closed
geosmall wants to merge 2 commits into
stm32duino:mainfrom
geosmall:main
Closed

fix: Update dfu-util to 0.11 on Windows and Linux#114
geosmall wants to merge 2 commits into
stm32duino:mainfrom
geosmall:main

Conversation

@geosmall

@geosmall geosmall commented Jan 4, 2026

Copy link
Copy Markdown

Summary

Update dfu-util to version 0.11 on all platforms for consistent DfuSe support.

Windows Fix (Critical)

The previous Windows dfu-util.exe (version 0.1+svn from 2007-2008) lacked DfuSe support. The -s/--dfuse-address flag is required for STM32 DFU uploads.

Error on Windows:

dfu-util.exe: invalid option -- s

Linux Update

The Linux binaries were also outdated (x86_64 was version 0.8 from 2014).

Changes

Windows

  • Update win/dfu-util.exe to 0.11 static build (self-contained, no DLL dependencies)
  • Remove unused Cygwin DLLs (cygwin1.dll, cygiconv-2.dll) - ~2.9MB reduction
  • Remove unused libusb0.dll (old libusb-0.1, not used by dfu-util 0.11)

Linux

  • Update linux/x86_64/dfu-util from 0.8 to 0.11
  • Update linux/x86_64/dfu-prefix and dfu-suffix to 0.11
  • Update linux/aarch64/dfu-util, dfu-prefix, dfu-suffix to 0.11

Result

All platforms now consistent at dfu-util 0.11:

Platform Before After
Windows 0.1+svn (2007) 0.11
Linux x86_64 0.8 (2014) 0.11
Linux aarch64 unknown 0.11
macOS 0.11 0.11 (unchanged)

Source

dfu-util 0.11 from: http://dfu-util.sourceforge.net/releases/

Testing

  • Windows 11 64-bit: BlackPill F411CE DFU upload successful
  • Linux x86_64: BlackPill F411CE DFU upload successful

The previous dfu-util.exe (0.1+svn from 2007-2008) lacked DfuSe support.
The -s/--dfuse-address flag is required for STM32 DFU uploads to specify
the flash start address (e.g., -s 0x08000000:leave).

Changes:
- Update dfu-util.exe to 0.11 static build (self-contained, no DLL deps)
- Remove unused Cygwin DLLs (cygwin1.dll, cygiconv-2.dll)
- Remove unused libusb0.dll (old libusb-0.1, not used by dfu-util 0.11)

Source: http://dfu-util.sourceforge.net/releases/dfu-util-0.11-binaries.tar.xz

Fixes: "invalid option -- s" error on Windows DFU uploads
- Linux x86_64: 0.8 → 0.11
- Linux aarch64: updated to 0.11
- All platforms now consistent at dfu-util 0.11
@geosmall geosmall changed the title fix(win): Update dfu-util.exe to 0.11 for DfuSe support fix: Update dfu-util to 0.11 on Windows and Linux Jan 5, 2026
@fpistm

fpistm commented Jan 12, 2026

Copy link
Copy Markdown
Member

Hi @geosmall
Thanks for the PR.
I've already tested to move to 0.11 but failed as reset was not functional. I will check again.
Thanks for the PR.

@fpistm

fpistm commented Jun 16, 2026

Copy link
Copy Markdown
Member

Hi @geosmall

I've had some time to tests the dfu-utils 0.11.
Unfortunately, this version break the maple upload.
In fact the only one using the dfu-util in this core.

I tried to understand why you want update it and check your fork.
https://github.com/geosmall/Arduino_Core_STM32/blob/886081fa608f97c249f7c97214d10055248c6731/platform.txt#L282
I understand that having an updated version will allow you to have the -s 0x08000000:leave option functional.

I'm agree having an up to date version is better anyway it is not reliable for the maple upload (error code return or libusb error while it is properly flashed and reset not functional).

I already think about having a generic dfu upload method (thanks the stm32cubeprogrammer if present or fallback to dfu-util).

I see 2 ways to deal with this:

  • use the dfu-util 0.11 for all methods, it requires to update the maple_upload.sh to ignore error and hope to be able to reset it.
  • kept old one for the maple upload only and update scripts to deal with stm32cubeProgrammer or dfu util.

@geosmall

Copy link
Copy Markdown
Author

Thanks for looking at this @fpistm I understand this is an edge case. I have not explored dfu using stm32cubeprogrammer so should try that path as more reliable/maintainable option and report back. Feel free to close the issue as you see best.

@fpistm fpistm added the abandoned No more work on this label Jun 17, 2026
@fpistm

fpistm commented Jun 17, 2026

Copy link
Copy Markdown
Member

Thanks @geosmall for your quick feedback.
For instance I close this PR as it will break the maple upload.
Anyway, keep in mind to add updated dfu-util version and provide it for real dfu upload when stm32cubeprogrammer is not available.

@fpistm fpistm closed this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abandoned No more work on this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants