diff --git a/bootloaders/eboot/eboot.elf b/bootloaders/eboot/eboot.elf index 08536aa72..36c480fe0 100755 Binary files a/bootloaders/eboot/eboot.elf and b/bootloaders/eboot/eboot.elf differ diff --git a/cores/esp8266/Updater.cpp b/cores/esp8266/Updater.cpp index 4d9dca9e2..cfce272a8 100644 --- a/cores/esp8266/Updater.cpp +++ b/cores/esp8266/Updater.cpp @@ -114,8 +114,12 @@ bool UpdaterClass::end(bool evenIfRemaining){ bool UpdaterClass::_writeBuffer(){ noInterrupts(); int rc = SPIEraseSector(_currentAddress/FLASH_SECTOR_SIZE); - if (!rc) { + interrupts(); + yield(); + if(!rc){ + noInterrupts(); rc = SPIWrite(_currentAddress, _buffer, _bufferLen); + interrupts(); } interrupts(); if (rc) { diff --git a/tools/espota.py b/tools/espota.py index dbd22eb45..01d79d558 100755 --- a/tools/espota.py +++ b/tools/espota.py @@ -48,12 +48,14 @@ def serve(remoteAddr, remotePort, filename): sys.stderr.write('Uploading') sys.stderr.flush() while True: - chunk = f.read(4096) + chunk = f.read(1460) if not chunk: break sys.stderr.write('.') sys.stderr.flush() + connection.settimeout(10) try: connection.sendall(chunk) + res = connection.recv(4) except: print('\nError Uploading', file=sys.stderr) connection.close() diff --git a/tools/sdk/include/ip_addr.h b/tools/sdk/include/ip_addr.h index fc488ea8f..de8a61d16 100644 --- a/tools/sdk/include/ip_addr.h +++ b/tools/sdk/include/ip_addr.h @@ -15,12 +15,6 @@ struct ip_info { struct ip_addr gw; }; -#define IP4_ADDR(ipaddr, a,b,c,d) \ - (ipaddr)->addr = ((uint32)((d) & 0xff) << 24) | \ - ((uint32)((c) & 0xff) << 16) | \ - ((uint32)((b) & 0xff) << 8) | \ - (uint32)((a) & 0xff) - /** * Determine if two address are on the same network. *