Compatible with ESP32

This commit is contained in:
Yurii committed 2023-11-11 05:01:36 +03:00
1 parent 6de6f7d138
commit a255dda8dd
13 files changed
+264 -66

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import shutil
import os
Import("env")
def post_build(source, target, env):
if os.path.exists(os.path.join(env["PROJECT_DIR"], "build")) == False:
return
files = {
env.subst("$BUILD_DIR/${PROGNAME}.bin"): "firmware_%s_%s.bin" % (env["PIOENV"], env.GetProjectOption("version")),
env.subst("$BUILD_DIR/${PROGNAME}.factory.bin"): "firmware_%s_%s.factory.bin" % (env["PIOENV"], env.GetProjectOption("version")),
}
for src in files:
if os.path.exists(src):
dest = os.path.join(env["PROJECT_DIR"], "build", files[src])
print("Copying '%s' to '%s'" % (src, dest))
shutil.copy(src, dest)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", post_build)