Skip to content

Commit 768d1a2

Browse files
author
oclyke
committed
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.
1 parent 5b00320 commit 768d1a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

platform.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ recipe.objcopy.bin.pattern="{compiler.path}/{compiler.cmd.axf2bin}" {compiler.fl
119119
recipe.size.pattern="{compiler.path}/{compiler.cmd.size}" -A "{build.path}/{build.project_name}.axf"
120120
recipe.size.regex=\.text\s+([0-9]+).*
121121

122+
recipe.hooks.objcopy.postobjcopy.0.pattern="{compiler.path}/{compiler.cmd.size}" -A "{build.path}/{build.project_name}.axf"
123+
122124
## Preprocessor
123125
preproc.macros.flags=-w -x c++ -E -CC
124126
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}"

0 commit comments

Comments
 (0)