You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated all pages related to the dfu_target library by adding
information about SUIT-based dfu_target implementation.
Updated release notes.
Signed-off-by: Arkadiusz Balys <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/libraries/dfu/dfu_multi_image.rst
+45-11Lines changed: 45 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,17 +26,51 @@ To configure the maximum number of images that the DFU multi-image library is ab
26
26
To enable building the DFU multi-image package that contains commonly used update images, such as the application core firmware, the network core firmware, or MCUboot images, set the ``SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD`` Kconfig option.
27
27
The following options control which images are included:
The build system merges all application images into a single :file:`dfu_cache_partition_1.bin` partition file and places its content into the multi-image image 2.
58
+
This allows all application images to be stored in a single DFU multi-image, as they will be processed by SUIT.
59
+
60
+
The :kconfig:option:`SB_CONFIG_SUIT_MULTI_IMAGE_PACKAGE_BUILD` Kconfig option enables building the SUIT multi-image package.
61
+
As a result, the multi-image package will contain:
62
+
63
+
* Image 0:
64
+
- SUIT envelope that contains manifests only.
65
+
66
+
* Image 2:
67
+
- Application core image.
68
+
- Radio core image, if applicable.
69
+
- Additional images, if applicable.
70
+
71
+
You can add more data to be processed by SUIT to the following images starting from image 3.
72
+
This operation will require an additional binary file and the proper :file:`dfu_cache_partition_X` definition in a devicetree configuration file, where ``X`` is the image number minus 1.
73
+
So for the image 3, you would need :file:`dfu_cache_partition_2`.
Copy file name to clipboardExpand all lines: doc/nrf/libraries/dfu/dfu_target.rst
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ The DFU target library supports the following types of firmware upgrades:
48
48
* MCUboot-style upgrades
49
49
* Modem delta upgrades
50
50
* Full modem firmware upgrades
51
+
* SUIT-style upgrades
51
52
52
53
MCUboot-style upgrades
53
54
----------------------
@@ -103,6 +104,69 @@ This DFU target downloads the serialized modem firmware to an external flash mem
103
104
Once the modem firmware has been downloaded, the application should use :ref:`lib_fmfu_fdev` to write the firmware to the modem.
104
105
The DFU target library does not perform the upgrade and calling the :c:func:`dfu_target_schedule_update` function has no effect.
105
106
107
+
.. _lib_dfu_target_suit_style_update:
108
+
109
+
SUIT-style upgrades
110
+
-------------------
111
+
112
+
SUIT-style firmware upgrades can be used for :ref:`ug_nrf54h20_suit_dfu`.
113
+
Depending on the image number and the used SUIT system configuration, this type of DFU writes the data provided to the :c:func:`dfu_target_write` function into the following partitions:
114
+
115
+
* Image 0: ``dfu_partition``
116
+
* Image 1: ``dfu_cache_partition_0`` - always located just after the ``dfu_partition`` partition.
117
+
* Image 2..n: ``dfu_cache_partition_n`` - located in internal or external memory.
118
+
119
+
Before calling the :c:func:`dfu_target_init` and :c:func:`dfu_target_write` functions, the application must call the :c:func:`dfu_target_suit_set_buf` function to allocate the buffer used during the firmware update process.
120
+
The buffer size must be at least the size of the largest chunk that will be downloaded at a single time.
121
+
The buffer will be used for processing all images, so there is no need to allocate a new buffer for each image.
122
+
123
+
You can upgrade your device in several ways depending on your SUIT system configuration:
124
+
125
+
.. tabs::
126
+
127
+
.. tab:: SUIT single image processing
128
+
129
+
SUIT minimal processing is used for devices that do not have a cache partition.
130
+
To enable it, set the :kconfig:option:`CONFIG_SUIT_DFU_CANDIDATE_PROCESSING_MINIMAL` Kconfig option to ``y``.
131
+
132
+
In this approach, the SUIT envelope contains the manifests and the firmware image.
133
+
The SUIT envelope is stored in the ``dfu_partition`` partition.
134
+
After that, the ``dfu_cache_partition_0`` partition will be created automatically just after the ``dfu_partition`` partition and will contain the firmware.
135
+
136
+
.. tab:: SUIT cache processing
137
+
138
+
The SUIT cache processing requires one of the following SUIT system configurations set to ``y``:
With one of these options set, the DFU target SUIT library can process the SUIT envelope and cache images.
144
+
In this approach, the SUIT envelope contains the manifests only, while the firmware is stored in the cache images.
145
+
146
+
You can disable cache processing by setting the :kconfig:option:`DFU_TARGET_SUIT_CACHE_PROCESSING` Kconfig option to ``n``.
147
+
148
+
When this approach is used, the SUIT manifests will be stored in the ``dfu_partition`` partition.
149
+
The firmware will be stored in the ``dfu_cache_partition_1`` partition.
150
+
This approach can be used for devices that have defined the ``dfu_cache_partition_1`` partition in the internal or external flash memory.
151
+
The :ref:`lib_dfu_multi_image_suit_multi_image_package` uses this approach for multi-image updates.
152
+
153
+
To read more about SUIT cache processing, see the :ref:`ug_nrf54h20_suit_external_memory` guide.
154
+
155
+
Make sure the application calls the :c:func:`dfu_target_init` function for image 0 first and then downloads the SUIT envelope.
156
+
When the single image data transfer is completed, the application using the DFU target library must call the :c:func:`dfu_target_done` function for each subsequent image.
157
+
After that, the application can call the :c:func:`dfu_target_init` function for another image index.
158
+
159
+
When all image data transfers are completed, the application using the DFU target library must do the following:
160
+
161
+
1. Call the :c:func:`dfu_target_schedule_update` function to inform SUIT that the manifests can be processed.
162
+
2. Automatically reboot the device by calling :c:func:`dfu_target_suit_reboot` with a defined delay.
163
+
You can set the delay before rebooting the device by configuring the :kconfig:option:`CONFIG_DFU_TARGET_SUIT_REBOOT_DELAY` Kconfig option.
164
+
Alternatively, you can skip this step and reboot the device manually.
165
+
166
+
.. note::
167
+
The application must schedule the upgrade of all images at once using the :c:func:`dfu_target_schedule_update` function.
168
+
During this operation, the manifests stored in the ``dfu_partition`` partition will be processed.
0 commit comments