+@task
+def erase_flash(c):
+ '''Erasing flash is recommended before flashing fresh.'''
+ 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}')