From fe13ea68e8e0cb64cf67be7a2c7ba32fa4640c8a Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 10 Sep 2026 22:03:38 +0100 Subject: [PATCH] Default BLE_API to all Export the full ST gap/gatt/hci/hal/l2cap command set by default instead of just hci,gatt, so apps built against this SDK get the whole BLE API without a rebuild. Costs ~9 KB more firmware flash: 788 KB, still 13 free pages to the full stack. Update the build.sh comments and README (env-var table and flash-budget table) to mark `all` as the default. Builds clean; all faps link and resolve. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01LEaD4ZeAfvWLBUxXp8G11r --- README.md | 6 +++--- build.sh | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 54e3f93..236c366 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Environment variables: | Var | Default | Effect | |---|---|---| -| `BLE_API` | `hci,gatt` | Which ST command groups to export (`min`, `all`, or any comma list of `hci,gap,gatt,hal,l2cap`). | +| `BLE_API` | `all` | Which ST command groups to export (`all`, `min`, or any comma list of `hci,gap,gatt,hal,l2cap`). | | `EXPORT_FLASH` | `1` | Export the raw flash / option-byte API (set `0` to omit). | | `SUBGHZ_UNLOCK` | `1` | Remove the sub-GHz region gate (set `0` to keep it). | | `FW_TAG` | `1.4.3` | Firmware tag to clone. | @@ -280,8 +280,8 @@ between the firmware and the stack is the Flipper's internal storage: | `BLE_API` | exported | firmware | pages free, full stack | pages free, extended stack | |---|---|---|---|---| | `min` (only what the apps import) | 15 | 770 KB | 18 | 9 | -| `hci,gatt` (default) | 127 | 779 KB | 15 | 6 | -| `all` | 211 | ~788 KB | 13 | 4 | +| `hci,gatt` | 127 | 779 KB | 15 | 6 | +| `all` (default) | 211 | ~788 KB | 13 | 4 | | stock light-stack firmware | 0 | 768 KB | 27 | n/a | `extended` refers to `stm32wb5x_BLE_Stack_full_extended_fw.bin` (BLE 5 extended diff --git a/build.sh b/build.sh index b23f53d..4ce84fc 100755 --- a/build.sh +++ b/build.sh @@ -16,7 +16,7 @@ # includes the .fap under apps/Bluetooth) + SDK zip for ufbt # ./build.sh flash build and flash over USB (Flipper connected, qFlipper closed) # ./build.sh fap rebuild only the .fap (firmware already built once) -# BLE_API=all|min|hci,gap,gatt,hal,l2cap which ST API to export (default hci,gatt) +# BLE_API=all|min|hci,gap,gatt,hal,l2cap which ST API to export (default all) # FW_TAG=1.4.3 ./build.sh pin a different firmware tag (default 1.4.3) # JOBS=2 ./build.sh limit parallel compile jobs (default 4) set -euo pipefail @@ -135,10 +135,10 @@ FBT_ARGS=( API_CSV=targets/f7/api_symbols.csv # BLE_API selects which ST command headers are exported to apps (each exported # function is kept in the firmware image): -# hci,gatt scanning, connections, GATT client/server (~12 KB, default) -# all also gap, hal, l2cap (~20 KB) -# min only the functions BT Inspector imports (~1.5 KB) -BLE_API="${BLE_API:-hci,gatt}" +# all every gap/gatt/hci/hal/l2cap command (~20 KB, default) +# hci,gatt scanning, connections, GATT client/server (~12 KB) +# min only the functions the bundled apps import (~1.5 KB) +BLE_API="${BLE_API:-all}" # --- Firmware API exported to .fap apps (in addition to the ST BLE commands) --- # Each area is appended below; every enabled symbol stays in the firmware image.