sipeed / platform-gd32v

GD32V: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/gd32v
Other
183 stars 46 forks source link

dfu-util Error: 74 -- please update dfu-util #30

Open mash-graz opened 3 years ago

mash-graz commented 3 years ago

if i use the dfu-util included in your tools-dfuutil packages for uploads i get the well known error 74:

CURRENT: upload_protocol = dfu
Uploading .pio/build/sipeed-longan-nano/firmware.bin
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/

Opening DFU capable USB device...
ID 28e9:0189
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
Downloading to address = 0x08000000, size = 8264

Erase       [                         ]   0%            0 bytes
Erase       [======                   ]  24%         2048 bytes
Erase       [============             ]  49%         4096 bytes
Erase       [==================       ]  74%         6144 bytes
Erase       [======================== ]  99%         8192 bytes
Download    [                         ]   0%            0 bytes
Download    [======                   ]  24%         2048 bytes
Download    [============             ]  49%         4096 bytes
Download    [==================       ]  74%         6144 bytes
Download    [======================== ]  99%         8192 bytes
Download    [=========================] 100%         8264 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
*** [upload] Error 74
=============================  [FAILED] Took 1.89 seconds ====================================

this well known error is already fixed in more recent upstream releases of dfu-util.

it would be very helpful, if you could replace the binaries in the tools-dfuutil by one of this fixed versions.

maxgerhardt commented 3 years ago

The outdated version was also reported in https://community.platformio.org/t/sipeed-longan-nano-on-linux-mint-20-1/20307.

Can a new version please be uploaded? 😄

retiredfeline commented 3 years ago

I also encountered this problem, please fix. I got dfu-util version 0.11 from my Linux distro's repositories. Since updating the gd32v platform insists on installing the old dfu-util package, I worked around this by renaming bin/dfu-util out of the way and then making a symlink to /usr/bin/dfu-util, the latest version.

gsauthof commented 2 years ago

Duplicate of #17 ?