When flashing an stm32, I always get this last line from dfu-utils: dfu-util: Error during download get_status
Implying unsuccessful flashing. However, firmware is flashed successfully. Is there a way to get rid of this error?
Computer environment: Linux Kubuntu 24.04 amd64
Exact version of dfu-util: from distro 0.11
Device: own device with stm32
Full command line used: sudo dfu-util -a 0 -i 0 -s 0x08000000:leave -D firmware.bin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the firmware is downloaded successfully. I am worried about user confusion b/c this is a process the customers may have to do in the future. Will test latest git.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The omission of the :leave option will also get rid of the error (but then the device will not be restarted). I am wondering if this is just a timing issue, that dfu-util is requesting the USB status before the device had time to restart.
Last edit: Nick Neupert 2025-12-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, I think the device is misbehaving. After receiving the "leave" request, it should answer the get_status request and actually only proceed to "leaving" afterwards. Which chip / bootloader is this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would need more info to tell. Please see what is written on https://sourceforge.net/p/dfu-util/tickets/new/
Computer environment: Linux Kubuntu 24.04 amd64
Exact version of dfu-util: from distro 0.11
Device: own device with stm32
Full command line used: sudo dfu-util -a 0 -i 0 -s 0x08000000:leave -D firmware.bin
Show output with -l option
Show output with -v option added:
Thanks! It is possible that this has been fixed in git after 0.11 was released. Can you please try latest git?
As you can see from "File downloaded successfully" the download is fine. It is the "leave" request afterwards that gives an error message.
Yes, the firmware is downloaded successfully. I am worried about user confusion b/c this is a process the customers may have to do in the future. Will test latest git.
Tried it with git version and getting a different wording of the error:
The omission of the
:leaveoption will also get rid of the error (but then the device will not be restarted). I am wondering if this is just a timing issue, that dfu-util is requesting the USB status before the device had time to restart.Last edit: Nick Neupert 2025-12-21
No, I think the device is misbehaving. After receiving the "leave" request, it should answer the get_status request and actually only proceed to "leaving" afterwards. Which chip / bootloader is this?
The chip is a STM32G474RETx
It uses this built-in bootloader API: https://www.st.com/resource/en/application_note/an3156-usb-dfu-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
Bootloader version is 0xD5 (or v13.5)
https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf
Last edit: Nick Neupert 2025-12-21