Implemented especially for SmartAnthill "$ platformio run -t uploadlazy" target (no dependencies to framework libs, ELF and etc.)

This commit is contained in:
Ivan Kravets
2014-07-27 22:42:04 +03:00
parent 202e2e0af5
commit bd47f44c1f
4 changed files with 77 additions and 95 deletions
+21
View File
@@ -2,8 +2,28 @@
# See LICENSE for details.
import re
from os import getenv, listdir, walk
from os.path import isdir, isfile, join
from SCons.Script import SConscript, SConscriptChdir
def ProcessGeneral(env):
libs = []
if "BUILD_FLAGS" in env:
env.MergeFlags(env['BUILD_FLAGS'])
env.PrependENVPath(
"PATH",
join(env.subst("$PLATFORMTOOLS_DIR"), "toolchain", "bin")
)
if "FRAMEWORK" in env:
SConscriptChdir(0)
libs = SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts",
"frameworks", "${FRAMEWORK}.py")),
exports="env")
return libs
def BuildLibrary(env, variant_dir, library_dir):
@@ -120,6 +140,7 @@ def exists(_):
def generate(env):
env.AddMethod(ProcessGeneral)
env.AddMethod(BuildLibrary)
env.AddMethod(BuildDependentLibraries)
env.AddMethod(BuildFirmware)