3 Commits

Author SHA1 Message Date
torlando-agent[bot] b06b3650ae chore(build): unify pre-script libdeps paths on a shared helper + OTA log
OTA hardening follow-up to the patch_nimble.py hardcoded-"tdeck" bug that broke
tdeck-ota linking (undefined reference to nimble_host_reset_reason):
- Add _build_helpers.env_libdeps_dir(env, *parts): the single per-environment
  libdeps path resolver (.pio/libdeps/<PIOENV>/...). Converted all five pre-scripts
  (patch_nimble/msgpack/filestore/littlefs_paths, sync_file_libdeps) to use it, so
  the env component can no longer be hand-rolled/hardcoded wrong per script.
- "OTA: Ready" log -> "OTA: wireless flash service started (pyxis-tdeck:3232)":
  ArduinoOTA.begin() is void and can't confirm a ready state, so log the target
  instead of claiming readiness we can't verify.

Verified: both tdeck and tdeck-ota build, and the NimBLE patch lands in EACH env's
own libdeps tree (nimble_host_reset_reason count 2 in both).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWZuYkHBRqNb6BZHV8sTG5
2026-06-23 00:01:17 -04:00
torlando-agent[bot] 4c5ca8cbc8 chore(greptile): iteration 4 — applied 1, rejected 0
patch_msgpack.py + patch_filestore.py: read PIOENV instead of
hardcoding "tdeck" in the libdeps path. The hardcode meant the
msgpack public-modifier patch silently no-op'd under tdeck-bluedroid
(and tdeck-ota), making microLXMF's packRawBytes / raw_data /
indices accesses fail to compile. Mirrors the pattern already used
in sync_file_libdeps.py. Resolves the failing tdeck-bluedroid build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 01:30:50 -04:00
torlando-tech 6e14d626d1 feat(build): wire microReticulum for T-Deck — PSRAM, LittleFS, FS path persistence
Five build-config changes that unlock proper microReticulum behavior
on the T-Deck Plus:

1. PSRAM allocator (`-DRNS_DEFAULT_ALLOCATOR=RNS_PSRAM_ALLOCATOR`,
   `-DRNS_CONTAINER_ALLOCATOR=RNS_PSRAM_POOL_ALLOCATOR`,
   `-DRNS_PSRAM_POOL_BUFFER_SIZE=2048000`). Previously default-heap
   on ESP32, which routed every microReticulum allocation (path
   table, destinations, etc.) through internal SRAM. Under live
   announce flood the internal heap dropped from 92KB → 40KB free,
   max_block fragmented from 77KB → 19KB. With PSRAM allocator the
   internal heap stays rock-steady at 137KB and microReticulum lives
   in 2MB of dedicated TLSF pool in PSRAM.

2. LittleFS instead of SPIFFS (`-DUSTORE_USE_LITTLEFS`). microStore's
   FileStore puts (path table, etc.) hit the filesystem several
   times per second on a busy network. SPIFFS GC stalls for 100s of
   ms during block erase, causing flush_buffer() to fail and every
   put to bail silently. LittleFS handles sustained writes cleanly.

3. Filesystem-backed path persistence (`-DRNS_USE_FS`,
   `-DRNS_PERSIST_PATHS`). Without these flags, Transport::start()
   skips _path_store.init() entirely and every announce-driven put
   fails at TypedStore::isValid() — surfacing as "Failed to add
   destination to path table" spam (~3.4/sec) and an empty UI
   announce list.

4. Switch lib_ldf_mode to chain+ (was deep+) — deep+ scans every
   #include statement and auto-fetches matching libs from the
   registry, which was pulling a parallel microReticulum copy and
   bypassing our deps/microReticulum/ overlay. chain+ follows only
   explicit dependencies declared in library.json files.

5. patch_msgpack.py PIO pre-script — promotes hideakitai/MsgPack's
   `Packer::packRawBytes` and `Unpacker::indices` from private to
   public so microLXMF can splice arbitrary msgpack values into
   LXMessage's fields-map wire format. Mirrors the equivalent patch
   in microLXMF/conformance-bridge/CMakeLists.txt:106-125.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 18:16:09 -04:00