[File] [PATCH] Magdir/firmware DFU images

Alexandre IOOSS erdnaxe at crans.org
Tue Sep 3 14:55:01 UTC 2024


Hello,

While working with MicroPython on STM32 devices, I noticed that file 
does not recognize the DFU firmware upgrade format (.dfu files).

Attached you will find a patch to add DFU image detection to file.

I tested the patch using some firmware samples, including those from 
MicroPython project:
```
$ file *.dfu
ADAFRUIT_F405_EXPRESS-20240602-v1.23.0.dfu:      DFU image (STM 
variant), size: 327485 bytes, for device 0483:DF11
ARDUINO_GIGA-20240602-v1.23.0.dfu:               DFU image (STM 
variant), size: 1110573 bytes, for device 2341:0366
ARDUINO_NICLA_VISION-20240602-v1.23.0.dfu:       DFU image (STM 
variant), size: 1114117 bytes, for device 2341:035F
ARDUINO_PORTENTA_H7-20240602-v1.23.0.dfu:        DFU image (STM 
variant), size: 1133157 bytes, for device 2341:035B
B_L072Z_LRWAN1-20240602-v1.23.0.dfu:             DFU image (STM 
variant), size: 154389 bytes, for device 0483:DF11
B_L475E_IOT01A-20240602-v1.23.0.dfu:             DFU image (STM 
variant), size: 325637 bytes, for device 0483:DF11
CERB40-20240602-v1.23.0.dfu:                     DFU image (STM 
variant), size: 317381 bytes, for device 0483:DF11
ESPRUINO_PICO-20240602-v1.23.0.dfu:              DFU image (STM 
variant), size: 271333 bytes, for device 0483:DF11
GARATRONIC_NADHAT_F405-20240602-v1.23.0.dfu:     DFU image (STM 
variant), size: 332605 bytes, for device 0483:DF11
GARATRONIC_PYBSTICK26_F411-20240602-v1.23.0.dfu: DFU image (STM 
variant), size: 321053 bytes, for device 0483:DF11
HYDRABUS-20240602-v1.23.0.dfu:                   DFU image (STM 
variant), size: 320557 bytes, for device 0483:DF11
```

Thank you,
Best,
-- 
Alexandre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfuse.diff
Type: text/x-patch
Size: 713 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20240903/e9506fa1/attachment.bin>


More information about the File mailing list