im-tomu / foboot

Bootloader for Fomu
Apache License 2.0
100 stars 32 forks source link

Can't seem to update my Fomu #257

Open fancellu opened 3 years ago

fancellu commented 3 years ago

Windows10

As I got it, dfu-util -l says

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Cannot open DFU device 2972:0047
Cannot open DFU device 2972:0047
Found DFU: [1209:5bf0] ver=0101, devnum=3, cfg=1, intf=0, path="2-1.4", alt=0, name="Fomu PVT running DFU Bootloader v1.9.1", serial="UNKNOWN"

I then try to update it

dfu-util -D F:\downloads\pvt-updater-v2.0.3.dfu

 dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2019 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/

Match vendor ID from file: 1209
Match product ID from file: 70b1
Opening DFU capable USB device...
ID 1209:5bf0
Run-time device DFU version 0101
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0101
Device returned transfer size 1024
Copying data from PC to DFU device
Download        [=========================] 100%       112828 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!

I see no rainbow colours, but when I run dfu-utl -l again:

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2019 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/

Cannot open DFU device 2972:0047
Cannot open DFU device 2972:0047
Found DFU: [1209:5bf0] ver=0101, devnum=3, cfg=1, intf=0, path="2-1.4", alt=0, name="Fomu PVT running DFU Bootloader v2.0.3", serial="UNKNOWN"

All seems good. However, if I unplug and then put back into the USB, it seems to have reverted


dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2019 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/

Cannot open DFU device 2972:0047
Cannot open DFU device 2972:0047
Found DFU: [1209:5bf0] ver=0101, devnum=3, cfg=1, intf=0, path="2-1.4", alt=0, name="Fomu PVT running DFU Bootloader v1.9.1", serial="UNKNOWN"```

Any idea what is going on?
fancellu commented 3 years ago

Some more info. Tried to upload adafruit-circuitpython-fomu-en_US-6.1.0.dfu, fomu goes purple

dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2019 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/

Match vendor ID from file: 1209
Match product ID from file: 5bf0
Opening DFU capable USB device...
ID 1209:5bf0
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0101
Device returned transfer size 1024
Copying data from PC to DFU device
Download        [=========================] 100%       521088 bytes
Download done.
state(7) = dfuMANIFEST, status(0) = No error condition is present
state(8) = dfuMANIFEST-WAIT-RESET, status(0) = No error condition is present
Done!

But dfu-util -l says

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2019 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/

Cannot open DFU device 2972:0047
Cannot open DFU device 2972:0047

And if I unplug and plug it back in, goes back to v1.9.1

fancellu commented 3 years ago

Is this a known issue?

https://github.com/im-tomu/fomu-toolchain/commit/4315d88a777645e5b0ef5bb70863a5c387454fea

fancellu commented 3 years ago

BTW, dfu-util -D micropython-fomu.dfu works fine, I can connect to the virtual com port and do some micropython.

However it still doesn't survive unplugging/plugging, goes back to 1.9.1

fancellu commented 3 years ago

Also, I try to use IceStudio and get this

dfu-util -d 1209:5bf0 -D hardware.bin
dfu-util 0.10

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 1209:5bf0
Run-time device DFU version 0101
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0101
Device returned transfer size 1024
Warning: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error: File ID 0000:0000 does not match device (1209:5bf0 or 1209:5bf0)
scons: *** [upload] Error 74

Verilog is fine with APIO or the fomu toolchain

fancellu commented 3 years ago

Aha, a known issue.

https://groups.google.com/g/tomu-discuss/c/mzvvca5CXCA

I updated to 2.02 (saw the rainbow), persisted on reset

Then moved to 2.03 just fine

mithro commented 3 years ago

We should probably put a warning note in the documentation around this somewhere?

mithro commented 3 years ago

@xobs - What do you think?