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