Added buildfs target and the preparation of data directory from src/data

This commit is contained in:
Dirk Jahnke 2019-01-31 16:28:55 +01:00
parent b6fdab2da9
commit 3db402ae32
2 changed files with 22 additions and 6 deletions

View File

@ -63,7 +63,22 @@ def build_files(source, target, env):
print("Copy " + source + " to " + target)
transfer_file(source, target)
def build_files_spiffs(source, target, env):
print("Build files, reason: pre spiffs.bin build")
build_files(source, target, env)
def build_files_buildprog(source, target, env):
print("Build files, reason: buildprog target")
build_files(source, target, env)
def build_files_buildfs(source, target, env):
print("Build files, reason: buildfs target")
build_files(source, target, env)
# Custom upload command and program name
#env.AddPreAction("$BUILD_DIR/spiffs.bin", build_files)
env.AddPreAction("$BUILD_DIR/spiffs.bin", build_files_spiffs)
#env.AddPreAction("$BUILD_DIR/firmware.bin", build_files)
env.AddPreAction("buildprog", build_files)
env.AddPreAction("buildprog", build_files_buildprog)
#env.AddPreAction("uploadfs", build_files_uploadfs)
#env.AlwaysBuild(env.Alias("buildfs", None, build_files_buildfs))
env.AddPreAction("buildfs", build_files_buildfs)

View File

@ -25,6 +25,7 @@ build_flags =
'-DFS_UPDATE_BASE_URL="{$iotjunkie.baseurl}/{$iotjunkie.repository}"'
'-DFS_UPDATE_AUTH_USER="{$iotjunkie.user}"'
'-DFS_UPDATE_AUTH_PASSWORD="{$iotjunkie.password}"'
-Wl,-Teagle.flash.4m1m.ld
[env:debug_usb]
platform = ${common.platform}
@ -50,10 +51,10 @@ lib_deps =
${common.lib_deps}
MD_Parola
MD_MAX72XX
;upload_port = /dev/cu.wchusbserial1420
;upload_speed = 921600
upload_port = /dev/cu.wchusbserial1420
upload_speed = 921600
monitor_speed = 115200
upload_protocol = custom
;upload_protocol = custom
;upload_port = 192.168.89.72
extra_scripts =
build_files.py
@ -63,7 +64,7 @@ extra_scripts =
;extra_scripts = pre:build_files.py
[env:uploadfs]
;extra_scripts = pre:publish_files.py
extra_scripts = build_files.py
[iotjunkie]
user = fcclient