Dfu-util version 0.8 coming soon

I just talked with Tormod Volden of the dfu-util project. They are approaching the release of version 0.8, which will send firmware to the Core much faster than the current version and also fixes a bug resulting in an incorrect byte count in the output.

Tormod is very happy to support Spark users, and he wanted me to make sure people know that they should report any bugs in dfu-util to dfu-util@lists.gnumonks.org just like the command line output says!

Keep your eye on http://dfu-util.gnumonks.org/ for the release, coming soon!

4 Likes

Is it coming for Mac too? :smiley:

i’ve been using 0.8 from git for months now

there’s a build from today’s git for amd64 debian/ubuntu here and also a slightly older one for raspberry pi/beaglebone black.

Kenneth, the release is source code, so it‚Äôs ‚Äúreleased‚ÄĚ for any system that can build it. Like @sej7278, I‚Äôve been using the master branch for months now as well, mainly because I flash firmware using DFU many times per day. The speed increase saves me a lot of time!

We only have mac laptops in our office. The command system_profiler SPUSBDataType returns the following output for the Spark Core.

CORE DFU :

  Product ID: 0x607f
  Vendor ID: 0x1d50
  Version:  2.00
  Serial Number: 8D96428E5349
  Speed: Up to 12 Mb/sec
  Manufacturer: Spark Devices     
  Location ID: 0x06200000 / 4
  Current Available (mA): 500
  Current Required (mA): 100

Tormod needs the lsusb output for his internal troubleshooting documentation. Could someone using linux please put their Core in DFU mode and run

lsusb -d 607f:1d50 -v

and paste the results here? Thanks!

you got the vendor id’s backwards, but here’s the output:

# lsusb -d 1d50:607f -v

Bus 001 Device 008: ID 1d50:607f OpenMoko, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1d50 OpenMoko, Inc.
  idProduct          0x607f 
  bcdDevice            2.00
  iManufacturer           1 Spark Devices     
  iProduct                2 CORE DFU 
  iSerial                 3 8D80527B5055
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           36
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2 
      iInterface              4 @Internal Flash  /0x08000000/20*001Ka,108*001Kg
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2 
      iInterface              5 @SPI Flash : SST25x/0x00000000/512*04Kg
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                       11
          Will Detach
          Manifestation Intolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    255 milliseconds
        wTransferSize                    1024 bytes
        bcdDFUVersion                   1.1a
Device Status:     0x0001
  Self Powered

that’s plugged into a usb 2.0 port, the core doesn’t seem to like usb 3.0

can you edit and remove the iSerial if that’s sensitive?

this is a white core 1.0

Thanks @sej7278! I passed that on to Tormod. Don’t worry, iSerial is not sensitive.

1 Like

Hey @zachary

A while back we discussed about the dfu suffix and noted that future releases may need it. Whats your thoughts on adding it to the makefile to future-proof?

1 Like

We definitely should add the dfu suffix to the binary. Pull request please!

its only a one-liner in build/makefile isn’t it?

dfu-suffix -d 1d50:607f -a $@

Yep that’s what i did, tried and tested many times on my local build setup

I had to split the vendor and product using the -v and -p instead of using -d

# Create a bin file from ELF file
%.bin : %.elf
    @echo Invoking: ARM GNU Create Flash Image
    $(OBJCOPY) -O binary $< $@
    @echo Adding dfu-suffix to binary
    dfu-suffix -v 1d50 -p 607f -a $@
    @echo

here is the output, note the last line still says No valid DFU suffix signature but i think its just because there was none before it added one… and it works to stop the error when flashing

Invoking: ARM GNU Create Flash Image
arm-none-eabi-objcopy -O binary core-firmware.elf core-firmware.bin
Adding dfu-suffix to binary
dfu-suffix -v 1d50 -p 607f -a core-firmware.bin
dfu-suffix (dfu-util) 0.7

(C) 2011-2012 Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

New DFU suffix added.
No valid DFU suffix signature
1 Like

I have compiled using the 0.8 source code but did not see much speed improvements.

For those who are interested, you can follow the instructions here: http://dfu-util.gnumonks.org/build.html

Any ideas? :wink:

I didnt notice much in the way of speed improvements either… but 20 seconds isn’t really an issue for me, sure beats the 3 or 4 mins of the OTA

The main thing is the progress bar is much nicer!

i don’t think there’s any speed improvements in dfu-util 0.8, i suspect zach is confused with avrdude 5 vs 6

Yeah, actually, I just went back in git trying to find the commit that sped things up and found that it always took roughly 12.5 seconds with current firmware master binary (79900 bytes). It did get a tiny bit faster at some point (12.55 seconds down to 12.47 seconds). I’m not confusing it with with avrdude, but I might’ve heard it from someone else on the Spark team and not verified. The speed up might’ve been somewhere else in our factory programming process rather than dfu-util itself.

Ah, OK, I found an email conversation between me and @Dave on April 23rd where he suggested the latest dfu-util made our total factory test and programming time a handful of seconds faster, which was probably an accumulation of many small differences.

In any case, there are several improvements in 0.8 (released Sept 13, 2014) since 0.7 was released Oct 7, 2012. Many of the improvements are specific to the Spark Core and came directly out of discussions here in the community! :sparkling_heart:

In particular, I know this one was a big deal:
https://gitorious.org/dfu-util/dfu-util/commit/cca127e4f53087c71253f3e3040b66165ce490af

2 Likes

@zachary - just a reminder that the suffix stuff hasn’t been added to the firmware yet:

dfu-suffix -d 1d50:607f -a $@

1 Like

As I said above, I was hoping somebody out there would submit a pull request. I just did it:

1 Like

Does anyone have a compiled Windows x32 binary version they could make available?

http://dfu-util.gnumonks.org/releases/dfu-util-0.8-binaries.tar.xz :slight_smile:

1 Like