Skip to content

fix/feat(stm32/russell): Serial2 build fix and BME680 support#10097

Merged
jp-bennett merged 5 commits into
meshtastic:developfrom
mesh-malaysia:russell-fixes
Apr 16, 2026
Merged

fix/feat(stm32/russell): Serial2 build fix and BME680 support#10097
jp-bennett merged 5 commits into
meshtastic:developfrom
mesh-malaysia:russell-fixes

Conversation

@ndoo

@ndoo ndoo commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Russell board: Serial2 build fix and BME680 support

Two changes for the Russell variant (STM32WLE5 balloon tracker board).

fix: define ENABLE_HWSERIAL2 and Serial2 pins

The Russell board was missed during Initial serialModule cleanup (PR #9465), which began requiring Serial2 to be explicitly defined via ENABLE_HWSERIAL2 and PIN_SERIAL2_TX/PIN_SERIAL2_RX rather than relying on implicit defaults, causing a build error.

feat: add BME680 support, exclude modules to fit flash

The BME680 is hardware footprint compatible with the BME280 already present on the Russell board, so it is added as an additional lib dep to enable environment sensing (temperature, humidity, pressure, gas resistance).

The STM32 target has very limited flash. Even traceroute alone causes overflow, so the following modules are excluded to stay within budget:

  • RANGETEST
  • DETECTIONSENSOR
  • EXTERNALNOTIFICATION
  • POWERSTRESS
  • NEIGHBORINFO
  • TRACEROUTE
  • WAYPOINT

AIR_QUALITY_SENSOR is also excluded as it requires the BSEC2 library for real IAQ output, which alone overflows flash by ~44KB on this target. The Adafruit BME680 library is used instead for raw sensor readings.

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other: Russell (STM32WLE5 balloon tracker) — build verified, Serial2 fix confirmed; BME680 function-tested on hardware

ndoo added 2 commits April 7, 2026 22:36
The Russell board variant was missed during Initial serialModule cleanup
(PR meshtastic#9465), which began requiring Serial2 to be explicitly defined via
ENABLE_HWSERIAL2 and PIN_SERIAL2_TX/RX rather than relying on implicit
defaults, causing a build error.

Signed-off-by: Andrew Yong <me@ndoo.sg>
The BME680 is hardware footprint compatible with the BME280 already
present on the Russell board, so add it as an additional lib dep to
enable environment sensing (temperature, humidity, pressure,
gas resistance).

The STM32 target has very limited flash. Even traceroute alone causes
overflow, so the following modules are excluded to stay within budget:

  - RANGETEST
  - DETECTIONSENSOR
  - EXTERNALNOTIFICATION
  - POWERSTRESS
  - NEIGHBORINFO
  - TRACEROUTE
  - WAYPOINT

AIR_QUALITY_SENSOR is also excluded as it requires the BSEC2 library
for real IAQ output, which alone overflows flash by ~44KB on this
target. The Adafruit BME680 library is used instead for raw sensor
readings.

Signed-off-by: Andrew Yong <me@ndoo.sg>
@github-actions github-actions Bot added needs-review Needs human review hardware-support Hardware related: new devices or modules, problems specific to hardware labels Apr 7, 2026
@ndoo ndoo changed the base branch from master to develop April 7, 2026 14:52
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 8, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
@ndoo ndoo mentioned this pull request Apr 8, 2026
10 tasks
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 8, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 11, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 14, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 14, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 15, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 16, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
@jp-bennett jp-bennett merged commit fe90c49 into meshtastic:develop Apr 16, 2026
150 of 151 checks passed
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 17, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 17, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 17, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 18, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 18, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 19, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
ndoo added a commit to mesh-malaysia/meshtastic-firmware that referenced this pull request Apr 22, 2026
RAK3172 has a built-in 32.768 kHz LSE crystal so we can expect built-in
RTC to be functional.

Enable HAS_RTC and configure the LSE drive level for the RAK3172.

LSE drive level from here:
https://github.com/RAKWireless/RAK-STM32-RUI/blob/main/variants/WisDuo_RAK3172_Evaluation_Board/rui_inner_main.c

Also added the same defines for russell which uses the RAK3172 module.

Build-tested on:
* rak3172
* wio-e5 (no changes, just a regression test)

Couldn't build test russell due to build errors fixed in meshtastic#10097.

Signed-off-by: Andrew Yong <me@ndoo.sg>
mariotti pushed a commit to mariotti/firmware that referenced this pull request May 6, 2026
…stic#10097)

* fix(stm32/russell): define ENABLE_HWSERIAL2 and Serial2 pins

The Russell board variant was missed during Initial serialModule cleanup
(PR meshtastic#9465), which began requiring Serial2 to be explicitly defined via
ENABLE_HWSERIAL2 and PIN_SERIAL2_TX/RX rather than relying on implicit
defaults, causing a build error.

Signed-off-by: Andrew Yong <me@ndoo.sg>

* feat(stm32/russell): add BME680 support, exclude modules to fit flash

The BME680 is hardware footprint compatible with the BME280 already
present on the Russell board, so add it as an additional lib dep to
enable environment sensing (temperature, humidity, pressure,
gas resistance).

The STM32 target has very limited flash. Even traceroute alone causes
overflow, so the following modules are excluded to stay within budget:

  - RANGETEST
  - DETECTIONSENSOR
  - EXTERNALNOTIFICATION
  - POWERSTRESS
  - NEIGHBORINFO
  - TRACEROUTE
  - WAYPOINT

AIR_QUALITY_SENSOR is also excluded as it requires the BSEC2 library
for real IAQ output, which alone overflows flash by ~44KB on this
target. The Adafruit BME680 library is used instead for raw sensor
readings.

Signed-off-by: Andrew Yong <me@ndoo.sg>

---------

Signed-off-by: Andrew Yong <me@ndoo.sg>
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware-support Hardware related: new devices or modules, problems specific to hardware needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants