bigtreetech / BIGTREETECH-OCTOPUS-Pro

This is OCTOPUS Pro open source material
270 stars 59 forks source link

Octopus Pro F429 DFU boot #3

Open r0bb10 opened 3 years ago

r0bb10 commented 3 years ago

The F429 version of the Octopus Pro v1.0 can be flashed via DFU over the usb-c port, but unlike the F446 version of the same board DFU-UTIL is not able to reboot the board in DFU mode and flash it.

user@klipper:~/klipper$ make flash FLASH_DEVICE=0483:df11
  Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8008000:leave -D out/klipper.bin
dfu-util 0.11

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

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
dfu-util: No DFU capable USB device available

The only way to make the F429 visible to dfu-util (latest compiled version 0.11 from source, i had no luck with the stock 0.9 that comes with debian) is to jump the Boot0 high and reboot the board via reset, in that way dfu-util works.

user@klipper:~/klipper$ make flash FLASH_DEVICE=0483:df11
  Flashing out/klipper.bin to 0483:df11
sudo dfu-util -d ,0483:df11 -R -a 0 -s 0x8008000:leave -D out/klipper.bin

dfu-util 0.11

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

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
dfu-util: Patching string descriptor 4 length (was 166, received 112)
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Downloading element to address = 0x08008000, size = 23632
Erase           [=========================] 100%        23632 bytes
Erase    done.
Download        [=========================] 100%        23632 bytes
Download done.
File downloaded successfully

It is probably just a matter of having the F429 bootloader updated so that dfu-util can reboot the board in DFU mode and flash it, verify and reboot in normal mode without any physical interaction, like the F446 already does.