feat(app_update): add API for checking the spi mode compatibility

New API to check the SPI flash mode from the incoming firmware image
during OTA updates could prevent bootloader/app incompatibility of
DIO vs QIO flash modes.

More information:
 - https://github.com/espressif/esp-hosted-mcu/issues/143#issuecomment-3741753788
 - https://github.com/espressif/esp-idf/issues/9674#issuecomment-1232533757
 - https://github.com/espressif/esp-idf/issues/9542#issuecomment-1211317354
This commit is contained in:
Mahavir Jain
2026-01-18 19:01:20 +05:30
parent 1837390102
commit 21f8ca5e6f
11 changed files with 131 additions and 26 deletions

View File

@@ -36,7 +36,8 @@ typedef struct {
uint16_t min_efuse_blk_rev_full; /*!< Minimal eFuse block revision supported by image, in format: major * 100 + minor */
uint16_t max_efuse_blk_rev_full; /*!< Maximal eFuse block revision supported by image, in format: major * 100 + minor */
uint8_t mmu_page_size; /*!< MMU page size in log base 2 format */
uint8_t reserv3[3]; /*!< reserv3 */
uint8_t spi_flash_mode; /*!< SPI flash mode as per CONFIG_ESPTOOLPY_FLASHMODE_VAL for compatibility check during OTA */
uint8_t reserv3[2]; /*!< reserv3 */
uint32_t reserv2[18]; /*!< reserv2 */
} esp_app_desc_t;