1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

make eboot erase/read/write sector by sector

that makes possible having sketches with size up to the free size
This commit is contained in:
John Doe
2015-07-04 00:27:13 +03:00
committed by Ivan Grokhotkov
parent 7596ed0742
commit f3f500936d
7 changed files with 49 additions and 52 deletions

View File

@ -1,11 +1,7 @@
#!/usr/bin/env python
#
# this script will push an OTA update to the ESP
#
# use it like: python ota_server.py <ESP_IP_address> <sketch.bin>
#
# on the ESP side you need code like this: https://gist.github.com/igrr/43d5c52328e955bb6b09 to handle the update
#
# use it like: python espota.py <ESP_IP_address> <sketch.bin>
from __future__ import print_function
import socket
@ -22,7 +18,7 @@ def serve(remoteAddr, remotePort, filename):
sock.bind(server_address)
sock.listen(1)
except:
print('Socket Failed', file=sys.stderr)
print('Listen Failed', file=sys.stderr)
return 1
content_size = os.path.getsize(filename)
@ -80,10 +76,11 @@ def serve(remoteAddr, remotePort, filename):
f.close()
sock.close()
return 1
finally:
connection.close()
f.close()
sock.close()
return 1