stm32wl: exclude PKT_HISTORY_HASH, RANGETEST, WAYPOINT, POWER_TELEMETRY (#10992)

Adds four MESHTASTIC_EXCLUDE_* flags to stm32_base, applying them to
every stm32wl variant (rak3172, wio-e5, russell, milesight_gs301,
CDEBYTE_E77-MBL):

- PKT_HISTORY_HASH: mirrors the accepted nRF52 precedent
  (variants/nrf52840/nrf52.ini) - drops PacketHistory's hash index;
  the O(n) fallback is negligible given stm32wl's small node table.
  No feature loss.
- POWER_TELEMETRY: only affects external power-monitor ICs
  (INA219/INA260 etc.) via PowerTelemetryModule; internal battery ADC
  reading (src/Power.cpp) is a separate, ungated code path and is
  unaffected. No current stm32wl variant wires up external
  power-monitor hardware.
- RANGETEST: real feature loss on wio-e5 specifically, the only
  stm32wl variant with GPS enabled (RangeTest requires GPS to run at
  all, so it was already dead on every other variant).
- WAYPOINT: real feature loss on rak3172/wio-e5 (russell already
  excluded this individually; that duplicate is removed here since
  stm32_base now covers it).

Measured on wio-e5 against upstream/develop @ 7a25ffd0a: 2,768 bytes
flash saved (240,648 -> 237,880), 260 bytes RAM saved. Sanity-built
russell and rak3172 to confirm no regressions from the russell
dedup.


Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>

Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Andrew Yong
2026-07-13 20:08:20 +08:00
committed by GitHub
parent 5e99139a43
commit fe288a70e4
2 changed files with 4 additions and 2 deletions

View File

@@ -14,13 +14,11 @@ build_flags =
-Ivariants/stm32/russell
-DPRIVATE_HW
-DMESHTASTIC_EXCLUDE_AIR_QUALITY_SENSOR=1
-DMESHTASTIC_EXCLUDE_RANGETEST=1
-DMESHTASTIC_EXCLUDE_DETECTIONSENSOR=1
-DMESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION=1
-DMESHTASTIC_EXCLUDE_POWERSTRESS=1
-DMESHTASTIC_EXCLUDE_NEIGHBORINFO=1
-DMESHTASTIC_EXCLUDE_TRACEROUTE=1
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
lib_deps =
${stm32_base.lib_deps}
# renovate: datasource=custom.pio depName=Adafruit BME280 packageName=adafruit/library/Adafruit BME280 Library

View File

@@ -26,6 +26,10 @@ build_flags =
-DMESHTASTIC_EXCLUDE_WIFI=1
-DMESHTASTIC_EXCLUDE_TZ=1 ; Exclude TZ to save some flash space.
-DMESHTASTIC_EXCLUDE_XEDDSA=1 ; The Ed25519 signing code does not fit in the 256KB flash. Packets are sent unsigned, like pre-XEdDSA firmware.
-DMESHTASTIC_EXCLUDE_PKT_HISTORY_HASH=1
-DMESHTASTIC_EXCLUDE_RANGETEST=1
-DMESHTASTIC_EXCLUDE_WAYPOINT=1
-DMESHTASTIC_EXCLUDE_POWER_TELEMETRY=1
-DSERIAL_RX_BUFFER_SIZE=256 ; For GPS - the default of 64 is too small.
-DHAS_SCREEN=0 ; Always disable screen for STM32, it is not supported.
;-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF ; Enable this if enabling debugg logging. It is REQUIRED for at least traceroute debug prints - without it the length returned by printf ends up uninitialized.