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(
ElfToBin=Builder(
action=" ".join([
action=env.VerboseAction(" ".join([
"$OBJCOPY",
"-O",
"binary",
"$SOURCES",
"$TARGET"]),
"$TARGET"
]), "Building $TARGET"),
suffix=".bin"
),
ElfToHex=Builder(
action=" ".join([
action=env.VerboseAction(" ".join([
"$OBJCOPY",
"-O",
"ihex",
"-R",
".eeprom",
"$SOURCES",
"$TARGET"]),
"$TARGET"
]), "Building $TARGET"),
suffix=".hex"
)
)
@ -157,7 +159,9 @@ else:
# 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)
#
@ -165,9 +169,14 @@ AlwaysBuild(target_size)
#
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:
upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD")
upload = env.Alias(["upload", "uploadlazy"], target_firm,
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE"))
AlwaysBuild(upload)
#