dfu-util is not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

dfu-util is not working

2,550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jchan168 on Fri Feb 05 17:59:54 MST 2016
Hi,

I am using LPCXpresso 8.0.0 and LPCXpresso54102 board on Windows 7. Everything works fine. I try to find a command line tool to flash the device over the USB port and saw this program under the bin, dfu-util. After installing the jumper JP5, it find the device ok. However, when I tried to download the image, I got the following output result as error. I tried both hex and bin file format. I appreciate any help.

c:>dfu-util -D AlgSim.bin
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

Opening DFU capable USB device... ID 1fc9:000c
Run-time device DFU version 0100
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [1fc9:000c] devnum=0, cfg=1, intf=0, alt=0, name="DFU"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0100
Device returned transfer size 2048
No valid DFU suffix signature
Warning: File has no DFU suffix
bytes_per_hash=1221
Copying data from PC to DFU device
Starting download: [Error during download get_status
8 Replies

1,712 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jchan168 on Wed Feb 10 11:24:26 MST 2016
Hi,

The flashing program works well in Ubuntu. Is it possible to install this program only without the entire LPCXpresso package? Thanks.

Joseph
0 Kudos

1,712 Views
thiagosiqueira
Contributor II

Hi Joseph,

Have you managed to find some other way to upload the binary without using LPCXpress?

Thanks.

Thiago

0 Kudos

1,712 Views
converse
Senior Contributor V

Have you tried lpcscrypt? - which can be downloaded from this website.

0 Kudos

1,712 Views
thiagosiqueira
Contributor II

Yes, I have.

I am executing the following?

$ ./dfu-util -d 0x1fc9:0x000c -c 0 -i 0 -t 2048 -R  -D LPCScrypt_140.bin.hdr

It's enable the serial port, when I do this command:

$ ./lpcscrypt queryflash

The result is it:
Number of Flash Devices = 2
Name = BankA
Base = 0x1a000000
Size = 0x80000
Page = 0x1000
Sector = 8-64KB
Blank = 0xff
Buffer = 0x8000
Name = EEPROM
Base = 0x20040000
Size = 0x3f80
Page = 0x80
Sector = NA
Blank = 0x0
Buffer = 0x8000

To program the board I am using an image os lpcscrypt:

$ ./lpcscrypt program ../images/MCB1800_blinky_BankA.bin BankA

The result is the following:
Programmed 5448 bytes to 0x1a000000 in 0.020s (268.608KB/sec)

But nothing happens, I reboot the board but other binary runs.

Any idea?

0 Kudos

1,712 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 08 12:15:57 MST 2016

Quote: jchan168
Hi

Thank you for the information, it is very helpful. Is there an equivalent command line tool I can use on Ubuntu?

Joseph



The same flash programming tools mentioned in the above post are also available with a Ubuntu installation.

Thanks and regards,
LPCXpresso Support
0 Kudos

1,712 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jchan168 on Mon Feb 08 12:08:29 MST 2016
Hi

Thank you for the information, it is very helpful. Is there an equivalent command line tool I can use on Ubuntu?

Joseph
0 Kudos

1,712 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Sat Feb 06 08:18:29 MST 2016
So why not just use the flash programming tools built into LPCXpresso IDE to program via flash using your boards built in LPC-Link2 debug probe:

[list]
  [*]https://www.lpcware.com/content/faq/lpcxpresso/gui-flash-programming-tool
  [*]https://www.lpcware.com/content/faq/lpcxpresso/command-line-flash-programming
[/list]

These are the same underlying tools used by the IDE when you start a debug session.

Regards,
LPCXpresso Support
0 Kudos

1,712 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Feb 05 23:59:36 MST 2016
dfu-util loads a processed image into the RAM of the device. It does not program the flash. Look for another utility.