From ee6e5487460a7a80703596d9c0328e08c6cfbb75 Mon Sep 17 00:00:00 2001 From: Valentin Kivachuk Burda Date: Sat, 11 Jul 2026 14:42:12 +0200 Subject: [PATCH] variants: enable OTA on Heltec T096 (nRF52840, shared rak4631_hw recipe) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The T096 is an nRF52840 with the same S140 v6 SoftDevice and flash geometry as the RAK4631, so it can reuse the shared rak4631_hw OTA recipe (ENABLE_OTA + OtaFlashLayout_nrf52.h — APP_BASE 0x26000, staging ceiling 0xD4000, all static_asserts satisfied by the stock nrf52840_s140_v6[_extrafs] ldscripts). With the OTAFIX bootloader (oltaco PR #42 adds the T096 board) a node applies in place; without it the node still discovers/relays/serves OTA and merely fetch-refuses apply — so a T096 is a useful OTA relay/seeder regardless. MOTA_HW_ID='"Heltec_t096"' tags the EndF trailer so a .mota built for other hardware is refused. Propagates to every T096 role via ${Heltec_t096.*}. Verified: repeater + companion_radio_usb build clean, 14 OTA objects each, EndF stamped (hw='Heltec_t096', v1.17.0). --- variants/heltec_t096/platformio.ini | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/variants/heltec_t096/platformio.ini b/variants/heltec_t096/platformio.ini index e820bf58..e6cc0228 100644 --- a/variants/heltec_t096/platformio.ini +++ b/variants/heltec_t096/platformio.ini @@ -1,9 +1,14 @@ [Heltec_t096] -extends = nrf52_base +; nRF52840 (same SoftDevice S140 v6 + flash geometry as the RAK4631), so it reuses the shared +; rak4631_hw OTA recipe (ENABLE_OTA + OtaFlashLayout_nrf52.h). With the OTAFIX bootloader (oltaco +; PR #42 adds the T096 board) it can apply in place; without it the node still discovers/relays/serves +; OTA and just fetch-refuses apply (graceful) — a T096 is a valuable OTA relay/seeder either way. +extends = rak4631_hw board = heltec_t096 board_build.ldscript = boards/nrf52840_s140_v6.ld -build_flags = ${nrf52_base.build_flags} +build_flags = ${rak4631_hw.build_flags} ${sensor_base.build_flags} + -D MOTA_HW_ID='"Heltec_t096"' ; OTA hardware tag (apply refuses a .mota built for other hardware) -I lib/nrf52/s140_nrf52_6.1.1_API/include -I lib/nrf52/s140_nrf52_6.1.1_API/include/nrf52 -I variants/heltec_t096 @@ -42,14 +47,14 @@ build_flags = ${nrf52_base.build_flags} -D PIN_BAT_CTL=47 -D DISPLAY_CLASS=ST7735Display -D DISPLAY_ROTATION=1 -build_src_filter = ${nrf52_base.build_src_filter} +build_src_filter = ${rak4631_hw.build_src_filter} + + +<../variants/heltec_t096> + + lib_deps = - ${nrf52_base.lib_deps} + ${rak4631_hw.lib_deps} ${sensor_base.lib_deps} adafruit/Adafruit ST7735 and ST7789 Library @ ^1.11.0 debug_tool = jlink