fix(milesight-gs301): fix STM32WL build breakage - #11649
Conversation
The variant has not compiled since it was added in meshtastic#9359. build_unflags removed -DDEBUG_MUTE, but the STM32 base config leaves PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF disabled, so src/platform/stm32wl/architecture.h:54 stops the build with an #error as soon as debug prints are enabled. Drop the unflag so the variant matches every other STM32 target; logs remain reachable by #undef DEBUG_MUTE in individual source files. SerialModule binds to Serial2 by default, but the RAK3172 module only exposes Serial1, so linking failed with an undefined reference to Serial2. Set SERIAL_PRINT_PORT to 1, as the sibling RAK3172 variants rak3172 and CDEBYTE_E77-MBL already do. Assisted-by: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Andrew Yong <me@ndoo.sg>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe GS301 build no longer mutes debug output. The variant routes serial output through ChangesGS301 configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to The changes are confined to the milesight_gs301 build and serial-port configuration, and the target build succeeds; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description clearly explains both build failures, the two fixes, the hardware constraint, and the successful build verification. It includes the required testing attestation and identifies that regression testing was limited to the affected variant. Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
The
milesight_gs301variant has not compiled since it was added in #9359. It isboard_level = extra, so no CI matrix build exercises it.Two independent failures on a clean
develop:build_unflagsremoves-DDEBUG_MUTE, but the STM32 base config (variants/stm32/stm32.ini) keepsPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTFcommented out.src/platform/stm32wl/architecture.h:54then fails the build with#error "You MUST enable PIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF if debug prints are enabled."This PR drops the-DDEBUG_MUTEunflag so the variant behaves like every other STM32 target. Debug logs are still reachable by#undef DEBUG_MUTEat the top of individual source files. Enabling the nanolib flag instead would keep debug prints on by default but overflows the RAK3172 flash budget by 20 bytes.SerialModuledefaultsSERIAL_PRINT_PORTto2, referencingSerial2. The RAK3172 module only exposesSerial1, so the link fails withundefined reference to 'Serial2'. This PR setsSERIAL_PRINT_PORT 1invariant.h, matching the sibling RAK3172-based variantsrak3172andCDEBYTE_E77-MBL.After this change
pio run -e milesight_gs301succeeds: Flash 76.0% (188424 / 247808 bytes), RAM 39.4%.🤝 Attestations
pio run -e milesight_gs301)Summary by CodeRabbit