]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
ESP32 tools
authorEdward Delaporte <edward@delaporte.us>
Sun, 14 Jun 2026 02:17:43 +0000 (21:17 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 14 Jun 2026 02:17:43 +0000 (21:17 -0500)
invoke/esptool/requirements.txt [new file with mode: 0644]
invoke/esptool/tasks.py

diff --git a/invoke/esptool/requirements.txt b/invoke/esptool/requirements.txt
new file mode 100644 (file)
index 0000000..a20def9
--- /dev/null
@@ -0,0 +1,2 @@
+esptool
+mpremote
index 96f3b8384351cb73b9164464824b504be1aa6ec6..546e261607629037533c0fe0fea13d3b18b7f55d 100644 (file)
@@ -11,6 +11,10 @@ DEVICE = 'Espressif'
 PORT='/dev/ttyACM0' # Linux
 CHIP='ESP32-S3'
 # PORT='COM0' # Windows
 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):
 
 @task
 def help(c):
@@ -83,6 +87,12 @@ def erase_flash(c):
     c.run(f'esptool --port {PORT} erase-flash')
 
 @task
     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}')
+
+
+