diff --git a/bootloaders/eboot/eboot.c b/bootloaders/eboot/eboot.c index cbc87044b..f3e6d061a 100644 --- a/bootloaders/eboot/eboot.c +++ b/bootloaders/eboot/eboot.c @@ -14,6 +14,8 @@ #define SWRST do { (*((volatile uint32_t*) 0x60000700)) |= 0x80000000; } while(0); +extern void ets_wdt_enable(void); +extern void ets_wdt_disable(void); int load_app_from_flash_raw(const uint32_t flash_addr) { @@ -87,7 +89,9 @@ int copy_raw(const uint32_t src_addr, uint32_t left = ((size+buffer_size-1) & ~(buffer_size-1)); uint32_t saddr = src_addr; uint32_t daddr = dst_addr; - + + ets_wdt_disable(); + while (left) { if (SPIEraseSector(daddr/buffer_size)) { return 2; @@ -103,6 +107,8 @@ int copy_raw(const uint32_t src_addr, left -= buffer_size; } + ets_wdt_enable(); + return 0; } diff --git a/bootloaders/eboot/eboot.elf b/bootloaders/eboot/eboot.elf index 36c480fe0..0e5510f69 100755 Binary files a/bootloaders/eboot/eboot.elf and b/bootloaders/eboot/eboot.elf differ