Spark CLI Flash problem

Hi,

I’m running on Windows 7 and I have the DFU driver installed.

dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/20001Ka,108001Kg"
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg"

But when I try to flash

C:> spark flash --usb firmware_1413159038877.bin
Apparently I didn’t find a DFU device? util said
Error writing firmware… no dfu device found.

Ideas?

Hmm… It looks like dfu-util found the core as they are listed.

Is the Spark-cli the latest version? Check using spark --version and it should be 0.4.1

If it’s not, try to update using npm update -g spark-cli

If Windows has the driver, but the dfu flash isn’t working, try running the command prompt as an Administrator. :slight_smile:

Thanks!
David

1 Like

Spark CLI is version 0.4.1

Retried as Windows Administrator…same result.

Hmmmm

This is an original kickstart Spark is that could be making a difference.

I dont think so as both of my kickstarter cores function great!

Can you try this command:

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin

Also, just to be sure, the core needs to be in blinking yellow mode.

Hi Kenneth,

Blinking Yellow. Here are the results:

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU capable USB device... ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/20*001Ka,108*001Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
core-firmware.bin: No such file or directory

Hi @dloop

It looks like DFU is working for you now, it just didn’t find the core firmware you were trying to flash (core-firmware.bin in this example, but other .bin files in the examples above.)

Do you have a .bin file from a previous compile that you could test with? Or can you compile a test .bin file up and try that?

Flashing yellow.

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D firmware_blink.bin

dfu-util 0.7

Filter on vendor = 0x1d50 product = 0x607f
Opening DFU capable USB device... ID 1d50:607f
Run-time device DFU version 011a
Found DFU: [1d50:607f] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/20*001Ka,108*001Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08005000, size = 77216
............................................................................
File downloaded successfully
Transitioning to dfuMANIFEST state
**Error during download get_status**

Hi @dloop

This is unfortunately a “standard” error that you get every time you use DFU. Basically if you see the … part you are downloading to core and when you get File downloaded successfully you know it was successful.

It short, it worked.

bko thanks.

So I need to flash this way going forward if I want to use USB, and I can’t use “spark flash --usb”?

Well yes, you could compile using the CLI to a bin file and then use DFU directly to flash it.

But if you can now run DFU successfully, nothing is really stopping you from using Spark CLI.

Thanks guys for helping me with this.

For othersL also make sure that dfu-util & libusb-1.0.dll are in path

1 Like