Output compiled size and static memory usage

This commit is contained in:
Valeriy Koval
2015-02-09 19:57:39 +02:00
parent 2bce970809
commit d7405c44ca
6 changed files with 71 additions and 8 deletions

View File

@@ -20,6 +20,7 @@ env.Replace(
CXX="arm-none-eabi-g++",
OBJCOPY="arm-none-eabi-objcopy",
RANLIB="arm-none-eabi-ranlib",
SIZETOOL="arm-none-eabi-size",
ARFLAGS=["rcs"],
@@ -71,6 +72,8 @@ env.Replace(
"-fsingle-precision-constant"
],
SIZEPRINTCMD='"$SIZETOOL" -B -d $SOURCES',
UPLOADER=join("$PIOPACKAGES_DIR", "tool-lm4flash", "lm4flash"),
UPLOADCMD="$UPLOADER $SOURCES"
)
@@ -106,6 +109,13 @@ if "uploadlazy" in COMMAND_LINE_TARGETS:
else:
target_bin = env.ElfToBin(join("$BUILD_DIR", "firmware"), target_elf)
#
# Target: Print binary size
#
target_size = env.Alias("size", target_elf, "$SIZEPRINTCMD")
AlwaysBuild(target_size)
#
# Target: Upload firmware
#
@@ -117,4 +127,4 @@ AlwaysBuild(upload)
# Target: Define targets
#
Default(target_bin)
Default([target_bin, target_size])