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

Question about DFU vs DfuSe #4

Open
iddq opened this issue Nov 29, 2023 · 8 comments
Open

Question about DFU vs DfuSe #4

iddq opened this issue Nov 29, 2023 · 8 comments

Comments

@iddq
Copy link

iddq commented Nov 29, 2023

Plain DFU is not supported yet, only DfuSe devices like STM32.

Hello,

Can you help me to find some references please what is the difference between DFU and DfuSe?

Thank you.

@sourcebox
Copy link
Owner

A DFU file is just a raw image that has a 16 byte suffix appended. The format of the suffix is described in Appendix B of https://www.usb.org/sites/default/files/DFU_1.1.pdf. Since the file does not specify any information about memory layout, it can only be transferred as whole, leaving it up to the device to process it.

A DfuSe file is a DFU file with the mentioned suffix, but the image itself has a specific format. This allows to define several sections at different memory addresses. The format is described in document UM0391 from ST, unfortunately there's currently no direct link to it on the ST site. You can try http://rc.fdr.hu/UM0391.pdf as alternative.

@JohnAZoidberg
Copy link

I found that I can add a DFU suffix with this tool: https://dfu-util.sourceforge.net/dfu-suffix.1.html
Then dfu-buddy will recognize it as a "Plain" DFU file.

@sourcebox
Copy link
Owner

I found that I can add a DFU suffix with this tool: https://dfu-util.sourceforge.net/dfu-suffix.1.html Then dfu-buddy will recognize it as a "Plain" DFU file.

Yes, DFU buddy will recognize the file correctly. But it can't be flashed because plain files require a different handling on the USB layer - which is currently not implemented.

@BitLoose
Copy link

BitLoose commented Mar 6, 2025

Nice looking GUI! Has this been tested on STM32H743VIT MCUs?

@sourcebox
Copy link
Owner

Nice looking GUI! Has this been tested on STM32H743VIT MCUs?

I think I did some tests with a H723 series chip. In general, it should work with the H7, so just give it a try. If you don't get any error messages when flashing, chances are good that everything works correctly.

@BitLoose
Copy link

BitLoose commented Mar 6, 2025

Thanks, I've never used Rust before, so it might take a while to setup, I'm a C/C++ and ASM coder, not much difference hopfully

@sourcebox
Copy link
Owner

Thanks, I've never used Rust before, so it might take a while to setup, I'm a C/C++ and ASM coder, not much difference hopfully

Rust setup is quite simple compared to C++, especially on Linux and macOS. Just use rustup as described on the official site. After that, all you have to do is clone the repository and run cargo run --release.

But I think it's also time to put some updated binaries onto the releases page.

@BitLoose
Copy link

BitLoose commented Mar 7, 2025 via email

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

4 participants