mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-11-25 05:53:06 +03:00
a1637e9216
* fbt: minimal USB flash mode; scripts: faster storage.py with larger chunks * fbt: fixed creation of temporary file nodes confusing scons * docs: removed refs to --with-updater * fbt: removed splashscreen from minimal update package * fbt: renamed dist arguments for consistency * docs: fixed updater_debug target * fbt: separate target for generating compilation_database.json without building the code. * fbt: added `jflash` target for programming over JLink probe; refactored usb flashing targets * fbt: building updater_app in unit_tests configuration * fbt: fixed reset behavior after flashing with J-Link * fbt: generating .map file for firmware binary & external apps * fbt/core: moved library contents before apps code Co-authored-by: あく <alleteam@gmail.com>
59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
Import("ENV")
|
|
|
|
|
|
from fbt.appmanifest import FlipperAppType
|
|
|
|
appenv = ENV.Clone(tools=["fbt_extapps"])
|
|
|
|
appenv.Replace(
|
|
LINKER_SCRIPT="application-ext",
|
|
STRIPFLAGS=[
|
|
"--strip-debug",
|
|
"--strip-unneeded",
|
|
"-d",
|
|
"-g",
|
|
"-S",
|
|
],
|
|
)
|
|
|
|
appenv.AppendUnique(
|
|
CCFLAGS=[
|
|
"-Os",
|
|
"-ggdb3",
|
|
"-mword-relocations",
|
|
"-mlong-calls",
|
|
"-fno-common",
|
|
"-nostdlib",
|
|
"-fvisibility=hidden",
|
|
],
|
|
LINKFLAGS=[
|
|
"-r",
|
|
"-s",
|
|
# "-Bsymbolic",
|
|
"-nostartfiles",
|
|
"-mlong-calls",
|
|
"-fno-common",
|
|
"-nostdlib",
|
|
"-Wl,--gc-sections",
|
|
"-Wl,--no-export-dynamic",
|
|
"-fvisibility=hidden",
|
|
"-Wl,-e${APP_ENTRY}",
|
|
"-Xlinker",
|
|
"-Map=${TARGET}.map",
|
|
],
|
|
)
|
|
|
|
|
|
extapps = []
|
|
for apptype in (FlipperAppType.PLUGIN, FlipperAppType.EXTERNAL):
|
|
for app in appenv["APPBUILD"].get_apps_of_type(apptype):
|
|
extapps.append(appenv.BuildAppElf(app))
|
|
|
|
# Ugly access to global option
|
|
if extra_app_list := GetOption("extra_ext_apps"):
|
|
for extra_app in extra_app_list.split(","):
|
|
extapps.append(appenv.BuildAppElf(appenv["APPMGR"].get(extra_app)))
|
|
|
|
Alias(appenv["FIRMWARE_BUILD_CFG"] + "_extapps", extapps)
|
|
Return("extapps")
|