forked from platformio/platformio-core
Dump only "platform, board and framework" by default when processing environment
This commit is contained in:
@ -99,7 +99,7 @@ def LoadPioPlatform(env, variables):
|
|||||||
|
|
||||||
|
|
||||||
def PrintConfiguration(env): # pylint: disable=too-many-branches
|
def PrintConfiguration(env): # pylint: disable=too-many-branches
|
||||||
platform_data = ["Platform: %s ::" % env.PioPlatform().title]
|
platform_data = ["Platform: %s >" % env.PioPlatform().title]
|
||||||
system_data = ["System:"]
|
system_data = ["System:"]
|
||||||
mcu = env.subst("$BOARD_MCU")
|
mcu = env.subst("$BOARD_MCU")
|
||||||
f_cpu = env.subst("$BOARD_F_CPU")
|
f_cpu = env.subst("$BOARD_F_CPU")
|
||||||
|
@ -215,12 +215,12 @@ def CheckUploadSize(_, target, source, env): # pylint: disable=W0613,W0621
|
|||||||
|
|
||||||
def PrintUploadInfo(env):
|
def PrintUploadInfo(env):
|
||||||
configured = env.subst("$UPLOAD_PROTOCOL")
|
configured = env.subst("$UPLOAD_PROTOCOL")
|
||||||
available = []
|
available = [configured] if configured else []
|
||||||
if "BOARD" in env:
|
if "BOARD" in env:
|
||||||
available = env.BoardConfig().get("upload", {}).get(
|
available.extend(env.BoardConfig().get("upload", {}).get(
|
||||||
"protocols", [configured])
|
"protocols", []))
|
||||||
if available:
|
if available:
|
||||||
print "Available: %s" % ", ".join(available)
|
print "Available: %s" % ", ".join(sorted(available))
|
||||||
if configured:
|
if configured:
|
||||||
print "Configured: upload_protocol = %s" % configured
|
print "Configured: upload_protocol = %s" % configured
|
||||||
|
|
||||||
|
@ -124,6 +124,8 @@ def cli(ctx, environment, target, upload_port, project_dir, silent, verbose,
|
|||||||
|
|
||||||
class EnvironmentProcessor(object):
|
class EnvironmentProcessor(object):
|
||||||
|
|
||||||
|
DEFAULT_DUMP_OPTIONS = ("platform", "framework", "board")
|
||||||
|
|
||||||
KNOWN_OPTIONS = ("platform", "framework", "board", "board_mcu",
|
KNOWN_OPTIONS = ("platform", "framework", "board", "board_mcu",
|
||||||
"board_f_cpu", "board_f_flash", "board_flash_mode",
|
"board_f_cpu", "board_f_flash", "board_flash_mode",
|
||||||
"build_flags", "src_build_flags", "build_unflags",
|
"build_flags", "src_build_flags", "build_unflags",
|
||||||
@ -176,19 +178,19 @@ class EnvironmentProcessor(object):
|
|||||||
def process(self):
|
def process(self):
|
||||||
terminal_width, _ = click.get_terminal_size()
|
terminal_width, _ = click.get_terminal_size()
|
||||||
start_time = time()
|
start_time = time()
|
||||||
|
env_dump = []
|
||||||
|
|
||||||
for k, v in self.options.items():
|
for k, v in self.options.items():
|
||||||
self.options[k] = self.options[k].strip()
|
self.options[k] = self.options[k].strip()
|
||||||
|
if self.verbose or k in self.DEFAULT_DUMP_OPTIONS:
|
||||||
|
env_dump.append(
|
||||||
|
"%s: %s" % (k, ", ".join(util.parse_conf_multi_values(v))))
|
||||||
|
|
||||||
if not self.silent:
|
if not self.silent:
|
||||||
click.echo("[%s] Processing %s (%s)" %
|
click.echo("[%s] Processing %s (%s)" %
|
||||||
(datetime.now().strftime("%c"),
|
(datetime.now().strftime("%c"),
|
||||||
click.style(self.name, fg="cyan", bold=True),
|
click.style(self.name, fg="cyan", bold=True),
|
||||||
"; ".join([
|
"; ".join(env_dump)))
|
||||||
"%s: %s" %
|
|
||||||
(k, ", ".join(util.parse_conf_multi_values(v)))
|
|
||||||
for k, v in self.options.items()
|
|
||||||
])))
|
|
||||||
click.secho("-" * terminal_width, bold=True)
|
click.secho("-" * terminal_width, bold=True)
|
||||||
|
|
||||||
self.options = self._validate_options(self.options)
|
self.options = self._validate_options(self.options)
|
||||||
|
Reference in New Issue
Block a user