Repository navigation
fix(platforms/lpc): work around Serial.println silent-drop on LPC8xx (closes #3313) - #3314
Conversation
…loses #3313) Empirical bug on LPC845-BRK with the Arduino core: Serial.println(s) silently drops every byte -- the host's USB-VCOM bridge never sees the output. But Serial.print(s) works fine, and Serial.print("\r\n") works fine. So fl::println on LPC -- which routes through platforms::println -> Serial.println -- is invisible on the wire, making every fl::println / FL_WARN_LIT / FL_LOG_LIT call site silent. That's not just cosmetic: every diagnostic trace marker in the AutoResearch LowMemory bring-up is gone, which is what blocked investigation of #3300 (LPC845-BRK bring-up echo silence). Workaround: split platforms::println into two Serial.print calls. This is the same byte-write path that FL_DBG_F's log_emit_f uses successfully (via fl::printf -> fl::print -> platforms::print). Confirmed reaching the host on every test build. Root cause is in Print::println's path in the Arduino core (filed separately at #3313 for upstream investigation). Until the Arduino-core fix lands, FastLED's platforms::println shim is the right place to prevent every LPC user from hitting silent diagnostics. Verification: - bash test --cpp -- 333/333 pass. - bash compile lpc845brk --examples AutoResearch -- builds cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughIn ChangesLPC println two-write workaround
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Summary
Empirical bug:
Serial.println(s)on LPC845-BRK with the Arduino core silently drops every byte. ButSerial.print(s)works fine, andSerial.print(\"\r\n\")works fine. Sofl::println-- which routes throughplatforms::println -> Serial.println-- is invisible on the wire, making everyfl::println/FL_WARN_LIT/FL_LOG_LITcall site silent on LPC.That blocked the #3300 LPC845-BRK bring-up echo investigation: every diagnostic trace marker I added to setup() and the dispatcher was compiled in correctly (verified via
arm-none-eabi-strings firmware.elf) but never reached the host serial monitor.Closes #3313.
Workaround
Split
platforms::printlninto twoSerial.printcalls. Same byte-write path thatFL_DBG_F'slog_emit_fuses successfully (fl::printf -> fl::print -> platforms::print).```diff
void println(const char* str) FL_NO_EXCEPT {
if (!Serial) return;
}
```
Root cause is in
Print::println's path in the Arduino core (filed separately for upstream investigation). Until the Arduino-core fix lands, FastLED'splatforms::printlnshim is the right place to prevent every LPC user from hitting silent diagnostics.Verification
Test plan
Refs
🤖 Generated with Claude Code
Summary by CodeRabbit