Is DFU working in Zephyr?
Li, Jun R
Hi Zephyr developers:
I’m trying to enable the DFU function inside the mcuboot bootloader so that I can use the bootloader to load a custom firmware file. I followed the sample “samples/subsys/usb/dfu/” and enabled the following options in MCUBOOT’s prj.conf:
And I also modified “main.c” to make it always wait for DFU instead of jumping to the slot 0. The bootloader can work normally, and I can see the following “dmesg” on the host computer:
[138144.555652] usb 2-2.1: new full-speed USB device number 29 using uhci_hcd
[138144.662455] usb 2-2.1: New USB device found, idVendor=2fe3, idProduct=0100
[138144.662458] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[138144.662459] usb 2-2.1: Product: MCUBOOT
[138144.662460] usb 2-2.1: Manufacturer: ZEPHYR
[138144.662462] usb 2-2.1: SerialNumber: 0.01
It seems everything is ready. So, I ran the following command to try backing up the data in the slot 0:
sudo dfu-util -alt 0 --upload slot0_backup.bin
However, the command always fails with the following messages:
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@...
Opening DFU capable USB device...
Run-time device DFU version 0110
Claiming USB DFU Runtime Interface...
Determining device status: state = appIDLE, status = 0
Device really in Runtime Mode, send DFU detach request...
dfu-util: Lost device after RESET?
Any idea how to resolve this issue? The board I’m using is Nucleo-F429ZI, a ST-Micro eval board.