mirror of
https://github.com/Laxilef/OTGateway.git
synced 2026-02-02 23:57:44 +05:00
added build functions
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
.pio
|
.pio
|
||||||
.vscode
|
.vscode
|
||||||
|
build/*
|
||||||
14
build.py
Normal file
14
build.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import shutil
|
||||||
|
import os
|
||||||
|
Import("env")
|
||||||
|
|
||||||
|
def post_build(source, target, env):
|
||||||
|
src = target[0].get_abspath()
|
||||||
|
dest = os.path.join(env["PROJECT_DIR"], "build", "firmware_%s_%s.bin" % (env.GetProjectOption("board"), env.GetProjectOption("version")))
|
||||||
|
|
||||||
|
#print("dest:"+dest)
|
||||||
|
#print("source:"+src)
|
||||||
|
|
||||||
|
shutil.copy(src, dest)
|
||||||
|
|
||||||
|
env.AddPostAction("$BUILD_DIR/firmware.bin", post_build)
|
||||||
@@ -26,6 +26,8 @@ lib_deps =
|
|||||||
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
|
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
extra_scripts = post:build.py
|
||||||
|
version = 1.3.1
|
||||||
|
|
||||||
[env:d1_mini]
|
[env:d1_mini]
|
||||||
board = d1_mini
|
board = d1_mini
|
||||||
|
|||||||
Reference in New Issue
Block a user