Skip to content

Commit

Permalink
Upgrade to esptool.py 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelstoer committed Aug 27, 2018
1 parent ee1e7e2 commit 18cc721
Show file tree
Hide file tree
Showing 2 changed files with 441 additions and 188 deletions.
5 changes: 4 additions & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ def __init__(self, parent, config):

def run(self):
try:
print("esptool.py v%s" % esptool.__version__)
initial_baud = min(ESPLoader.ESP_ROM_BAUD, self._config.baud)

esp = ESPLoader.detect_chip(self._config.port, initial_baud)
print("Chip is %s" % (esp.get_chip_description()))
print("Features: %s" % ", ".join(esp.get_chip_features()))
esptool.read_mac(esp, Namespace())

esp = esp.run_stub()

Expand Down Expand Up @@ -90,7 +93,7 @@ def run(self):
esptool.erase_flash(esp, args)
esptool.write_flash(esp, args)
# The last line printed by esptool is "Leaving..." -> some indication that the process is done is needed
print("\nDone.")
print("\nDone. Unplug/replug or reset device.")
except SerialException as e:
self._parent.report_error(e.strerror)
raise e
Expand Down
Loading

0 comments on commit 18cc721

Please sign in to comment.