Pass all PIO variables to PlatformManager

This commit is contained in:
Ivan Kravets
2016-12-02 19:21:56 +02:00
parent aac627abf4
commit 25c979a8ee
2 changed files with 4 additions and 4 deletions

View File

@ -74,6 +74,7 @@ DEFAULT_ENV_OPTIONS = dict(
variables=commonvars, variables=commonvars,
# Propagating External Environment # Propagating External Environment
PIOVARIABLES=commonvars.keys(),
ENV=environ, ENV=environ,
UNIX_TIME=int(time()), UNIX_TIME=int(time()),
PROGNAME="program", PROGNAME="program",

View File

@ -30,10 +30,9 @@ def initPioPlatform(name):
def PioPlatform(env): def PioPlatform(env):
variables = {} variables = {}
for key in ("board", "pioframework"): for name in env['PIOVARIABLES']:
if key.upper() not in env: if name in env:
continue variables[name.lower()] = env[name]
variables[key] = env[key.upper()]
p = initPioPlatform(env['PLATFORM_MANIFEST']) p = initPioPlatform(env['PLATFORM_MANIFEST'])
p.configure_default_packages(variables, COMMAND_LINE_TARGETS) p.configure_default_packages(variables, COMMAND_LINE_TARGETS)
return p return p