I'm trying to perform a Device Firmware Upgrade (DFU) on my XMOS USB Audio device following **AN02019: Using Device Firmware Upgrade (DFU) in USB Audio**, but I’m running into some issues.
Steps I Followed
1. I flashed the factory image with this command:
Code: Select all
xflash --boot-partition-size 0x30000 --factory app_usb_aud_xk_316_mc_2SSi8o8xxxxxx.xe
Code: Select all
xflash --factory-version 15.3 --upgrade 1 app_usb_aud_xk_316_mc_2SSi8o8xxxxxx.xe -o new_firmware.bin
Code: Select all
xmosdfu 0016 --download new_firmware.bin
Code: Select all
XMOS DFU application started - Interface 0 claimed
Detaching device from application mode.
Waiting for device to restart and enter DFU mode...
VID = 0x20b1, PID = 0x16, BCDDevice: 0x810
... DFU firmware upgrade device opened
... Downloading image (new_firmware.bin) to device
... Download complete
... Returning device to application mode
4. When I try to upload the firmware from the device:
Code: Select all
xmosdfu 0016 --upload new_firmware2.bin
Code: Select all
XMOS DFU application started - Interface 3 claimed
Detaching device from application mode.
Waiting for device to restart and enter DFU mode...
VID = 0x20b1, PID = 0x16, BCDDevice: 0x810
... DFU firmware upgrade device opened
... Uploading image (new_firmware2.bin) from device
... WARNING: Upgrade image size is 0: check if image is present in the flash
... Returning device to application mode
The resulting file (`new_firmware2.bin`) is empty.
Additional Notes
- The firmware is compiled with `-DXUA_DFU_EN=1`.
- I see the same issue with `dfu-util`.
- I’m using `sw_usb_audio-_sw_v8_1_0`. Unfortunately, I can’t upgrade to version 9.0.0 as it’s incompatible with my hardware.
- I noticed that the `xflash` command to generate the upgrade image outputs a very small file:
Code: Select all
72K new_firmware.bin
98K new_firmware.bin.ppb
The original `.xe` file is over 3.5MB. and works well when I flash it using xflash ...
Questions
1. Why is the generated upgrade image so small?
2. What am I doing wrong in this process?
3. How can I successfully perform a DFU with this setup?
Any guidance would be much appreciated!
Thank you!