blob: 621ed8e6a49e44fee44618507c56d1d74476bdd0 [file] [log] [blame]
# Copyright (c) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
menuconfig USB_DFU_CLASS
bool "USB DFU Class Driver"
select MPU_ALLOW_FLASH_WRITE
select POLL
depends on IMG_MANAGER
select IMG_ERASE_PROGRESSIVELY if (SOC_FLASH_NRF || FLASH_MCUX_FLEXSPI_NOR)
help
USB DFU class driver
if USB_DFU_CLASS
config USB_DEVICE_DFU_PID
hex "USB DFU Product ID"
default 0xFFFF
help
USB device product ID in DFU mode. MUST be configured by vendor.
config USB_DFU_DETACH_TIMEOUT
int
default 1000
config USB_DFU_DEFAULT_POLLTIMEOUT
int "Default value for bwPollTimeout"
default 256
range 0 1000
help
Default value for bwPollTimeout (in ms)
config USB_DFU_ENABLE_UPLOAD
bool "Firmware uploading to the host"
help
Enabling this option allows to upload firmware image to the host.
Be aware that upload capability can be a security risk because
the executable image is always decrypted despite the image
encryption is enabled.
config USB_DFU_REBOOT
bool "Reboot after download"
select REBOOT
help
When enabled the device will automatically reboot after a download
so the bootloader can swap the images.
config USB_DFU_PERMANENT_DOWNLOAD
bool "Mark slot 1 as permanent after download"
help
When enabled the image written to slot 1 will be marked as permanent.
WARNING: This bypasses Mcuboot's test-confirm mechanism!
Downloading the wrong image will cause a bricked device.
Make sure there is some kind of recovery mechanism.
endif # USB_DFU_CLASS