Hi,
I'm using dfu-utils from Debian.
I'm trying to flash a file provided by the manufacturer, it's an ELF file.
I can flash it easily with the Android app StmDfuUsb, but with dfu-util I've got:
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 in a future dfu-util release
Is there a way to flash ELF files ?
Anonymous
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.
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 ?
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 helper tool or as a similar separate tool.