mcu-tools / mcuboot

Secure boot for 32-bit Microcontrollers!
Apache License 2.0
1.35k stars 678 forks source link

zephyr/usb-dfu-class: upgrade request is not called, update dosen't happen #1314

Closed nvlsianpu closed 2 years ago

nvlsianpu commented 2 years ago

When zephyr dfu class is used (dual-bank mode), it downloads the update image to the image-1 slot. Once download is finished the class driver should call boot_request_upgrade(), but it doesn't which causes the problem.

Zephyr's usb dfu class implementation works fine as an application.

Need to find wheter issue is caused by mcuboot or zephyr

nvlsianpu commented 2 years ago

cc @jfischer-no

nvlsianpu commented 2 years ago

This issue looks to be a fully zepyr-rtos dependent issue. It can't be fixed in the mcuboot codebase.

nvlsianpu commented 2 years ago

This possible bug was recognized faulty. Root reason for not working usb dfu class along with mcuboot was missing of the image in slot-0. Slot-0 must contain a valid image in order to do the swap.

nvlsianpu commented 2 years ago

I someone must for some reason provide a device only with bootloader then MCUboot should be build with CONFIG_BOOT_BOOTSTRAP=y