fbt: fixes for ufbt compat (#1940)

* fbt: split sdk management code
* scripts: fixed import handling
* fbt: sdk: reformatted paths
* scrips: dist: bundling libs as a build artifact
* fbt: sdk: better path management
* typo fix
* fbt: sdk: minor path handling fixes
* toolchain: fixed windows toolchain download

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
hedger
2022-10-28 19:32:06 +04:00
committed by GitHub
parent 9cd0592aaf
commit 4b921803cb
10 changed files with 383 additions and 341 deletions

View File

@@ -21,7 +21,7 @@ appenv = ENV.Clone(
)
appenv.Replace(
LINKER_SCRIPT="application_ext",
LINKER_SCRIPT=appenv.subst("$APP_LINKER_SCRIPT"),
)
appenv.AppendUnique(

View File

@@ -32,12 +32,27 @@ else:
],
)
ENV.Append(
ENV.AppendUnique(
LINKFLAGS=[
"-Tfirmware/targets/f${TARGET_HW}/${LINKER_SCRIPT}.ld",
"-specs=nano.specs",
"-specs=nosys.specs",
"-Wl,--gc-sections",
"-Wl,--undefined=uxTopUsedPriority",
"-Wl,--wrap,_malloc_r",
"-Wl,--wrap,_free_r",
"-Wl,--wrap,_calloc_r",
"-Wl,--wrap,_realloc_r",
"-n",
"-Xlinker",
"-Map=${TARGET}.map",
"-T${LINKER_SCRIPT_PATH}",
],
)
ENV.SetDefault(
LINKER_SCRIPT_PATH="firmware/targets/f${TARGET_HW}/${LINKER_SCRIPT}.ld",
)
if ENV["FIRMWARE_BUILD_CFG"] == "updater":
ENV.Append(
IMAGE_BASE_ADDRESS="0x20000000",
@@ -47,4 +62,5 @@ else:
ENV.Append(
IMAGE_BASE_ADDRESS="0x8000000",
LINKER_SCRIPT="stm32wb55xx_flash",
APP_LINKER_SCRIPT="application_ext",
)