feat(ota): Add OTA binary link address verify of ESP8285 or ESP8266 + 1MB flash

This commit is contained in:
Dong Heng
2019-01-24 15:32:24 +08:00
parent df4c82f394
commit 2e9cb80033
3 changed files with 35 additions and 6 deletions

View File

@ -185,7 +185,7 @@ bool _esp_ota_firm_parse_http(esp_ota_firm_t *ota_firm, const char *text, size_t
memset(length_str, 0, sizeof(length_str));
memcpy(length_str, ptr, ptr2 - ptr);
ota_firm->content_len = atoi(length_str);
#ifdef CONFIG_ESPTOOLPY_FLASHSIZE_1MB
#if defined(CONFIG_ESPTOOLPY_FLASHSIZE_1MB) && !defined(CONFIG_ESP8266_BOOT_COPY_APP)
ota_firm->ota_size = ota_firm->content_len / ota_firm->ota_num;
ota_firm->ota_offset = ota_firm->ota_size * ota_firm->update_ota_num;
#else