fbt: support for LOADER_AUTOSTART; post-build size stats (#1594)

* fbt: restored LOADER_AUTOSTART support
* scripts: added fwsize.py wrapper for size command; fbt: changed size post-build stats to fwsize.py call
* fbt: removed size wrapper
* fbt: added stats for binary flash size in pages
* fbt: hint on build options details
* scripts: fixed fwsize.py for *nix
This commit is contained in:
hedger
2022-08-13 01:17:11 +03:00
committed by GitHub
parent 9e452d2b26
commit e1ffb4ac4d
10 changed files with 87 additions and 35 deletions

View File

@@ -7,7 +7,6 @@ from SCons.Tool import gnulink
import strip
import gdb
import objdump
import size
from SCons.Action import _subproc
import subprocess
@@ -38,7 +37,7 @@ def _get_tool_version(env, tool):
def generate(env, **kw):
for orig_tool in (asm, gcc, gxx, ar, gnulink, strip, gdb, objdump, size):
for orig_tool in (asm, gcc, gxx, ar, gnulink, strip, gdb, objdump):
orig_tool.generate(env)
env.SetDefault(
TOOLCHAIN_PREFIX=kw.get("toolchain_prefix"),
@@ -57,7 +56,6 @@ def generate(env, **kw):
"GDB",
"GDBPY",
"OBJDUMP",
"SIZE",
],
)
# Call CC to check version

View File

@@ -51,7 +51,7 @@ def DumpApplicationConfig(target, source, env):
def build_apps_c(target, source, env):
target_file_name = target[0].path
gen = ApplicationsCGenerator(env["APPBUILD"])
gen = ApplicationsCGenerator(env["APPBUILD"], env.subst("$LOADER_AUTOSTART"))
with open(target_file_name, "w") as file:
file.write(gen.generate())

View File

@@ -1,24 +0,0 @@
from SCons.Builder import Builder
from SCons.Action import Action
def generate(env):
env.SetDefault(
SIZE="size",
SIZEFLAGS=[],
SIZECOM="$SIZE $SIZEFLAGS $TARGETS",
)
env.Append(
BUILDERS={
"ELFSize": Builder(
action=Action(
"${SIZECOM}",
"${SIZECOMSTR}",
),
),
}
)
def exists(env):
return True