Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:dfu-util [2020/10/12 10:49] – [Run] darrontools:dfu-util [2022/10/31 14:27] (current) – [Probe] darron
Line 3: Line 3:
 dfu-util can be used to communicate with DFU (device firmware upgrade) enabled devices. dfu-util can be used to communicate with DFU (device firmware upgrade) enabled devices.
  
-One example is the Leaflabs [[:boards:maple|Maple mini]] [[:tools:maple|boot loader]].+Examples include the Leaflabs [[:boards:maple|Maple mini]] [[:tools:maple|boot loader]] and the [[:boards:longan|Longan Nano]].
  
 Be sure to have the latest version installed from at least 2020 if you intend to use Be sure to have the latest version installed from at least 2020 if you intend to use
Line 22: Line 22:
 <code> <code>
 $ dfu-util $ dfu-util
-dfu-util 0.9+dfu-util 0.11-dev
  
 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
-Copyright 2010-2020 Tormod Volden and Stefan Schmidt+Copyright 2010-2021 Tormod Volden and Stefan Schmidt
 This program is Free Software and has ABSOLUTELY NO WARRANTY This program is Free Software and has ABSOLUTELY NO WARRANTY
 Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Line 39: Line 39:
   -d --device <vendor>:<product>[,<vendor_dfu>:<product_dfu>]   -d --device <vendor>:<product>[,<vendor_dfu>:<product_dfu>]
                                 Specify Vendor/Product ID(s) of DFU device                                 Specify Vendor/Product ID(s) of DFU device
 +  -n --devnum <dnum>            Match given device number (devnum from --list)
   -p --path <bus-port. ... .port>       Specify path to DFU device   -p --path <bus-port. ... .port>       Specify path to DFU device
   -c --cfg <config_nr>          Specify the Configuration of DFU device   -c --cfg <config_nr>          Specify the Configuration of DFU device
Line 51: Line 52:
   -D --download <file>          Write firmware from <file> into device   -D --download <file>          Write firmware from <file> into device
   -R --reset                    Issue USB Reset signalling once we're finished   -R --reset                    Issue USB Reset signalling once we're finished
-  -s --dfuse-address <address>  ST DfuSe mode, specify target address for 
-                                raw file download or upload. Not applicable for 
-                                DfuSe file (.dfu) downloads 
   -w --wait                     Wait for device to appear   -w --wait                     Wait for device to appear
 +  -s --dfuse-address address<:...>      ST DfuSe mode string, specifying target
 +                                address for raw file download or upload (not
 +                                applicable for DfuSe file (.dfu) downloads).
 +                                Add more DfuSe options separated with ':'
 +                leave           Leave DFU mode (jump to application)
 +                mass-erase      Erase the whole device (requires "force")
 +                unprotect       Erase read protected device (requires "force")
 +                will-reset      Expect device to reset (e.g. option bytes write)
 +                force           You really know what you are doing!
 +                <length>        Length of firmware to upload from device
 +</code>
 +
 +=== Probe ===
 +
 +==Longan Nano==
 +
 +<code>
 +$ sudo dfu-util -v -l
 +dfu-util 0.9
 +
 +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
 +Copyright 2010-2020 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 DFU: [28e9:0189] ver=0100, devnum=45, cfg=1, intf=0, path="1-1.2", alt=0, name="@Internal Flash  /0x08000000/128*001Kg", serial="3CBJ"
 +</code>
 +
 +==Maple Mini==
 +
 +__Probe__
 +
 +<code>
 +sudo dfu-util -l -v
 +dfu-util 0.11-dev
 +
 +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/
 +
 +libusb version 1.0.22 (11312)
 +Found DFU: [1eaf:0003] ver=0201, devnum=54, cfg=1, intf=0, path="1-1.1.3", alt=0, name="DFU Program RAM 0x20000C00", serial="LLM 003"
 +Found DFU: [1eaf:0003] ver=0201, devnum=54, cfg=1, intf=0, path="1-1.1.3", alt=1, name="DFU Program FLASH 0x08005000", serial="LLM 003"
 +</code>
 +
 +__Program__
 +
 +<code>
 +sudo make -f Makefile.maple_mini dfu-util
 +dfu-util -a 1 -D maple_mini.bin
 +dfu-util 0.11-dev
 +
 +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
 +Opening DFU capable USB device...
 +Device ID 1eaf:0003
 +Device DFU version 0110
 +Claiming USB DFU Interface...
 +Setting Alternate Interface #1 ...
 +Determining device status...
 +DFU state(2) = dfuIDLE, status(0) = No error condition is present
 +DFU mode device DFU version 0110
 +Device returned transfer size 1024
 +Copying data from PC to DFU device
 +Download        [=========================] 100%        17032 bytes
 +Download done.
 +DFU state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
 +Resetting USB to switch back to runtime mode
 +Done!
 </code> </code>