mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
script updates
This commit is contained in:
@@ -23,3 +23,6 @@ debug_tool = esp-prog
|
||||
debug_init_break = tbreak setup
|
||||
build_type = debug
|
||||
extra_scripts =
|
||||
; pre:scripts/build_interface.py
|
||||
scripts/rename_fw.py
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
[platformio]
|
||||
default_envs = esp8266
|
||||
|
||||
[common]
|
||||
; debug_flags = -DENABLE_CORS -DEMSESP_TEST
|
||||
|
||||
[env]
|
||||
; upload_port = COM3
|
||||
|
||||
@@ -15,4 +18,6 @@ upload_port = ems-esp.local
|
||||
|
||||
[env:esp8266]
|
||||
extra_scripts =
|
||||
; pre:scripts/build_interface.py
|
||||
scripts/main_script.py
|
||||
scripts/rename_fw.py
|
||||
|
||||
18
scripts/firmware_upload.py
Normal file
18
scripts/firmware_upload.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# for calling dos upload from Window WSL2 Linux, because serial ports are not mapped yet
|
||||
Import('env', "projenv")
|
||||
from subprocess import call
|
||||
|
||||
def upload(source, target, env):
|
||||
|
||||
print("bin file: " + str(target[0]))
|
||||
|
||||
# esp8266 or esp32
|
||||
platform = "esp" + env['PIOPLATFORM'].strip("espressif")
|
||||
|
||||
if platform == 'esp8266':
|
||||
call(["cmd.exe", "/c", "C:\\Users\\Paul\\OneDrive\\Desktop\\com8266.bat"])
|
||||
|
||||
if platform == 'esp32':
|
||||
call(["cmd.exe", "/c", "C:\\Users\\Paul\\OneDrive\\Desktop\\com32.bat"])
|
||||
|
||||
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [upload])
|
||||
Reference in New Issue
Block a user