X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/0fa1f1e6037df268c1e4e6cb78129dca52976543..bfbba57e42b3ec4e25abec3a7ea6b1fcd6bc005f:/invoke/esptool/tasks.py?ds=sidebyside diff --git a/invoke/esptool/tasks.py b/invoke/esptool/tasks.py index 96f3b83..546e261 100644 --- a/invoke/esptool/tasks.py +++ b/invoke/esptool/tasks.py @@ -11,6 +11,10 @@ DEVICE = 'Espressif' PORT='/dev/ttyACM0' # Linux CHIP='ESP32-S3' # PORT='COM0' # Windows +MICROPYTHON=f'$HOME/Downloads/ESP32_GENERIC_S3-20260406-v1.28.0.bin' +# MicroPython version +# from +# https://micropython.org/download/ESP32_GENERIC_S3/ @task def help(c): @@ -83,6 +87,12 @@ def erase_flash(c): c.run(f'esptool --port {PORT} erase-flash') @task -def write_flash(c, filepath): - '''Write flash''' - c.run(f'esptool --chip {CHIP} --port {PORT} --baud 460800 write_flash -z 0x1000 {filepath}') +def write_flash(c, filepath=MICROPYTHON): + '''Write flash - defaults to MicroPython + + Requires .bin file from micropython.org + ''' + c.run(f'esptool --chip {CHIP} --port {PORT} --baud 460800 write-flash -z 0x1000 {filepath}') + + +