Improve output in non verbose mode

This commit is contained in:
Ivan Kravets 2016-08-27 19:31:54 +03:00
parent c8c51ed58c
commit b8470ea3d3
1 changed files with 16 additions and 7 deletions

View File

@ -97,23 +97,25 @@ env.Append(
BUILDERS=dict( BUILDERS=dict(
ElfToBin=Builder( ElfToBin=Builder(
action=" ".join([ action=env.VerboseAction(" ".join([
"$OBJCOPY", "$OBJCOPY",
"-O", "-O",
"binary", "binary",
"$SOURCES", "$SOURCES",
"$TARGET"]), "$TARGET"
]), "Building $TARGET"),
suffix=".bin" suffix=".bin"
), ),
ElfToHex=Builder( ElfToHex=Builder(
action=" ".join([ action=env.VerboseAction(" ".join([
"$OBJCOPY", "$OBJCOPY",
"-O", "-O",
"ihex", "ihex",
"-R", "-R",
".eeprom", ".eeprom",
"$SOURCES", "$SOURCES",
"$TARGET"]), "$TARGET"
]), "Building $TARGET"),
suffix=".hex" suffix=".hex"
) )
) )
@ -157,7 +159,9 @@ else:
# Target: Print binary size # Target: Print binary size
# #
target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD") target_size = env.Alias(
"size", target_elf,
env.VerboseAction("$SIZEPRINTCMD", "Calculating size $SOURCE"))
AlwaysBuild(target_size) AlwaysBuild(target_size)
# #
@ -165,9 +169,14 @@ AlwaysBuild(target_size)
# #
if "mbed" in env.subst("$PIOFRAMEWORK") and not env.subst("$UPLOAD_PROTOCOL"): if "mbed" in env.subst("$PIOFRAMEWORK") and not env.subst("$UPLOAD_PROTOCOL"):
upload = env.Alias(["upload", "uploadlazy"], target_firm, env.UploadToDisk) upload = env.Alias(
["upload", "uploadlazy"], target_firm,
[env.VerboseAction(env.AutodetectUploadPort,
"Looking for upload disk..."),
env.VerboseAction(env.UploadToDisk, "Uploading $SOURCE")])
else: else:
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") upload = env.Alias(["upload", "uploadlazy"], target_firm,
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"))
AlwaysBuild(upload) AlwaysBuild(upload)
# #