fbt: building core with respect for debug flag (#1347)

* fbt: building `core` with respect for debug flag
* fbt: added size output for firmware elf
* Infrared: fix cli

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
hedger
2022-06-28 15:28:55 +03:00
committed by GitHub
parent 6d38740a46
commit e6f18cc322
5 changed files with 41 additions and 4 deletions

View File

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

View File

@@ -77,8 +77,7 @@ def generate(env):
BUILDERS={
"DistBuilder": Builder(
action=Action(
'${PYTHON3} ${ROOT_DIR.abspath}/scripts/sconsdist.py copy -p ${DIST_PROJECTS} -s "${DIST_SUFFIX}" ${DIST_EXTRA}',
"${DISTCOMSTR}",
'@${PYTHON3} ${ROOT_DIR.abspath}/scripts/sconsdist.py copy -p ${DIST_PROJECTS} -s "${DIST_SUFFIX}" ${DIST_EXTRA}',
),
),
"CoproBuilder": Builder(

View File

@@ -0,0 +1,24 @@
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