bootloader: Add support flags for rollback app

Added
* Set actual ota_seq if both ota are init or incorrect.
* Description of rollback
* UT tests

Closes TW15459
This commit is contained in:
Konstantin Kondrashov
2018-10-23 20:27:32 +08:00
parent 646d36c728
commit dde1fd9b94
8 changed files with 655 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ uint32_t bootloader_common_ota_select_crc(const esp_ota_select_entry_t *s)
bool bootloader_common_ota_select_invalid(const esp_ota_select_entry_t *s)
{
return s->ota_seq == UINT32_MAX;
return s->ota_seq == UINT32_MAX || s->ota_state == ESP_OTA_IMG_INVALID || s->ota_state == ESP_OTA_IMG_ABORTED;
}
bool bootloader_common_ota_select_valid(const esp_ota_select_entry_t *s)