@@ -74,6 +74,7 @@ Currently, there are three flags defined:
7474* ` 0x00001000 ` - ** file container** - see below
7575* ` 0x00002000 ` - ** familyID present** - when set, the ` fileSize/familyID ` holds a value
7676 identifying the board family (usually corresponds to an MCU)
77+ * ` 0x00004000 ` - ** MD5 checksum present** - see below
7778
7879### Family ID
7980
@@ -110,6 +111,7 @@ This procedure was unfortunately not used for the SAMD51 and NRF52840 below.
110111* ST STM32F401 - 0x57755a57
111112* Microchip (Atmel) ATmega32 - 0x16573617
112113* Cypress FX2 - 0x5a18069b
114+ * ESP32 - 0x1c5f21b0
113115
114116### Rationale
115117
@@ -259,6 +261,27 @@ Typical writing procedure is as follows:
259261The fields ` blockNo ` and ` numBlocks ` refer to the entire UF2 file, not the current
260262file.
261263
264+ ## MD5 checksum
265+
266+ When the ` 0x4000 ` flag is set, the last 24 bytes of ` data[] ` hold the following structure:
267+
268+ | Offset | Size | Value |
269+ | --------| ------| ---------------------------------------------------|
270+ | 0 | 4 | Start address of region |
271+ | 4 | 4 | Length of region in bytes |
272+ | 8 | 16 | MD5 checksum in binary format |
273+
274+ The flashing program should compute the MD5 sum of the specified region.
275+ If the region checksum matches, flashing of the current block can be skipped.
276+ Typically, many blocks in sequence will have the same region specified,
277+ and all be skipped, if the matching succeeded.
278+ The position of the current block will typically be inside of the region.
279+ The position and size of the region should be multiple of page erase size
280+ (4k or 64k on typical SPI flash).
281+
282+ This is currently only used on ESP32, which is also why MD5 checksum is used.
283+
284+
262285## Implementations
263286
264287### Bootloaders
0 commit comments