zephyr/samples/subsys/usb
Martijn Stommels 49cb6537be usb: dfu: add permanent download and automatic reboot
This commit adds the USB_DFU_PERMANENT_DOWNLOAD and USB_DFU_REBOOT and
symbols.When the permanent download symbol is enabled, slot 1 will be
marked as confirmed. With the reboot symbol enabled, the devices
automatically reboots after the download is completed.

The functionality is split into two symbols to allow the automatic
reboot without confirming the image. This enables image confirmation via
another channel. For example via the shell’s Mcuboot commands.

This functionality allows downloading an image to the device without the
user having to interact with the device. It is useful in cases where
ease of use is more important then safety. For example  when using USB
download for daily development. This is especially applicable for
devices with a closed case.

The changes were tested on an nrf52840dk. The following line can be used
to build the USB DFU example with the symbols enabled.

west build -b nrf52840dk_nrf52840 zephyr/samples/subsys/usb/dfu \
-d build-dfu -- -DCONFIG_BOOTLOADER_MCUBOOT=y \
-DOVERLAY_CONFIG=overlay-reboot-permanent.conf \
-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE\
=\"bootloader/mcuboot/root-rsa-2048.pem\"

Fixes #41921

Signed-off-by: Martijn Stommels <martijn@martijnpc.nl>
2022-03-31 15:33:16 +02:00
..
audio Kconfig: net: deprecate NET_BUF_USER_DATA_LEN 2021-11-24 16:04:50 +02:00
cdc_acm samples: fix wrong extra_args definitions 2022-01-04 17:15:06 -05:00
cdc_acm_composite samples: cdc_acm: check return value of uart_fifo_read() 2021-11-24 10:50:11 +01:00
console samples: usb: console: fix configuration 2021-11-18 14:29:18 +01:00
dfu usb: dfu: add permanent download and automatic reboot 2022-03-31 15:33:16 +02:00
hid cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
hid-cdc drivers: gpio: move non-standard dts flags to be soc specific 2022-03-10 13:46:34 -05:00
hid-mouse usb: move USB_DEVICE_REMOTE_WAKEUP option to drivers 2021-11-08 17:01:32 +01:00
inf
mass cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
testusb cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
webusb everywhere: fix typos 2022-03-18 13:24:08 -04:00
usb_pid.Kconfig
usb.rst doc: usb: refactor USB device support documentation structure 2021-10-06 11:51:07 +02:00