From f2d28766378cb9d23cf31a873350d37eea84de1e Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:59:49 +0200 Subject: [PATCH] no OTA on t-beam repeaters --- build.sh | 11 ++++++----- zephcore/CMakeLists.txt | 10 ++++++---- zephcore/boards/esp32/ttgo_tbeam/board.overlay | 6 +++--- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/build.sh b/build.sh index 0f16c1e..f6dee9f 100644 --- a/build.sh +++ b/build.sh @@ -135,11 +135,12 @@ if [[ $1 == "esp32" ]]; then exit 1; fi - # Classic ESP32 (e.g. T-Beam, PICO-D4) cannot fit the mesh stack - # alongside MCUboot in DRAM, so it uses Zephyr's simple-boot path: a - # self-contained zephyr.bin flashed at the 0x1000 ROM bootloader offset. - # The S3/C-series have the DRAM headroom and use sysbuild + MCUboot - # (handled in the blocks below). + # Classic ESP32 (e.g. T-Beam, PICO-D4) uses Zephyr's simple-boot path for + # both roles: a self-contained zephyr.bin flashed at the 0x1000 ROM + # bootloader offset. The companion keeps BLE (whose controller reserves + # ~50KB DRAM, leaving no room for MCUboot) and the repeater is CLI-only + # (WiFi OTA's functional driver + 64KB heap overflow DRAM by ~10KB). The + # S3/C-series have the DRAM headroom and use sysbuild + MCUboot below. if [[ $chip == "esp32" ]]; then if [[ $2 == "companions" ]]; then role="companion" diff --git a/zephcore/CMakeLists.txt b/zephcore/CMakeLists.txt index 20f389b..9cf0909 100644 --- a/zephcore/CMakeLists.txt +++ b/zephcore/CMakeLists.txt @@ -324,10 +324,12 @@ endif() # Requires --sysbuild to build MCUboot alongside the app. # Non-ESP32 builds and companion builds are unaffected. # -# Excluded on the classic ESP32 (e.g. T-Beam, board qualifier ".../esp32/..."): -# its DRAM cannot fit the mesh stack alongside WiFi + MCUboot, so it uses the -# simple-boot path and a CLI-only repeater (no WiFi OTA). The ESP32-S3/C-series -# (esp32s3/esp32c*) keep WiFi OTA. +# Excluded on the classic ESP32 (e.g. T-Beam, board qualifier ".../esp32/..."). +# It builds, but only because the WiFi DT node would be left disabled; with WiFi +# actually functional, the driver buffers + 64KB OTA heap overflow the classic +# ESP32's DRAM by ~10KB. Rather than trim WiFi/heap to an unverifiable margin, +# the classic ESP32 repeater stays CLI-only on simple boot (handled in build.sh). +# The ESP32-S3/C-series have the DRAM headroom and keep WiFi OTA. if(ZEPHCORE_PLATFORM_CONF MATCHES "esp32_common" AND EXTRA_CONF_FILE MATCHES "repeater" AND NOT BOARD MATCHES "/esp32/") set(ZEPHCORE_WIFI_OTA_CONF "${CMAKE_CURRENT_SOURCE_DIR}/boards/common/wifi_ota.conf") diff --git a/zephcore/boards/esp32/ttgo_tbeam/board.overlay b/zephcore/boards/esp32/ttgo_tbeam/board.overlay index bec7b47..86baa76 100644 --- a/zephcore/boards/esp32/ttgo_tbeam/board.overlay +++ b/zephcore/boards/esp32/ttgo_tbeam/board.overlay @@ -31,9 +31,9 @@ * controller/PHY Kconfig half-configured (BT_ESP32 stays off). Enabling the HCI * node selects BT_ESP32, which in turn pulls in the shared PHY. * - * WiFi is intentionally left disabled: the classic ESP32 cannot fit the mesh - * stack alongside both the WiFi and BLE controllers in DRAM, and the companion - * transport is BLE. (A WiFi-observer build would need its own RAM-trimmed conf.) + * WiFi is intentionally left disabled. The companion transport is BLE, and the + * classic ESP32 repeater is CLI-only (WiFi OTA's functional driver + 64KB heap + * overflow this board's DRAM, so it's excluded in CMakeLists.txt — see there). */ / { chosen {