Harden nRF52 persistence, watchdog, and build variants

This commit is contained in:
mikecarper committed 2026-07-20 22:55:58 -07:00
1 parent cd0c06dc91
commit d5a00da2a0
25 files changed
+825 -76

No files matched your search

+21 -8
View File
@@ -36,14 +36,8 @@ lib_deps =
extends = GAT562_30S_Mesh_Kit
build_flags =
${GAT562_30S_Mesh_Kit.build_flags}
; Keep the repeater image inside the nRF52 in-place LoRa OTA workspace. The
; room-server and companion targets retain the complete optional sensor set.
${nrf52_ota_sensor_trim.build_flags}
-UENV_INCLUDE_MLX90614
-UENV_INCLUDE_BMP085
-UENV_INCLUDE_INA219
-UENV_INCLUDE_INA226
-UENV_INCLUDE_INA260
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"GAT562 Repeater"'
-D ADVERT_LAT=0.0
@@ -56,6 +50,25 @@ build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:GAT562_30S_Mesh_Kit_repeater_lora_ota_no_external_sensors]
extends = GAT562_30S_Mesh_Kit
build_flags =
${GAT562_30S_Mesh_Kit.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"GAT562 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
build_src_filter = ${GAT562_30S_Mesh_Kit.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:GAT562_30S_Mesh_Kit_room_server]
extends = GAT562_30S_Mesh_Kit
@@ -32,6 +32,8 @@ lib_deps =
extends = GAT562_Mesh_Tracker_Pro
build_flags =
${GAT562_Mesh_Tracker_Pro.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"GAT562 Repeater"'
-D ADVERT_LAT=0.0
@@ -44,6 +46,25 @@ build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:GAT562_Mesh_Tracker_Pro_repeater_lora_ota_no_external_sensors]
extends = GAT562_Mesh_Tracker_Pro
build_flags =
${GAT562_Mesh_Tracker_Pro.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"GAT562 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
build_src_filter = ${GAT562_Mesh_Tracker_Pro.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:GAT562_Mesh_Tracker_Pro_room_server]
extends = GAT562_Mesh_Tracker_Pro
+42 -19
View File
@@ -67,16 +67,8 @@ build_src_filter = ${Heltec_t096.build_src_filter}
build_flags =
${Heltec_t096.build_flags}
; Keep the repeater image inside the nRF52 in-place LoRa OTA workspace. The
; sensor and companion targets retain the complete optional sensor set.
${nrf52_ota_sensor_trim.build_flags}
-UENV_INCLUDE_BMP085
-UENV_INCLUDE_MLX90614
-UENV_INCLUDE_INA226
-UENV_INCLUDE_INA260
-UENV_INCLUDE_INA219
-UENV_INCLUDE_LPS22HB
-UENV_INCLUDE_BMP280
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D ADVERT_NAME='"Heltec_t096 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
@@ -85,19 +77,29 @@ build_flags =
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:Heltec_t096_repeater_lora_ota_no_external_sensors]
extends = Heltec_t096
build_src_filter = ${Heltec_t096.build_src_filter}
+<../examples/simple_repeater>
build_flags =
${Heltec_t096.build_flags}
${nrf52_no_external_sensors.build_flags}
-D ADVERT_NAME='"Heltec_t096 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
lib_deps =
${nrf52_lora_ota.lib_deps}
bodmer/TFT_eSPI @ ^2.4.31
[env:Heltec_t096_repeater_bridge_rs232]
extends = Heltec_t096
build_flags =
${Heltec_t096.build_flags}
; The RS232 bridge shares the repeater's strict in-place LoRa OTA budget.
${nrf52_ota_sensor_trim.build_flags}
-UENV_INCLUDE_BMP085
-UENV_INCLUDE_MLX90614
-UENV_INCLUDE_INA226
-UENV_INCLUDE_INA260
-UENV_INCLUDE_INA219
-UENV_INCLUDE_LPS22HB
-UENV_INCLUDE_BMP280
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
@@ -113,6 +115,27 @@ build_src_filter = ${Heltec_t096.build_src_filter}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA RS232 bridge above.
[env:Heltec_t096_repeater_bridge_rs232_lora_ota_no_external_sensors]
extends = Heltec_t096
build_flags =
${Heltec_t096.build_flags}
${nrf52_no_external_sensors.build_flags}
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_RS232_BRIDGE=Serial2
-D WITH_RS232_BRIDGE_RX=9
-D WITH_RS232_BRIDGE_TX=10
build_src_filter = ${Heltec_t096.build_src_filter}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
bodmer/TFT_eSPI @ ^2.4.31
[env:Heltec_t096_room_server]
extends = Heltec_t096
build_src_filter = ${Heltec_t096.build_src_filter}
+23 -12
View File
@@ -36,16 +36,26 @@ build_src_filter = ${Heltec_t1.build_src_filter}
build_flags =
${Heltec_t1.build_flags}
; Keep the repeater image inside the nRF52 in-place LoRa OTA workspace. The
; room-server and companion targets retain the complete optional sensor set.
${nrf52_ota_sensor_trim.build_flags}
-UENV_INCLUDE_BMP085
-UENV_INCLUDE_MLX90614
-UENV_INCLUDE_INA226
-UENV_INCLUDE_INA260
-UENV_INCLUDE_INA219
-UENV_INCLUDE_LPS22HB
-UENV_INCLUDE_BMP280
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D ADVERT_NAME='"Heltec_t1 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:Heltec_t1_repeater_lora_ota_no_external_sensors]
extends = Heltec_t1
extra_scripts = ${nrf52_lora_ota.extra_scripts}
build_src_filter = ${Heltec_t1.build_src_filter}
+<helpers/ota/*.cpp>
+<../examples/simple_repeater>
build_flags =
${Heltec_t1.build_flags}
${nrf52_no_external_sensors.build_flags}
-D ADVERT_NAME='"Heltec_t1 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
@@ -54,8 +64,9 @@ build_flags =
-D ENABLE_OTA=1
-D OTA_FLASH_STORE=1
-D OTA_FOLDER_SERIAL
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
${nrf52_lora_ota.lib_deps}
bodmer/TFT_eSPI @ ^2.4.31
[env:Heltec_t1_room_server]
extends = Heltec_t1
+19 -1
View File
@@ -164,7 +164,8 @@ build_src_filter = ${Heltec_t114_with_display.build_src_filter}
build_flags =
${Heltec_t114_with_display.build_flags}
${nrf52_ota_sensor_trim.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D ADVERT_NAME='"Heltec_T114 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
@@ -173,6 +174,23 @@ build_flags =
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:Heltec_t114_repeater_lora_ota_no_external_sensors]
extends = Heltec_t114_with_display
build_src_filter = ${Heltec_t114_with_display.build_src_filter}
+<../examples/simple_repeater>
build_flags =
${Heltec_t114_with_display.build_flags}
${nrf52_no_external_sensors.build_flags}
-D ADVERT_NAME='"Heltec_T114 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:Heltec_t114_repeater_bridge_rs232]
extends = Heltec_t114
build_flags =
+25 -2
View File
@@ -30,6 +30,28 @@ extends = rak3401
extra_scripts = ${nrf52_lora_ota.extra_scripts}
build_flags =
${rak3401.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RAK3401 1W Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
;-D MESH_PACKET_LOGGING=1
;-D MESH_DEBUG=1
build_src_filter = ${rak3401.build_src_filter}
+<helpers/ota/*.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA repeater above.
[env:RAK_3401_repeater_lora_ota_no_external_sensors]
extends = rak3401
extra_scripts = ${nrf52_lora_ota.extra_scripts}
build_flags =
${rak3401.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RAK3401 1W Repeater"'
-D ADVERT_LAT=0.0
@@ -39,12 +61,13 @@ build_flags =
-D ENABLE_OTA=1
-D OTA_FLASH_STORE=1
-D OTA_FOLDER_SERIAL
;-D MESH_PACKET_LOGGING=1
;-D MESH_DEBUG=1
build_src_filter = ${rak3401.build_src_filter}
+<helpers/ota/*.cpp>
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:RAK_3401_room_server]
extends = rak3401
+74 -19
View File
@@ -72,23 +72,7 @@ extends = rak4631
extra_scripts = ${nrf52_lora_ota.extra_scripts}
build_flags =
${rak4631.build_flags}
-UENV_INCLUDE_GPS
-UENV_INCLUDE_AHTX0
-UENV_INCLUDE_BME280
-UENV_INCLUDE_BMP280
-UENV_INCLUDE_SHTC3
-UENV_INCLUDE_SHT4X
-UENV_INCLUDE_LPS22HB
-UENV_INCLUDE_INA3221
-UENV_INCLUDE_INA219
-UENV_INCLUDE_INA226
-UENV_INCLUDE_INA260
-UENV_INCLUDE_MLX90614
-UENV_INCLUDE_VL53L0X
-UENV_INCLUDE_BME680
-UENV_INCLUDE_BMP085
-UENV_INCLUDE_RAK12035
-UENV_INCLUDE_BME680_BSEC
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RAK4631 LoRa OTA No Ext Sensors"'
-D ADVERT_LAT=0.0
@@ -130,7 +114,8 @@ lib_deps =
extends = rak4631
build_flags =
${rak4631.build_flags}
${nrf52_ota_sensor_trim.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
@@ -150,11 +135,35 @@ build_src_filter = ${rak4631.build_src_filter}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA Serial1 bridge above.
[env:RAK_4631_repeater_bridge_rs232_serial1_lora_ota_no_external_sensors]
extends = rak4631
build_flags =
${rak4631.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_RS232_BRIDGE=Serial1
-D WITH_RS232_BRIDGE_RX=PIN_SERIAL1_RX
-D WITH_RS232_BRIDGE_TX=PIN_SERIAL1_TX
build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:RAK_4631_repeater_bridge_rs232_serial2]
extends = rak4631
build_flags =
${rak4631.build_flags}
${nrf52_ota_sensor_trim.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
@@ -174,10 +183,35 @@ build_src_filter = ${rak4631.build_src_filter}
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
; Explicit lean alternative to the full-sensor, non-OTA Serial2 bridge above.
[env:RAK_4631_repeater_bridge_rs232_serial2_lora_ota_no_external_sensors]
extends = rak4631
build_flags =
${rak4631.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RS232 Bridge"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_RS232_BRIDGE=Serial2
-D WITH_RS232_BRIDGE_RX=PIN_SERIAL2_RX
-D WITH_RS232_BRIDGE_TX=PIN_SERIAL2_TX
build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<helpers/bridges/RS232Bridge.cpp>
+<../examples/simple_repeater>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:RAK_4631_room_server]
extends = rak4631
build_flags =
${rak4631.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full external-sensor build exceeds the in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"Test Room"'
-D ADVERT_LAT=0.0
@@ -190,6 +224,25 @@ build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
; Explicit lean alternative to the full-sensor, non-OTA room server above.
[env:RAK_4631_room_server_lora_ota_no_external_sensors]
extends = rak4631
build_flags =
${rak4631.build_flags}
${nrf52_no_external_sensors.build_flags}
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"Test Room"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
build_src_filter = ${rak4631.build_src_filter}
+<helpers/ui/SSD1306Display.cpp>
+<../examples/simple_room_server>
lib_deps =
${nrf52_lora_ota.lib_deps}
adafruit/Adafruit SSD1306 @ ^2.5.13
[env:RAK_4631_room_server_ethernet]
extends = rak4631
build_flags =
@@ -309,6 +362,8 @@ lib_deps =
extends = rak4631
build_flags =
${rak4631.build_flags}
-UENABLE_OTA
-D DISABLE_LORA_OTA=1 ; Full sensor image exceeds the safe nRF52 in-place OTA ceiling
-D DISPLAY_CLASS=SSD1306Display
-D ADVERT_NAME='"RAK4631 Sensor"'
-D ADVERT_LAT=0.0