From b8470ea3d3f3e634244cf180c59c0dd29b684b3a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 27 Aug 2016 19:31:54 +0300 Subject: [PATCH] Improve output in non verbose mode --- builder/main.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/builder/main.py b/builder/main.py index 62ca956..436ffdd 100644 --- a/builder/main.py +++ b/builder/main.py @@ -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) #