Xilinx (AMD) bootloader (FSBL) issues on Windows
Seconding this solution. Thank you so much!
Error LIBUSB_ERROR_NOT_SUPPORTED with Arduino nano R4
Arduino IDE error message
Same question here. Especially interested in the fixes to handle a reset device properly, e.g.: https://sourceforge.net/p/dfu-util/dfu-util/ci/83b4abcf8a2c168d8e4e5fc2261fc88ec22bb00c/ I am using this in an embedded Buildroot environment. And I had to manually add these patches to patch v0.11 in my build system, because else I got erroneous return codes from successful dfu-util upgrades.
It is not often that ELF files are used to provide firmware to end users as in this example. However it is often the primary build artifact so it would be convenient for development. It is interesting that StmDfuUsb supports ELF files because it is not mentioned on the home page https://yatrim.com/stmdfuusb I am not hugely in favour of adding all kind of file formats to dfu-util, because it adds complexity, maintenance burden and probably build dependencies. I would prefer it being added to the dfuse-pack.py...
I don't know what's inside. It's this device : https://skybean.eu/so-vario My question is more of a feature request : would it be possible to somehow parse ELF files do deduce the correct parameters for flashing ?
You mention StmDfuUsb but not anything about what device and bootloader it is. Please see https://sourceforge.net/p/dfu-util/tickets/new/ You can convert the ELF file to a binary using objcopy. If it is a standard DFU 1.1 device then that's all fine, but if it a DfuSe bootloader you must know where to load it, this information is in the ELF file but not in the binary file.
How to write elf file ?
dfu-util does not work on Windows ARM64 (Surface Pro etc)
I may have found the issue. In the script there are individual steps to programming the bootloader and application (the script being written by TI called usb_dfu_uniflash.py, in that scrip it checks the status of the target device using dfu-util -l between steps to check enumeration of the device to make sure it is ready for the next step. It looks like the -p <path> can change between steps and the script can't handle that. I am going to modify TI's script and see if I can make this more reliab...
I remember having seen, many years ago, an issue with a program running via Python's subprocess. I will try to recall or find back to it. You said that you added a lock that assures only one invocation of dfu-util is running at a time, but that didn't help. It therefore seems to me that the problem is not running dfu-util in parallel, but something else.
The failure looks to be hanging after the first block of data is transferred and before we enumerate the device again: Failing system [ 1.901426] [002f018d] libusb: debug [libusb_free_transfer] transfer 0x1cbf8ab0 DFU state(2) = dfuIDLE, status(0) = No error condition is present Done! [ 1.901440] [002f018d] libusb: debug [libusb_close] [ 1.901447] [002f018d] libusb: debug [usbi_remove_event_source] remove fd 7 [ 1.901492] [002f018d] libusb: debug [libusb_exit] [ 1.901567] [002f018e] libusb: debug...
This is the detailed log file from the hung dfu-util programming of AM243x - above was same failure without -vvv.
dfu-util hangs about 25% of the time when run in parallel via python subprocess
Thanks for your feedback. Yes, I have also been thinking about this and for long :) It is good to receive some feedback on the latest git, and that these changes have an impact. I usually don't hear anything on this side unless something is broken... I will look at retargeting those milestones and make a release soon.
Create new release?
Arduino exit status 74 Failed uploading: uploading error: exit status 1
To clarify, this is a bug in the Arduino IDE (or its esp32 board package). You must report it there. Here on the dfu-util side there is nothing we can do. The Arduino people are bundling dfu-util with their setup, but we cannot fix their setup.
Hi Christopher, Just letting you know, we've encountered the same situation (can be reproduced on win11 and win10). Turns out new MS Teams are probing USB devices (presumably searching for communication devices to use) which triggers a request for device language ID descriptor from each connected USB devices. Since Xilinx (AMD) bootloader (FSBL) does not know how to handle this request, it goes into some weird state which causes DFU to stop responding. Issue can be mitigated by closing MS Teams....
DFU commands don't work because Windows drivers invalid after updates
I have the same problem. Using system information on macOS to see USB device details, this board used to work with USB device name "Nano ESP32" and manufacturer "Arduino". Now I get an error and it has the name "USB JTAG/serial debug unit" and manufacturer "Espressif". Below is the output while trying to upload using the Arduino IDE: Sketch uses 690741 bytes (21%) of program storage space. Maximum is 3145728 bytes. Global variables use 55048 bytes (16%) of dynamic memory, leaving 272632 bytes for...
Cannot open DFU device 2341:0366 found on devnum 34 (LIBUSB_ERROR_NOT_FOUND) This means the device shortly showed up, but then disappeared before dfu-util could connect.
I have same issue: Warning: Invalid DFU suffix signature A valid DFU suffix will be required in a future dfu-util release Cannot open DFU device 2341:0366 found on devnum 34 (LIBUSB_ERROR_NOT_FOUND) No DFU capable USB device available Failed uploading: uploading error: exit status 74 This system is out of the box and not operating for sketch upload.
No DFU capable USB device available
No DFU capable USB device available Without more information there is not much we can do about it.
dfu
dfu-util 0.9 is pretty old. You should try to update your Arduino board package for your board/device. I don't think the dfu-util version is the real problem, but newer versions are more helpful for debugging. In any case, here it looks like the firmware file could not be found, so there is nothing dfu-util can do about it.
dfu-util doesn't access serial ports (nor virtual serial ports). LIBUSB_ERROR_ACCESS indicates a permission issue or driver conflict. Please see https://sourceforge.net/p/dfu-util/tickets/186/
The same : Arduino UNO R4 detected with card information serial number and type (ttyACM0), compile, but when sending : dfu-util 0.11-arduino4 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Cannot open DFU device 2341:0069 found on devnum 7 (LIBUSB_ERROR_ACCESS) dfu-util: No DFU capable USB device...
Arduino exit status 74 Failed uploading: uploading error: exit status 1
Did you look inside the file?
Bonjour Ou faut il le mettre ce fichier 60-dfuse.rules ?
You can use dfu-suffix to change or remove the VID:PID of the firmware file.
Error: File ID does not match device
Please see https://sourceforge.net/p/dfu-util/tickets/186/
also: I can compile and upload to Arduino Nano, Uno, Mega w/o issues
Cannot open DFU device
f you're having issues with DFU-Util: Just change the USB cable! Some cables only support charging but not data transfer. Hope this helps someone! 😊
Greetings! Is there any chance to have this patch be applied in the near future? We do have some laptops here where a webcam always exposes it's dfu interface which dfu-util seems to prefer over our devices and it's kind of a pain to have to specify VID/PID for these devices.
Move SourceForge links (and other links) to https
BTW, why are you using -t 0 ?
Warning: Invalid DFU suffix signature
Arduino ESP32 "No DFU capable USB device available"
Arduino Nano ESP32 "LIBUSB_ERROR_NOT_FOUND"
Arduino UNO R4 minima LIBUSB_ERROR_NOT_FOUND
Sri, I mistakenly thought it was you posting as anonymous above. Your original problem is the same as in https://sourceforge.net/p/dfu-util/tickets/207/ so I will close this ticket. You can reopen it if you have more information. The anonymous posters can post in https://sourceforge.net/p/dfu-util/tickets/197
candleLight flash can bus
You'll need to provide more information, see https://sourceforge.net/p/dfu-util/tickets/new/
Arduino UNO R4 minima LIBUSB_ERROR_NOT_FOUND
Failed uploading: uploading error: exit status 74 (bad cable)
Muchas gracias, puedes solucionar soloo cambiando al cable original que trae el Arduino, muchas gracias.
hackrf dfu crc mismatch
You'll have to post all information and logs, as instructed on https://sourceforge.net/p/dfu-util/tickets/new/ otherwise I have to second-guess what is going on.
Now since you are on (Fedora) Linux, you should be able to follow what is happening, using journalctl -f or tail -f /var/log/syslog . You will probably see the USB device 2341:0069 appear, but then disconnect. This is also interesting: Claiming USB DFU (Run-Time) Interface... This means the device is in Run-Time mode and not in bootloader (that would be DFU mode). I don't know anything about these devices so I don't know if this is intended. Is another device showing up after the "DFU detach request"...
Now since you are on (Fedora) Linux, you should be able to follow what is happening, using journalctl -f or tail -f /var/log/syslog . You will probably see the USB device 2341:0069 appear, but then disconnect. This is also interesting: Claiming USB DFU (Run-Time) Interface... This means the device is in Run-Time mode and not in bootloader (that would be DFU mode). I don't know anything about these devices so I don't know if this is intended.
dfu-util: Lost device after RESET? The device disappears, so dfu-util cannot do anything. This must be fixed in the Arduino IDE or bootloader. dfu-util 0.11-arduino4 This is Arduino's own version of dfu-util. There seems to be a newer dfu-util 0.11-arduino5 out, you should try that also.
Arduino Uno R4 minima Fedora 41 Arduino IDE 2.3.4 Sketch uses 38820 bytes (14%) of program storage space. Maximum is 262144 bytes. Global variables use 3940 bytes (12%) of dynamic memory, leaving 28828 bytes for local variables. Maximum is 32768 bytes. dfu-util 0.11-arduino4 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/...
ARDUINO UNO R4 minima
Global variables use 37600 bytes (11%) of dynamic memory, leaving 290080 bytes for local variables. Maximum is 327680 bytes. "/home/nor/.arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "/tmp/arduino/sketches/942823F4123F8A667D9BE4CC1FCEEFA3/SDCardReadWriteTest.ino.bin" -Q dfu-util: No DFU capable USB device available dfu-util 0.11-arduino4 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt...
all connections are fine but still it always appears "No DFU capable USB device available"
Please see for instance https://sourceforge.net/p/dfu-util/tickets/186/ There is nothing that dfu-util can do about the situation, the problem is in the Arduino IDE.
esp32 No DFU capable USB device available
hackrf dfu crc mismatch
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Found Runtime: [1d50:606f] ver=0000, devnum=2, cfg=1, intf=1, path="6-1", alt=0, name="candleLight firmware upgrade interface", serial="000300285542501220393839" biqu@BTT-CB1:~$
flash can bus
Compare/Verify a firmware with firmware file
esp32
The problem is mostly caused by dfu-util that executes Leave (which will reset device) before the last DFU GetStatus has completed which can be seen by the attached bustrace where the SETUP Status phase (OUT) never completes since device has been reset. This will cause GetStatus to return a failure result.
only still status 10. But now after programming i put the boot pin in off state and then i reset the uC. In this way dfu-util 0.11 seems works without any others issues.
Is there any indication there is something wrong in dfu-util still?
thanks
It is there in your 0.9 output as well: Determining device status: state = dfuERROR, status = 10 v0.11 is more helpful with telling what "10" means.
why this error is not present in V 0.9 with the same bootloader ?
This is the status that the bootloader itself reports. I think it is just a bug in the ST bootloader. It would make sense if this status would be reported before anything is programmed (and there would be no run-time to go to), but I don't know if and how the bootloader tries to determine this. Maybe it is meant to check if there is a valid stack and boot vector at 0x08000000, but I don't know what your device bootloader is actually doing. The dmesg output on the host may reveal if the device is...
Hi, what is the meaning of : DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations After dfu-utils programming sometimes remain in bootloader sometimes not and expose the /dev/ttyACMx Anyway i will try to invoke dfu-util 0.11 and after this put the boot pin off and reset the microcontroller
So it seems erase and programming works fine without issues. Are you sure it /remains/ in bootloader after the leave request, and that it doesn't reset and, for some reason or another (BOOTx pins?) boots into the bootloader again?
Hi, after this output very often the micro controller remain in BOOTLOADER..... dfu-util -a 0 -s 0x08000000:leave -t 0 -D rlz_010000_CoreCell_USB.bin dfu-util 0.11 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2021 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Warning: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required...
Please try 0.11 or latest git, and paste the output. If on latest git, you can also try the ":fast" modifier.
Problem solved: I use a different cable and it worked: Opening DFU capable USB device... Device ID 2341:0069 Run-Time device DFU version 0101 Claiming USB DFU (Run-Time) Interface... Setting Alternate Interface zero... Determining device status... DFU state(0) = appIDLE, status(0) = No error condition is present Device really in Run-Time Mode, send DFU detach request... Device will detach and reattach... Opening DFU USB Device... Claiming USB DFU Interface... Setting Alternate Interface #0 ... Determining...
dfu-util Error during special command "ERASE_PAGE" get_status
Thanks for a good and detailed bug report. Unfortunately, the LIBUSB_ERROR_NOT_FOUND appearing together with "found on devnum XX" means that the DFU device was available for a short time but then disappeared. It is probably not staying long enough in DFU mode. This is a problem in the device bootloader, or the program (IDE) that puts it into DFU mode. There is not much dfu-util can do about it.
dfu-util Error When Attempting to Flash Arduino Nano ESP32
Failed uploading: uploading error: exit status 74
Around 47ms for a 120kB image and a 2kB block size (60 transactions). Indeed, I am not sure whether it would work for any combination of memory size/block size. As per AN3156, it seems to apply for all cortex-m series.
Interesting, thanks! At a first view, this seems to make sense. It is limited to 65535-2 blocks though, but that can be dealt with if necessary. How much is the gain that you are seeing?
Use transaction block number for address offset