bootloader: Fallback if OTA data is invalid

Make bootloader more robust if either OTA data or some OTA app slots are corrupt.
This commit is contained in:
Angus Gratton
2017-05-18 15:31:19 +10:00
committed by Angus Gratton
parent cd5cc9927b
commit 5eef5e7a5d
7 changed files with 214 additions and 110 deletions

View File

@@ -21,6 +21,7 @@
/* Pre-partition table fixed flash offsets */
#define ESP_BOOTLOADER_DIGEST_OFFSET 0x0
#define ESP_BOOTLOADER_OFFSET 0x1000 /* Offset of bootloader image. Has matching value in bootloader KConfig.projbuild file. */
#define ESP_BOOTLOADER_SIZE (ESP_PARTITION_TABLE_OFFSET - ESP_BOOTLOADER_OFFSET)
#define ESP_PARTITION_TABLE_OFFSET 0x8000 /* Offset of partition table. Has matching value in partition_table Kconfig.projbuild file. */
#define ESP_PARTITION_TABLE_MAX_LEN 0xC00 /* Maximum length of partition table data */