@@ -42,7 +42,7 @@ extern "C" {
4242#elif CONFIG_IDF_TARGET_ESP32C3
4343#include " esp32c3/rom/spi_flash.h"
4444#define ESP_FLASH_IMAGE_BASE 0x0000 // Esp32c3 is located at 0x0000
45- #else
45+ #else
4646#error Target CONFIG_IDF_TARGET is not supported
4747#endif
4848#else // ESP32 Before IDF 4.0
@@ -187,7 +187,7 @@ static uint32_t sketchSize(sketchSize_t response) {
187187 return data.image_len ;
188188 }
189189}
190-
190+
191191uint32_t EspClass::getSketchSize () {
192192 return sketchSize (SKETCH_SIZE_TOTAL);
193193}
@@ -226,6 +226,8 @@ String EspClass::getSketchMD5()
226226 md5.add (buf.get (), readBytes);
227227 lengthLeft -= readBytes;
228228 offset += readBytes;
229+
230+ delay (1 ); // Fix solo WDT
229231 }
230232 md5.calculate ();
231233 result = md5.toString ();
@@ -376,17 +378,17 @@ bool EspClass::flashRead(uint32_t offset, uint32_t *data, size_t size)
376378 return spi_flash_read (offset, (uint32_t *) data, size) == ESP_OK;
377379}
378380
379- bool EspClass::partitionEraseRange (const esp_partition_t *partition, uint32_t offset, size_t size)
381+ bool EspClass::partitionEraseRange (const esp_partition_t *partition, uint32_t offset, size_t size)
380382{
381383 return esp_partition_erase_range (partition, offset, size) == ESP_OK;
382384}
383385
384- bool EspClass::partitionWrite (const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
386+ bool EspClass::partitionWrite (const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
385387{
386388 return esp_partition_write (partition, offset, data, size) == ESP_OK;
387389}
388390
389- bool EspClass::partitionRead (const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
391+ bool EspClass::partitionRead (const esp_partition_t *partition, uint32_t offset, uint32_t *data, size_t size)
390392{
391393 return esp_partition_read (partition, offset, data, size) == ESP_OK;
392394}
0 commit comments