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 19:40:56 +03:00
|
|
|
FIRMWARE_ORIGIN = "Official"
|
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",
|
[FL-3893] JS modules (#3841)
* feat: backport js_gpio from unleashed
* feat: backport js_keyboard, TextInputModel::minimum_length from unleashed
* fix: api version inconsistency
* style: js_gpio
* build: fix submodule ._ .
* refactor: js_gpio
* docs: type declarations for gpio
* feat: gpio interrupts
* fix: js_gpio freeing, resetting and minor stylistic changes
* style: js_gpio
* style: mlib array, fixme's
* feat: js_gpio adc
* feat: js_event_loop
* docs: js_event_loop
* feat: js_event_loop subscription cancellation
* feat: js_event_loop + js_gpio integration
* fix: js_event_loop memory leak
* feat: stop event loop on back button
* test: js: basic, math, event_loop
* feat: js_event_loop queue
* feat: js linkage to previously loaded plugins
* build: fix ci errors
* feat: js module ordered teardown
* feat: js_gui_defer_free
* feat: basic hourglass view
* style: JS ASS (Argument Schema for Scripts)
* fix: js_event_loop mem leaks and lifetime problems
* fix: crashing test and pvs false positives
* feat: mjs custom obj destructors, gui submenu view
* refactor: yank js_gui_defer_free (yuck)
* refactor: maybe_unsubscribe
* empty_screen, docs, typing fix-ups
* docs: navigation event & demo
* feat: submenu setHeader
* feat: text_input
* feat: text_box
* docs: text_box availability
* ci: silence irrelevant pvs low priority warning
* style: use furistring
* style: _get_at -> _safe_get
* fix: built-in module name assignment
* feat: js_dialog; refactor, optimize: js_gui
* docs: js_gui
* ci: silence pvs warning: Memory allocation is infallible
* style: fix storage spelling
* feat: foreign pointer signature checks
* feat: js_storage
* docs: js_storage
* fix: my unit test was breaking other tests ;_;
* ci: fix ci?
* Make doxygen happy
* docs: flipper, math, notification, global
* style: review suggestions
* style: review fixups
* fix: badusb demo script
* docs: badusb
* ci: add nofl
* ci: make linter happy
* Bump api version
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
2024-10-14 21:42:11 +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"))
|