doc/services/device_mgmt/dfu.rst
.. _dfu:
Device Firmware Upgrade #######################
Overview
The Device Firmware Upgrade subsystem provides the necessary frameworks to upgrade the image of a Zephyr-based application at run time. It currently consists of two different modules:
subsys/dfu/boot/: Interface code to bootloaderssubsys/dfu/img_util/: Image management codeThe DFU subsystem deals with image management, but not with the transport
or management protocols themselves required to send the image to the target
device. For information on these protocols and frameworks please refer to the
:ref:device_mgmt section.
.. _flash_img_api:
The flash image API as part of the Device Firmware Upgrade (DFU) subsystem provides an abstraction on top of Flash Stream to simplify writing firmware image chunks to flash.
.. doxygengroup:: flash_img_api
.. _mcuboot_api:
The MCUboot API is provided to get version information and boot status of application images. It allows to select application image and boot type for the next boot.
.. doxygengroup:: mcuboot_api
Bootloaders
.. _mcuboot:
Zephyr is directly compatible with the open source, cross-RTOS
MCUboot boot loader. It interfaces with MCUboot and is aware of the image
format required by it, so that Device Firmware Upgrade is available when MCUboot
is the boot loader used with Zephyr. The source code itself is hosted in the
MCUboot GitHub Project page.
In order to use MCUboot with Zephyr you need to take the following into account:
flash_map_api for details... code-block:: devicetree
/ { chosen { zephyr,code-partition = &slot0_partition; }; };
.conf file needs to enable the
:kconfig:option:CONFIG_BOOTLOADER_MCUBOOT Kconfig option in order for Zephyr to
be built in an MCUboot-compatible mannerMore detailed information regarding the use of MCUboot with Zephyr can be found
in the MCUboot with Zephyr_ documentation page on the MCUboot website.
.. _MCUboot boot loader: https://mcuboot.com/ .. _MCUboot with Zephyr: https://docs.mcuboot.com/readme-zephyr .. _MCUboot GitHub Project: https://github.com/runtimeco/mcuboot