From 0c9f0e67a92d4cca4e18ea685273c262889fec64 Mon Sep 17 00:00:00 2001 From: "torlando-agent[bot]" <281092095+torlando-agent[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 09:28:57 -0400 Subject: [PATCH] fix: actually stage the M-files for the bluedroid drop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Companion to 21b0e96 which deleted BluedroidPlatform.{cpp,h} but missed staging the three edited files that complete the cleanup: - platformio.ini: remove the [env:tdeck-bluedroid] env block. - .github/workflows/build-check.yml: drop tdeck-bluedroid from the CI matrix. - lib/ble_interface/BLEPlatform.cpp: drop the USE_BLUEDROID-gated factory branches. Same `git add` short-arg trap as the eridanus mishap earlier today — specifying non-existent paths aborts the add before reaching the M-file paths. Mental-model fix: stage M-files in a separate `git add` from the staged-deletes. --- .github/workflows/build-check.yml | 2 +- lib/ble_interface/BLEPlatform.cpp | 15 +-- platformio.ini | 160 ------------------------------ 3 files changed, 2 insertions(+), 175 deletions(-) diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index db51e8f0..fbcef52f 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - environment: [tdeck, tdeck-bluedroid] + environment: [tdeck] steps: - name: Checkout repository diff --git a/lib/ble_interface/BLEPlatform.cpp b/lib/ble_interface/BLEPlatform.cpp index 1be633d1..1e2a0f6c 100644 --- a/lib/ble_interface/BLEPlatform.cpp +++ b/lib/ble_interface/BLEPlatform.cpp @@ -11,10 +11,6 @@ #include "platforms/NimBLEPlatform.h" #endif -#if defined(ESP32) && defined(USE_BLUEDROID) -#include "platforms/BluedroidPlatform.h" -#endif - #if defined(ZEPHYR) || defined(CONFIG_BT) // Future: #include "platforms/ZephyrPlatform.h" #endif @@ -33,12 +29,6 @@ IBLEPlatform::Ptr BLEPlatformFactory::create(PlatformType type) { return std::make_shared(); #endif -#if defined(ESP32) && defined(USE_BLUEDROID) - case PlatformType::ESP_IDF: - INFO("BLEPlatformFactory: Creating Bluedroid platform"); - return std::make_shared(); -#endif - #if defined(ZEPHYR) || defined(CONFIG_BT) case PlatformType::ZEPHYR: // Future: return std::make_shared(); @@ -54,10 +44,7 @@ IBLEPlatform::Ptr BLEPlatformFactory::create(PlatformType type) { } PlatformType BLEPlatformFactory::getDetectedPlatform() { -#if defined(ESP32) && defined(USE_BLUEDROID) - // Bluedroid takes priority when explicitly selected - return PlatformType::ESP_IDF; -#elif defined(ESP32) && (defined(USE_NIMBLE) || defined(CONFIG_BT_NIMBLE_ENABLED)) +#if defined(ESP32) && (defined(USE_NIMBLE) || defined(CONFIG_BT_NIMBLE_ENABLED)) return PlatformType::NIMBLE_ARDUINO; #elif defined(ZEPHYR) || defined(CONFIG_BT) return PlatformType::ZEPHYR; diff --git a/platformio.ini b/platformio.ini index 031003a3..8cc5c384 100644 --- a/platformio.ini +++ b/platformio.ini @@ -1,163 +1,3 @@ -; T-Deck environment using Bluedroid BLE stack (fallback, uses more RAM) -[env:tdeck-bluedroid] -extra_scripts = - pre:version.py - pre:generate_splash.py -platform = espressif32 -board = esp32-s3-devkitc-1 -framework = arduino - -; T-Deck Plus has ESP32-S3 with 8MB Flash + 8MB PSRAM -board_build.flash_mode = qio -board_build.partitions = partitions.csv -board_build.arduino.memory_type = qio_opi -board_upload.flash_size = 8MB - -; Enable PSRAM (required for LVGL buffers) -board_build.arduino.psram_type = opi - -; Serial monitor -monitor_speed = 115200 -monitor_filters = - esp32_exception_decoder - time - -; Dependencies -lib_deps = - lvgl/lvgl@^8.3.11 - bblanchon/ArduinoJson@^7.4.2 - hideakitai/MsgPack@^0.4.2 - rweather/Crypto@^0.4.0 - mikalhart/TinyGPSPlus@^1.0.3 - jgromes/RadioLib@^6.0 - WiFi - SPI - Wire - SD - FS - LittleFS - tdeck_ui - universal_filesystem - sx1262_interface - tone - auto_interface - ble_interface - lxst_audio - sh123/esp32_codec2@^1.0.7 ; carries modern codec2 since PR #4 (Jan 2026); -D__EMBEDDED__ + -DMEMORY_CRITICAL set in build_flags below put codebooks in flash - libbz2 - ; Pinned to attermann/microStore@ceea8f5 (2026-04-14 "Added SD - ; filesystem and enhanced Flash filesystem"). Pre-0.1.6 — newer - ; commits introduced a dynamic segment-size refactor that hasn't - ; been validated against pyxis's MessageStore / path-store usage - ; patterns. Bump the SHA when ready to re-validate. Matches the - ; same pin used in conformance bridge builds. - https://github.com/attermann/microStore.git#ceea8f585c8b22ad238fb290961b8311cb83c516 - -; Library dependency finder mode (deep search) -; deep+ scans #include statements and auto-fetches matching libs from the -; registry — that pulled a parallel copy of microReticulum into -; .pio/libdeps/tdeck/microReticulum/ alongside our deps/microReticulum/ -; overlay, and the linker picked the registry copy (silently dropping -; all our local .cpp changes). chain+ follows only explicit dependencies -; declared in library.json, so deps/microReticulum (via lib_extra_dirs) -; is the only microReticulum source. -lib_ldf_mode = chain+ -; (was: lib_extra_dirs = deps/microReticulum — replaced by an -; explicit file:// lib_dep below. lib_extra_dirs caused the duplicate -; compilation that produced two _path_store statics.) - -; Build configuration -build_type = release -build_flags = - -std=gnu++11 - -DBOARD_HAS_PSRAM - -DBOARD_ESP32 - ; Arduino loop task stack — Codec2 decode (lpc_post_filter + kiss_fft) - ; uses ~6KB stack on top of ~10KB normal peak. 24KB gives safe headroom. - -DARDUINO_LOOP_STACK_SIZE=24576 - -DARDUINO_USB_CDC_ON_BOOT=1 - -DARDUINO_USB_MODE=1 - -DLV_CONF_INCLUDE_SIMPLE - -Ilib - -Ilib/libbz2 - ; -Ideps/microReticulum/src — removed in favor of PIO's lib_deps - ; auto-include of .pio/libdeps/tdeck/microReticulum/src. Keeping - ; the hardcoded -Ideps/... path here would shadow PIO's path - ; (build_flags are searched first) and let the submodule's stale - ; headers win over the freshly-fetched git pin from lib_deps. - ; - ; -Ilib/microreticulum-shim alone is enough — subdir lookups use , - ; , etc. Don't add -Ilib/microreticulum-shim/Utilities on top: - ; that puts our Stream.h on the GLOBAL header path and breaks Arduino's - ; Wire.cpp (`class TwoWire: public Stream` finds ours first). - -Ilib/microreticulum-shim - -DBZ_NO_STDIO - ; codec2 codebooks in flash (.const) instead of RAM — without this - ; ~127KB of codebook tables land in BSS and compete with LVGL's - ; framebuffer. Moved here from lib/codec2/library.json when we - ; swapped the vendor for sh123/esp32_codec2_arduino@1.0.7 - ; (which carries modern codec2 since their PR #4 / Jan 2026). - -D__EMBEDDED__ - -DMEMORY_CRITICAL - ; Move microReticulum allocations from internal DRAM (~320KB total) - ; to PSRAM (~8MB on T-Deck Plus). The default `::operator new` on - ; ESP32 prefers internal SRAM and would otherwise compete with LVGL - ; framebuffers, BLE/WiFi, etc — under heavy announce flood we saw - ; the path table fill internal heap and "Failed to add destination - ; to path table" / "PropagationNodeManager: Pool full" spam. - ; RNS_PSRAM_ALLOCATOR routes default new/delete to ps_malloc; - ; RNS_PSRAM_POOL_ALLOCATOR routes long-lived STL containers (path - ; table) into a dedicated 2MB TLSF pool in PSRAM. - -DRNS_DEFAULT_ALLOCATOR=RNS_PSRAM_ALLOCATOR - -DRNS_CONTAINER_ALLOCATOR=RNS_PSRAM_POOL_ALLOCATOR - -DRNS_PSRAM_POOL_BUFFER_SIZE=2048000 - ; Enable filesystem-backed path persistence in microReticulum. - ; Without these, Transport::start() skips _path_store.init(), and - ; every announce-driven _new_path_table.put() bails silently at - ; TypedStore::isValid() → "Failed to add destination to path table" - ; spam. With LittleFS as the backend (USTORE_USE_LITTLEFS) the - ; sustained-write pattern is tractable. - -DRNS_USE_FS - -DRNS_PERSIST_PATHS - ; Test-mode hooks: hard-override the TCP server NVS settings to - ; point at the Mac-side rnsd (:4242) and add a `T:`- - ; prefixed serial command interface (T:DEST, T:SEND, T:STATE, - ; T:RX, T:ANN, etc.) for the harness to drive the device. Remove - ; this group of flags for production firmware. - -DPYXIS_TEST_HOOKS - ; Read host:port from env vars so they aren't hardcoded in source. - ; Set PYXIS_TEST_TCP_HOST / PYXIS_TEST_TCP_PORT before `pio run` - ; (e.g. via a sourced .env file, or in your shell profile). If - ; unset they default to empty/0; main.cpp's test-hooks block falls - ; back to NVS-stored values when host is empty so unset env vars - ; don't brick test mode silently. See .env.example. - ; Both quoted so an unset env var → empty string literal (`""`) - ; instead of an empty token (which breaks `PORT > 0` parse). - ; main.cpp's atoi() handles the port string side. - '-DPYXIS_TEST_TCP_HOST="${sysenv.PYXIS_TEST_TCP_HOST}"' - '-DPYXIS_TEST_TCP_PORT="${sysenv.PYXIS_TEST_TCP_PORT}"' - ; microStore LittleFS adapter — replaces pyxis's pre-graft - ; lib/universal_filesystem/ (which targeted SPIFFS directly). - ; LittleFS reuses the existing partition labeled "spiffs" (LittleFS's - ; default partitionLabel is "spiffs" too) and reformats it on first - ; boot. SPIFFS was swapped out because its GC-induced flush stalls - ; caused FileStore::put → flush_buffer() to fail under sustained - ; announce writes (~3/sec), surfacing as path-table-add error spam. - -DUSTORE_USE_LITTLEFS - -DUSE_BLUEDROID - -Os - -DCORE_DEBUG_LEVEL=2 - ; Enable memory instrumentation (heap/stack monitoring) - ; Remove this flag to disable instrumentation and eliminate overhead - -DMEMORY_INSTRUMENTATION_ENABLED - ; Enable boot profiling (timing instrumentation for setup phases) - ; Remove this flag to disable boot profiling - -DBOOT_PROFILING_ENABLED - ; Reduce log verbosity during boot for faster startup - ; CORE_DEBUG_LEVEL=2 (WARNING) reduces INFO-level log output - -DBOOT_REDUCED_LOGGING - -; Default T-Deck environment using NimBLE BLE stack (uses ~100KB less RAM than Bluedroid) [env:tdeck] extra_scripts = pre:version.py