]> granicus.if.org Git - esp-idf/commit
app_update: fix intermittent failure with firmware updates
authorMahavir Jain <mahavir@espressif.com>
Fri, 28 Sep 2018 10:29:52 +0000 (15:59 +0530)
committerbot <bot@espressif.com>
Thu, 18 Oct 2018 04:38:31 +0000 (04:38 +0000)
commitb3aff63db44a5fe88eaced02e98d7716946db5ae
tree7441817e76bbf0a5a13b062f4ca3f3b36f495221
parent18684f53eeb8b67141518f044bd9f36fa2b9dc59
app_update: fix intermittent failure with firmware updates

Routine `spi_flash_cache2phys` sometimes return incorrect value,
resulting in failure in getting currently running ota partition.
This in turn aborts firmware update process.This issue was more
prominent with SPIRAM enabled cases.

Fix ensures proper cache guards during `spi_flash_cache2phys`, and
also for few other similar APIs.

In addition, `esp_ota_get_running_partition` has also been optimized
to save currently running partition for subsequent invocations.

Fixes https://github.com/espressif/esp-idf/issues/2451
components/app_update/esp_ota_ops.c
components/esp32/include/esp_attr.h
components/spi_flash/flash_mmap.c
components/spi_flash/include/esp_spi_flash.h