fbt: 'target' field for apps; lib debugging support (#1995)

* fbt: added 'target' field to application manifest
* fbt: earlier pagination setup for gdb
* fbt: added LIB_DEBUG flag
* fbt: sdk: added SDK_MAP_FILE_SUBST
This commit is contained in:
hedger
2022-11-10 15:55:11 +04:00
committed by GitHub
parent 3985b456c3
commit a959fa32bc
10 changed files with 66 additions and 29 deletions

View File

@@ -63,6 +63,11 @@ vars.AddVariables(
help="Enable debug build",
default=True,
),
BoolVariable(
"LIB_DEBUG",
help="Enable debug build for libraries",
default=False,
),
BoolVariable(
"COMPACT",
help="Optimize for size",

View File

@@ -1,6 +1,6 @@
from dataclasses import dataclass, field
from SCons.Errors import UserError
from SCons.Node import NodeList
from SCons.Warnings import warn, WarningOnByDefault
Import("ENV")
@@ -80,6 +80,14 @@ if extra_app_list := GetOption("extra_ext_apps"):
known_extapps.extend(map(appenv["APPMGR"].get, extra_app_list.split(",")))
for app in known_extapps:
if not any(map(lambda t: t in app.targets, ["all", appenv.subst("f${TARGET_HW}")])):
warn(
WarningOnByDefault,
f"Can't build '{app.name}' (id '{app.appid}'): target mismatch"
f" (building for {appenv.subst('f${TARGET_HW}')}, app supports {app.targets}",
)
continue
appenv.BuildAppElf(app)