Component versions in this bundle:
- Desktop App: v1.1.1
- ESP32 Firmware: v3.4.1
- RP2040 HAT Firmware: v3.2
[1.3.1] — 2026-06-09
Added
ESP32 firmware
- TUI ESP_LOG suppression:
cli_menu_enter()now callsesp_log_level_set("*", ESP_LOG_NONE)before switching to the alt-screen, andcli_menu_leave()restoresESP_LOG_INFOafter leaving, preventing log output from corrupting the TUI. (cli/cli_menu.cpp) - Stack overflow canary: Added
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=ytosdkconfig.defaults. FreeRTOS now writes canary words at the bottom of every task stack and validates them on each context switch; overflow triggersabort()which saves a core dump to thecoredumpflash partition. (~0.04% CPU overhead.) - Stack high-water mark logging:
tasks_log_stack_hwm()(new function intasks.cpp/tasks.h) reports free words remaining on each task stack (adcPoll,faultMon,cmdProc,wavegen) usinguxTaskGetStackHighWaterMark(). Logs a*** LOW ***warning when any task drops below 128 words free. Call from CLI or let it fire automatically after 60 s at steady state. - Post-creation heap log:
initTasks()now logs internal free heap and largest contiguous block after all tasks are created, making it easy to see headroom at the console without connecting a debugger. Firmware/tools/check_memory.py— post-build memory size gate. Runs automatically as a PlatformIO post-build action (wired inplatformio.ini). Checks static DRAM (.data + .bss < 160 KBbaseline; current: 144 KB) and estimated flash binary size vs OTA partition from ELF sections (fail at 90%; current: ~44%). Also runnable standalone:python Firmware/tools/check_memory.py <firmware.elf> <partitions.csv>.- 3 new CLI commands (
version/ver,heap,stack_hwm/hwm) added tocli_cmds_sys.cppand the command table incli_cmdtab.cpp.versionshows ESP32 app version, build date, IDF version, and RP2040 HAT firmware.heapshows internal free/min-ever/largest-block + PSRAM with fragmentation warning.stack_hwmprints FreeRTOS high-water marks for all 4 measurement tasks with*** LOW ***warning below 128 words.g_wavegenTaskpromoted fromstaticto a proper global exported intasks.h(wass_wavegenTask; updated inbbp.cpp,webserver.cpp,cmd_streaming.cpp).
Docs
Docs/SimulatedDevice.md— full reference for the BugBuster Python simulator: handler coverage table (144 commands across 15 files), test file → feature matrix, state field inventory, known gaps, and a reliability improvement roadmap.Docs/MemoryTesting.md— ESP32-S3 memory safety guide: SRAM layout diagram, pre-ship checklist (binary gate, stack HWM, heap fragmentation, canary), common failure modes and fixes, and CI integration notes.
Fixed
ESP32 firmware
- Removed unused
ADMIN_TOKENfallback: The static#define ADMIN_TOKEN "000..."inconfig.hwas a Phase-1 placeholder never referenced by any code path — the live token always comes fromauth_get_admin_token(). Removed to eliminate dead-code confusion. (config.h)
Python client / simulator
BBP_CMD_PCA_GET_STATUS(0xB0) payload truncation:_parse_pca_status()previously read only 12 bytes, silently dropping the 9 trailing enable fields that firmware has always written (vadj1_en,vadj2_en,en_15v,en_mux,en_usb_hub,efuse_en[0..3]). Parser now reads all 21 bytes and exposes the enable flags in the returned dict; older firmware returning 12 bytes degrades gracefully. (python/bugbuster/client.py)- Simulator
PCA_GET_STATUSreturns full 21-byte payload:_pca_get_statushandler intests/mock/handlers/power.pynow appends the 9 enable bytes, keyed by thePcaControlinteger enum (0–8), so round-trip tests against the simulator match the real firmware. (tests/mock/handlers/power.py) - 0x07 self-test alignment:
SELFTEST_SUPPLY_VOLTAGES_CACHEDis now the canonical BBP name for command0x07; the Python client exposesselftest_supplies_cached()and keepsselftest_efuse_currents()as a compatibility alias. The simulator and HTTP mock now return cached rail voltages from/api/selftest/supplies/cached, and the MCP discovery tool reports the cached supply snapshot undersupply_voltages_cached. (python/bugbuster/constants.py,python/bugbuster/client.py,tests/mock/*,python/bugbuster_mcp/tools/discovery.py)
Desktop app
- HAT status SWD parsing:
parse_hat_status()now skips the 3 inserted HVPAK metadata bytes (hvpak_part,hvpak_ready,hvpak_last_error) before reading the SWD fields, sodap_connected,target_detected, andtarget_dpidrstay aligned. (commands.rs) - GPIO HTTP transport framing:
CMD_GET_GPIO_STATUSnow serializes all 12 logical GPIOs as full 5-byte records (id,mode,output,input,pulldown) instead of the legacy 6-pin layout. (http_transport.rs)
Changed
CI
- Proto-version check runs on every push/PR:
.github/workflows/proto-version-check.ymlpath filter removed;BBP_PROTO_VERSIONsync is now verified on all pushes and pull requests, not only when the three protocol files are in the diff. (.github/workflows/proto-version-check.yml)
Tests
- Regression coverage: Added parser and transport regression tests for HAT status framing, cached supply payloads, and the simulator route coverage for
/api/selftest/supplies/cached. (tests/unit/test_hat_status_parsing.py,tests/device/test_09_selftest.py,tests/simulator/test_sim_completeness.py)