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/changes.md b/doc/changes.md similarity index 100% rename from changes.md rename to doc/changes.md diff --git a/libraries/ESP8266httpUpdate/library.properties b/libraries/ESP8266httpUpdate/library.properties index 9be2f7d6d..fa53da051 100644 --- a/libraries/ESP8266httpUpdate/library.properties +++ b/libraries/ESP8266httpUpdate/library.properties @@ -1,8 +1,8 @@ name=ESP8266httpUpdate version=1.0 author=Markus Sattler -maintainer=Markus Sattler +maintainer=Markus Sattler sentence=Http Update for ESP8266 paragraph= url=https://github.com/Links2004/Arduino/tree/esp8266/hardware/esp8266com/esp8266/libraries/ESP8266httpUpdate -architectures=ESP8266 +architectures=esp8266 diff --git a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp index d6d3becec..8c42afffc 100644 --- a/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp +++ b/libraries/ESP8266httpUpdate/src/ESP8266httpUpdate.cpp @@ -23,7 +23,7 @@ * */ -#include "ESP8266HTTPUpdate.h" +#include "ESP8266httpUpdate.h" ESP8266HTTPUpdate::ESP8266HTTPUpdate(void) { diff --git a/libraries/ESP8266mDNS/examples/DNS_SD_Arduino_OTA/DNS_SD_Arduino_OTA.ino b/libraries/ESP8266mDNS/examples/DNS_SD_Arduino_OTA/DNS_SD_Arduino_OTA.ino index e7dc97795..31c30f2eb 100644 --- a/libraries/ESP8266mDNS/examples/DNS_SD_Arduino_OTA/DNS_SD_Arduino_OTA.ino +++ b/libraries/ESP8266mDNS/examples/DNS_SD_Arduino_OTA/DNS_SD_Arduino_OTA.ino @@ -54,8 +54,11 @@ void loop() { WiFiClient client; if (client.connect(remote, port)) { - Serial.setDebugOutput(true); - while(!Update.isFinished()) Update.write(client); + uint32_t written; + while(!Update.isFinished()){ + written = Update.write(client); + if(written > 0) client.print(written, DEC); + } Serial.setDebugOutput(false); if(Update.end()){ 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. *