Skip to content

Commit

Permalink
add 'size' command to postobjcopy hook
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
oclyke committed Feb 6, 2020
1 parent 5b00320 commit 768d1a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 768d1a2

Please sign in to comment.