mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
move to scripts directory
This commit is contained in:
14
scripts/clean_fw.py
Normal file
14
scripts/clean_fw.py
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
from subprocess import call
|
||||
import os
|
||||
Import("env")
|
||||
|
||||
def clean(source, target, env):
|
||||
print("\n** Starting clean...")
|
||||
call(["pio", "run", "-t", "erase"])
|
||||
call(["esptool.py", "-p COM6", "write_flash 0x00000", os.getcwd()+"../firmware/*.bin"])
|
||||
print("\n** Finished clean.")
|
||||
|
||||
# built in targets: (buildprog, size, upload, program, buildfs, uploadfs, uploadfsota)
|
||||
env.AddPreAction("buildprog", clean)
|
||||
|
||||
Reference in New Issue
Block a user