zephyr/samples/subsys
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/sof sof: disable the System Agent 2022-03-16 18:33:58 -04:00
canbus everywhere: fix typos 2022-03-18 13:24:08 -04:00
console samples: subsys: console: Fix typo in README file 2022-03-21 17:55:08 +01:00
cpp tests and samples: Don't build some C++ tests under XCC 2022-02-21 19:37:54 -05:00
debug samples: debug/gdbstub: update instructions to run 2021-11-30 15:24:00 -05:00
display tests: Change duplicated names of the test cases 2022-03-30 17:42:01 -04:00
edac cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
fs fs: littlefs: sample: Generate fname[12] strings after mount 2022-03-15 10:01:54 +01:00
ipc ipc_service: samples: Remove redundant config options from samples 2022-03-29 12:30:50 -07:00
logging samples: logging/dictionary: set UART backend to do dictionary 2022-03-10 13:48:08 -05:00
lorawan/class_a samples: prefix should be sample, not samples 2022-03-18 10:50:57 -04:00
mgmt samples: subsys: mgmt: smp_svr: Fix dupicate fs mgmt registration 2022-03-24 11:56:48 +01:00
modbus modbus: stop bits can now be set individually in client mode 2022-03-24 08:23:17 -04:00
nvs samples: subsys: nvs: use nvs_mount 2022-03-01 12:46:34 +01:00
pm/device_pm everywhere: fix typos 2022-03-18 13:24:08 -04:00
portability samples: fix wrong extra_args definitions 2022-01-04 17:15:06 -05:00
settings everywhere: fix typos 2022-03-18 13:24:08 -04:00
shell everywhere: fix typos 2022-03-18 13:24:08 -04:00
task_wdt samples: task_wdt: Increase min watchdog timeout 2022-02-09 14:07:26 -06:00
testsuite everywhere: fix typos 2022-03-18 13:24:08 -04:00
tracing everywhere: fix typos 2022-03-18 13:24:08 -04:00
usb usb: dfu: add permanent download and automatic reboot 2022-03-31 15:33:16 +02:00
video cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
subsys.rst