Ralim / IronOS

Open Source Soldering Iron firmware
https://ralim.github.io/IronOS/
GNU General Public License v3.0
7.14k stars 712 forks source link

Please include a DFU suffix in firmware files for USB DFU #1050

Closed tormodvolden closed 2 years ago

tormodvolden commented 3 years ago

This is recommended (see also the standard https://www.usb.org/sites/default/files/DFU_1.1.pdf) so that the file includes a checksum, plus USB VID/PID so that users don't burn firmware files onto the wrong device (there are for instance laptop built-in bluetooth adapters with DFU support, and nobody wants to brick those).

For instance the tool dfu-suffix from the dfu-util package can be used to easily add such a suffix.

Ralim commented 3 years ago

Yeah makes sense. Will need to have a look into the exact incantation to add this for the Pinecil / Miniware irons to create dfu files instead of .bin's

tormodvolden commented 3 years ago

Something like dfu-suffix --vid 28E9 --pid 0189 --add Pinecil_xy.bin

Or, since the Pinecil appears to use a DfuSe bootloader, dfuse-pack.py can be used to make a DfuSe .dfu file that also contains the load address and alternate interface number. It should be something like (not tested): dfuse-pack.py -b 0x08000000@0:Pinecil_xy.bin -D 0x28E9:0x0189 Pinecil_xy.dfu