From 768d1a2401b2ef22365f92e70db30d8ed9663b6e Mon Sep 17 00:00:00 2001 From: oclyke Date: Thu, 6 Feb 2020 11:18:02 -0700 Subject: [PATCH] add 'size' command to postobjcopy hook this is a rudimentary option but it does allow the user to see the size of various output sections at compile time. the ```.data``` section corresponds (roughly) to static RAM usage. --- platform.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform.txt b/platform.txt index 241f0a99..95157ea7 100644 --- a/platform.txt +++ b/platform.txt @@ -119,6 +119,8 @@ recipe.objcopy.bin.pattern="{compiler.path}/{compiler.cmd.axf2bin}" {compiler.fl recipe.size.pattern="{compiler.path}/{compiler.cmd.size}" -A "{build.path}/{build.project_name}.axf" recipe.size.regex=\.text\s+([0-9]+).* +recipe.hooks.objcopy.postobjcopy.0.pattern="{compiler.path}/{compiler.cmd.size}" -A "{build.path}/{build.project_name}.axf" + ## Preprocessor preproc.macros.flags=-w -x c++ -E -CC recipe.preproc.macros="{compiler.path}/{compiler.cmd.cpp}" {compiler.flags.cpp} {preproc.macros.flags} -mcpu={build.mcu} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.extra_flags.cpp} {build.extra_flags} {includes.all} "{source_file}" -o "{preprocessed_file_path}"