2023-05-29 16:40:56 +00:00
|
|
|
from pathlib import Path
|
2022-06-26 12:00:03 +00:00
|
|
|
import posixpath
|
|
|
|
|
2022-08-12 22:17:11 +00:00
|
|
|
# For more details on these options, run 'fbt -h'
|
|
|
|
|
2023-05-29 16:40:56 +00:00
|
|
|
FIRMWARE_ORIGIN = "Official"
|
2022-06-26 12:00:03 +00:00
|
|
|
|
|
|
|
# Default hardware target
|
|
|
|
TARGET_HW = 7
|
|
|
|
|
|
|
|
# Optimization flags
|
|
|
|
## Optimize for size
|
|
|
|
COMPACT = 0
|
|
|
|
## Optimize for debugging experience
|
|
|
|
DEBUG = 1
|
|
|
|
|
2022-07-14 16:24:26 +00:00
|
|
|
# Suffix to add to files when building distribution
|
|
|
|
# If OS environment has DIST_SUFFIX set, it will be used instead
|
2022-06-26 12:00:03 +00:00
|
|
|
DIST_SUFFIX = "local"
|
|
|
|
|
|
|
|
# Coprocessor firmware
|
|
|
|
COPRO_OB_DATA = "scripts/ob.data"
|
|
|
|
|
2023-05-08 21:30:33 +00:00
|
|
|
# Must match lib/stm32wb_copro version
|
2023-10-09 13:03:27 +00:00
|
|
|
COPRO_CUBE_VERSION = "1.17.3"
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2023-05-08 21:30:33 +00:00
|
|
|
COPRO_CUBE_DIR = "lib/stm32wb_copro"
|
2022-06-26 12:00:03 +00:00
|
|
|
|
|
|
|
# Default radio stack
|
|
|
|
COPRO_STACK_BIN = "stm32wb5x_BLE_Stack_light_fw.bin"
|
|
|
|
# Firmware also supports "ble_full", but it might not fit into debug builds
|
|
|
|
COPRO_STACK_TYPE = "ble_light"
|
|
|
|
|
2022-07-14 16:24:26 +00:00
|
|
|
# Leave 0 to let scripts automatically calculate it
|
2022-06-26 12:00:03 +00:00
|
|
|
COPRO_STACK_ADDR = "0x0"
|
|
|
|
|
2022-11-28 16:51:51 +00:00
|
|
|
# If you override COPRO_CUBE_DIR on commandline, override this as well
|
2023-05-08 21:30:33 +00:00
|
|
|
COPRO_STACK_BIN_DIR = posixpath.join(COPRO_CUBE_DIR, "firmware")
|
2022-06-26 12:00:03 +00:00
|
|
|
|
|
|
|
# Supported toolchain versions
|
2024-02-12 02:04:12 +00:00
|
|
|
# Also specify in scripts/ufbt/SConstruct
|
|
|
|
FBT_TOOLCHAIN_VERSIONS = (" 12.3.", " 13.2.")
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2022-07-04 16:53:04 +00:00
|
|
|
OPENOCD_OPTS = [
|
|
|
|
"-f",
|
|
|
|
"interface/stlink.cfg",
|
|
|
|
"-c",
|
|
|
|
"transport select hla_swd",
|
|
|
|
"-f",
|
2022-11-05 11:47:59 +00:00
|
|
|
"${FBT_DEBUG_DIR}/stm32wbx.cfg",
|
2022-07-04 16:53:04 +00:00
|
|
|
"-c",
|
|
|
|
"stm32wbx.cpu configure -rtos auto",
|
|
|
|
]
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2022-11-05 11:47:59 +00:00
|
|
|
SVD_FILE = "${FBT_DEBUG_DIR}/STM32WB55_CM4.svd"
|
2022-06-26 12:00:03 +00:00
|
|
|
|
2022-07-14 16:24:26 +00:00
|
|
|
# Look for blackmagic probe on serial ports and local network
|
2022-07-04 16:53:04 +00:00
|
|
|
BLACKMAGIC = "auto"
|
|
|
|
|
2022-08-12 22:17:11 +00:00
|
|
|
# Application to start on boot
|
|
|
|
LOADER_AUTOSTART = ""
|
|
|
|
|
2022-06-26 12:00:03 +00:00
|
|
|
FIRMWARE_APPS = {
|
2022-06-30 16:06:12 +00:00
|
|
|
"default": [
|
2022-06-26 12:00:03 +00:00
|
|
|
# Svc
|
|
|
|
"basic_services",
|
|
|
|
# Apps
|
2022-09-14 16:11:38 +00:00
|
|
|
"main_apps",
|
|
|
|
"system_apps",
|
2022-06-26 12:00:03 +00:00
|
|
|
# Settings
|
2022-09-14 16:11:38 +00:00
|
|
|
"settings_apps",
|
2022-06-30 16:06:12 +00:00
|
|
|
],
|
|
|
|
"unit_tests": [
|
2022-06-26 12:00:03 +00:00
|
|
|
"basic_services",
|
2022-08-02 13:46:43 +00:00
|
|
|
"updater_app",
|
2023-09-01 01:23:37 +00:00
|
|
|
"radio_device_cc1101_ext",
|
2022-06-26 12:00:03 +00:00
|
|
|
"unit_tests",
|
2022-06-30 16:06:12 +00:00
|
|
|
],
|
2022-06-26 12:00:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FIRMWARE_APP_SET = "default"
|
2023-05-29 16:40:56 +00:00
|
|
|
|
|
|
|
custom_options_fn = "fbt_options_local.py"
|
|
|
|
|
|
|
|
if Path(custom_options_fn).exists():
|
|
|
|
exec(compile(Path(custom_options_fn).read_text(), custom_options_fn, "exec"))
|