mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-04 18:29:31 +00:00
14dabf523a
* changes for xPack 12.3 * support for gcc 13.2 * Update tools name * Add new linux toolchain * Fixed copro submodule * Fix gdb-py * Fixes for c++ apps * Fix gdb-py3, add udev rules * Fixed udev rules location * Add MacOS arm, fix fbt toolchain download * Fixed downloading error file * fbt: fixed linker warnings; removed gcc 10 from list of supported toolchains * ufbt: fixed supported toolchain versions * nfc: replaced local malloc with calloc * restored code with Warray-bounds to older state * Update fbtenv.cmd * Suppressing warnings * Bump to 25 * Bump to 26 * lint: reformatted macros for new clang-format * Bump to 27 * Fix m type word * Bump to 28 * furi: added FURI_DEPRECATED macro * scripts: toolchain download on Windows: fixing partially extracted cases Co-authored-by: DrunkBatya <drunkbatya.js@gmail.com>
62 lines
1.2 KiB
Text
62 lines
1.2 KiB
Text
Import("ENV")
|
|
|
|
|
|
if ENV["DEBUG"]:
|
|
ENV.Append(
|
|
CPPDEFINES=[
|
|
"FURI_DEBUG",
|
|
"NDEBUG",
|
|
],
|
|
CCFLAGS=[
|
|
"-Og",
|
|
],
|
|
)
|
|
elif ENV["COMPACT"]:
|
|
ENV.Append(
|
|
CPPDEFINES=[
|
|
"FURI_NDEBUG",
|
|
"NDEBUG",
|
|
],
|
|
CCFLAGS=[
|
|
"-Os",
|
|
],
|
|
)
|
|
else:
|
|
ENV.Append(
|
|
CPPDEFINES=[
|
|
"FURI_NDEBUG",
|
|
"NDEBUG",
|
|
],
|
|
CCFLAGS=[
|
|
"-Og",
|
|
],
|
|
)
|
|
|
|
ENV.AppendUnique(
|
|
LINKFLAGS=[
|
|
"-specs=nano.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}",
|
|
],
|
|
)
|
|
|
|
|
|
if ENV["FIRMWARE_BUILD_CFG"] == "updater":
|
|
ENV.Append(
|
|
IMAGE_BASE_ADDRESS="0x20000000",
|
|
LINKER_SCRIPT_PATH=ENV["TARGET_CFG"].linker_script_ram,
|
|
)
|
|
else:
|
|
ENV.Append(
|
|
IMAGE_BASE_ADDRESS="0x8000000",
|
|
LINKER_SCRIPT_PATH=ENV["TARGET_CFG"].linker_script_flash,
|
|
APP_LINKER_SCRIPT_PATH=ENV["TARGET_CFG"].linker_script_app,
|
|
)
|