53a6b5e01fe7c3b9aa6e876a6a556225f9daf24a
DEBUG_MUTE (set for all of stm32) already compiles every LOG_* call out entirely at the preprocessor stage, but nanopb's own error-message strings are a separate mechanism it doesn't touch - PB_RETURN_ERROR still embeds descriptive text in .rodata regardless of whether anything ever logs it. Rather than hardcoding -DPB_NO_ERRMSG=1 next to every place DEBUG_MUTE is set, derive it in bin/platformio-custom.py via the SCons build environment, mirroring the existing meshtastic-device-ui/APP_VERSION CPPDEFINES pattern already in that file. This reaches both the main project env and the Nanopb library builder specifically, since nanopb is a separate LibraryBuilder whose own CPPDEFINES aren't otherwise touched by a plain env.Append() on the app env. The CPPDEFINES membership check normalizes both bare (-DDEBUG_MUTE) and value-bearing (-DDEBUG_MUTE=1) forms, since SCons represents the latter as a tuple. DEBUG_MUTE currently only appears in variants/stm32/stm32.ini and variants/stm32/milesight_gs301/platformio.ini, so today this only affects stm32wl builds - but it will apply automatically to any future platform that sets DEBUG_MUTE too, without that platform's .ini needing to know about the pairing. Saves 1,248 bytes flash on wio-e5, no RAM change, no feature loss beyond terser protobuf decode/encode error text. Assisted-by: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Andrew Yong <me@ndoo.sg>
Overview
This repository contains the official device firmware for Meshtastic, an open-source LoRa mesh networking project designed for long-range, low-power communication without relying on internet or cellular infrastructure. The firmware supports various hardware platforms, including ESP32, nRF52, RP2040/RP2350, and Linux-based devices.
Meshtastic enables text messaging, location sharing, and telemetry over a decentralized mesh network, making it ideal for outdoor adventures, emergency preparedness, and remote operations.
Get Started
- 🔧 Building Instructions - Learn how to compile the firmware from source.
- ⚡ Flashing Instructions - Install or update the firmware on your device.
Join our community and help improve Meshtastic! 🚀
Stats
Languages
C++
70.8%
C
25.8%
Python
2.2%
Shell
0.7%
Batchfile
0.2%
Other
0.1%
