Repository navigation
feat(lpc845): WWDT watchdog driver + FL_WARN_LIT enabled on Low-memory - #3014
Conversation
…sketch Adds `platforms/arm/lpc/watchdog_lpc.impl.hpp` implementing the FastLED `fl::Watchdog` interface against LPC84x WWDT (Windowed Watchdog Timer). Routes through SYSCON-clocked WDOSC (~125 kHz tick after the WWDT-internal /4 prescaler), with begin/feed/disable, reset-cause readback from `SYSRSTSTAT`, and `NVIC_SystemReset`-style `reboot()` via AIRCR. Persist storage is in-RAM (LPC845 has no battery-backed retention RAM). The driver does NOT depend on the LPC8xx Arduino core's CMSIS header (which only exposes the IRQ vector list, no WWDT register struct) — register addresses are inline `volatile fl::u32*` casts per UM11029 §3, §4, §14, with `// ok reinterpret cast` suppression markers matching the convention in `platforms/arm/nrf52/fastpin_arm_nrf52.h`. Dispatcher routing added to `platforms/watchdog.impl.cpp.hpp` under `FL_IS_ARM_LPC` (between the AVR branch and the noop fallback). No `FL_HAS_INCLUDE` guard — the impl is self-contained. `examples/AutoResearchLpc/AutoResearchLpc.ino` now arms the watchdog in `setup()` with a 3-second window and feeds it from `loop()`, so a hung bring-up sketch unbricks itself on crash. Firmware grows ~140 B (text 63088 → 63212), well within the LPC845-BRK 64 KB budget. Refs: #3002, #3004 (autoresearch wire-up). Co-Authored-By: Claude Opus 4.7 <[email protected]>
`FL_WARN_LIT(literal)` was documented as the "minimal-overhead variant
for literal-only messages" that bypasses the sstream + operator<< chain
the full FL_WARN uses, but the gate at log.h:102 made it a no-op on any
target without `SKETCH_HAS_LARGE_MEMORY` — the very platforms the lite
macro was supposed to serve. This commit fixes that:
- New `FASTLED_LOG_LITE_ENABLED` gate (= `FASTLED_LOG_VERBOSITY >= 1`,
no memory check). `FL_WARN_LIT` / `FL_LOG_LIT` move under this gate
and stay alive on LPC845/AVR/ATtiny.
- The full FL_WARN / FL_DBG / FL_INFO / FL_ERROR machinery remains
gated on `FASTLED_LOG_RUNTIME_ENABLED` — no change to existing
behavior on either Large- or Low-memory targets.
- Single point of definition for FL_WARN_LIT (the runtime block now
forwards through a comment to the lite block instead of redefining).
The LPC845 bring-up sketch now emits `FL_WARN_LIT("FL_WARN: LPC845
bring-up OK")` in `setup()`, and the autoresearch bring-up harness
verifies that token reaches the host. The bring-up PASS gate is now
`echo && remote && warn` (was `echo && remote` with FL_DBG advisory),
which proves the FL_WARN pipeline works end-to-end on a 64 KB-flash
no-FPU MCU — completing the third leg of FastLED #3002's bring-up
goal alongside `Serial.println` and JSON-RPC echo.
Firmware grows ~50 B (text 63212 → 63260) for the literal + one extra
`fl::println` call site. Still ~1.9 KB flash headroom.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
📝 WalkthroughWalkthroughAdds a complete LPC845 WWDT watchdog implementation ( ChangesLPC845 Watchdog and Bring-up Verification
Sequence Diagram(s)sequenceDiagram
participant CI as CI Phase<br/>_run_bring_up_tests
participant Sketch as AutoResearchLpc.ino<br/>LPC845
participant Watchdog as fl::Watchdog<br/>(LPC845 WWDT)
participant Serial as Serial Output
CI->>Sketch: flash and boot
Sketch->>Watchdog: Watchdog::begin(3000)
Watchdog-->>Sketch: armed, WWDT enabled
Sketch->>Serial: FL_WARN_LIT("FL_WARN: LPC845 bring-up OK")
rect rgba(100, 200, 100, 0.5)
Note over Sketch,Serial: Main loop operation
loop Each iteration
Sketch->>Watchdog: feed()
Sketch->>Serial: JSON-RPC echo result
Sketch->>Serial: REMOTE: marker
Sketch->>Serial: FL_WARN_LIT("FL_WARN: echo invoked")
end
end
Serial-->>CI: collect serial output
CI->>CI: echo_ok = detect echo result?
CI->>CI: remote_ok = detect REMOTE: marker?
CI->>CI: warn_ok = detect FL_WARN: echo invoked?
CI->>CI: log_ok = detect Stored request ID? [bonus]
CI->>CI: passed = echo_ok AND remote_ok AND warn_ok
alt Bring-up succeeded
CI-->>CI: Report FL_WARN_LIT (required gate)
else Bring-up failed
CI-->>CI: Report echo_ok, remote_ok, warn_ok, log_ok
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ci/autoresearch/phases.py`:
- Around line 1535-1542: Remove the f-string prefixes from the four strings in
the print statements (the strings containing "FL_WARN_LIT" and "FL_DBG") since
they contain no placeholder expressions. Convert each f-string to a regular
string by removing the f prefix, as these are static strings with no variable
interpolation and the f prefix is flagged as a Ruff F541 lint error.
- Around line 1512-1522: The FL_WARN: LPC845 bring-up OK marker emitted during
sketch setup() is being cleared from the accumulated serial data before the
warn_ok check is evaluated, causing the passed check to fail incorrectly.
Capture the warn_ok status by checking for the FL_WARN: LPC845 bring-up OK token
in accumulated data before any serial input clearing occurs in this flow, or
move the warn_ok evaluation point to happen earlier before the accumulated data
is cleared. Ensure the warn_ok variable retains its value from before the
clearing and is used correctly in the final passed check that combines echo_ok,
remote_ok, and warn_ok.
In `@src/fl/log/log.h`:
- Around line 108-113: Replace all Unicode em-dashes (—) with ASCII-only
alternatives (use hyphen - or double hyphen --) in the comments at both
locations in src/fl/log/log.h: at the anchor site (lines 108-113) in the comment
block describing the lite gate for FL_WARN_LIT / FL_LOG_LIT, and at the sibling
site (lines 285-288). Ensure all punctuation in header file comments uses only
7-bit ASCII characters to comply with the repository's coding guidelines.
In `@src/platforms/arm/lpc/watchdog_lpc.impl.hpp`:
- Around line 163-166: The calculation of ticks on line 163 multiplies two
32-bit values (timeout_ms and kTickHz) which can overflow before the division by
1000u is applied, causing incorrect WWDT TC programming for large timeout
values. Fix this by casting one of the operands to a 64-bit type (such as
fl::u64) before the multiplication so that the arithmetic is performed in 64-bit
space to prevent overflow, then the result will be divided correctly and
truncated back to 32-bit for the ticks assignment.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 45f36696-77d4-4ee1-93f1-485d1740d5c1
📒 Files selected for processing (5)
ci/autoresearch/phases.pyexamples/AutoResearchLpc/AutoResearchLpc.inosrc/fl/log/log.hsrc/platforms/arm/lpc/watchdog_lpc.impl.hppsrc/platforms/watchdog.impl.cpp.hpp
| f" ✅ FL_WARN_LIT — FastLED warn pipeline reached host" | ||
| if warn_ok | ||
| else f" ❌ FL_WARN_LIT — warning literal not observed" | ||
| ) | ||
| print( | ||
| f" ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)" | ||
| if log_ok | ||
| else f" ⚠️ FastLED log pipeline — FL_DBG line not observed" | ||
| " (may be optimized out in release builds without FASTLED_FORCE_DBG)" | ||
| else f" ⚠️ FL_DBG — full pipeline not active" |
There was a problem hiding this comment.
Remove extraneous f prefixes on static strings (Ruff F541).
These four prints are f-strings without placeholders and are currently lint errors.
Proposed fix
- f" ✅ FL_WARN_LIT — FastLED warn pipeline reached host"
+ " ✅ FL_WARN_LIT — FastLED warn pipeline reached host"
if warn_ok
- else f" ❌ FL_WARN_LIT — warning literal not observed"
+ else " ❌ FL_WARN_LIT — warning literal not observed"
)
print(
- f" ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)"
+ " ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)"
if log_ok
- else f" ⚠️ FL_DBG — full pipeline not active"
+ else " ⚠️ FL_DBG — full pipeline not active"
" (expected on Low-memory targets — FL_WARN_LIT is the gate)"
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| f" ✅ FL_WARN_LIT — FastLED warn pipeline reached host" | |
| if warn_ok | |
| else f" ❌ FL_WARN_LIT — warning literal not observed" | |
| ) | |
| print( | |
| f" ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)" | |
| if log_ok | |
| else f" ⚠️ FastLED log pipeline — FL_DBG line not observed" | |
| " (may be optimized out in release builds without FASTLED_FORCE_DBG)" | |
| else f" ⚠️ FL_DBG — full pipeline not active" | |
| " ✅ FL_WARN_LIT — FastLED warn pipeline reached host" | |
| if warn_ok | |
| else " ❌ FL_WARN_LIT — warning literal not observed" | |
| ) | |
| print( | |
| " ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)" | |
| if log_ok | |
| else " ⚠️ FL_DBG — full pipeline not active" | |
| " (expected on Low-memory targets — FL_WARN_LIT is the gate)" | |
| ) |
🧰 Tools
🪛 Ruff (0.15.15)
[error] 1535-1535: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 1537-1537: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 1540-1540: f-string without any placeholders
Remove extraneous f prefix
(F541)
[error] 1542-1542: f-string without any placeholders
Remove extraneous f prefix
(F541)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ci/autoresearch/phases.py` around lines 1535 - 1542, Remove the f-string
prefixes from the four strings in the print statements (the strings containing
"FL_WARN_LIT" and "FL_DBG") since they contain no placeholder expressions.
Convert each f-string to a regular string by removing the f prefix, as these are
static strings with no variable interpolation and the f prefix is flagged as a
Ruff F541 lint error.
Source: Linters/SAST tools
| // Lite gate for FL_WARN_LIT / FL_LOG_LIT — string-literal-only macros that | ||
| // route through fl::println without the sstream / operator<< / log_emit | ||
| // chain. These are intentionally usable on Low-memory targets (LPC845, | ||
| // AVR, ATtiny) where the full FL_WARN pipeline is too expensive — the | ||
| // caller pays for one `fl::println(const char*)` symbol and the literal | ||
| // bytes, nothing more. See FastLED #3002 (LPC845 bring-up). |
There was a problem hiding this comment.
Use ASCII-only punctuation in new .h comments.
These newly added comments include Unicode em-dashes (—), which violates the repository’s ASCII-only rule for C/C++ headers.
As per coding guidelines, "ASCII-only in source files: no Unicode glyphs/em-dashes in .h/.hpp code or comments (only 7-bit ASCII)."
Also applies to: 285-288
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/fl/log/log.h` around lines 108 - 113, Replace all Unicode em-dashes (—)
with ASCII-only alternatives (use hyphen - or double hyphen --) in the comments
at both locations in src/fl/log/log.h: at the anchor site (lines 108-113) in the
comment block describing the lite gate for FL_WARN_LIT / FL_LOG_LIT, and at the
sibling site (lines 285-288). Ensure all punctuation in header file comments
uses only 7-bit ASCII characters to comply with the repository's coding
guidelines.
Source: Coding guidelines
| fl::u32 ticks = (timeout_ms * kTickHz + 999u) / 1000u; | ||
| if (ticks < 0x100u) ticks = 0x100u; // hardware minimum | ||
| if (ticks > 0x00FFFFFFu) ticks = 0x00FFFFFFu; // 24-bit ceiling | ||
| TC() = ticks; |
There was a problem hiding this comment.
Fix 32-bit overflow in timeout-to-ticks conversion.
Line 163 multiplies two 32-bit values that can overflow before division, so large timeout values program the wrong WWDT TC.
Proposed fix
- fl::u32 ticks = (timeout_ms * kTickHz + 999u) / 1000u;
- if (ticks < 0x100u) ticks = 0x100u; // hardware minimum
- if (ticks > 0x00FFFFFFu) ticks = 0x00FFFFFFu; // 24-bit ceiling
- TC() = ticks;
+ fl::u64 ticks = (static_cast<fl::u64>(timeout_ms) * kTickHz + 999u) / 1000u;
+ if (ticks < 0x100u) ticks = 0x100u; // hardware minimum
+ if (ticks > 0x00FFFFFFu) ticks = 0x00FFFFFFu; // 24-bit ceiling
+ TC() = static_cast<fl::u32>(ticks);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fl::u32 ticks = (timeout_ms * kTickHz + 999u) / 1000u; | |
| if (ticks < 0x100u) ticks = 0x100u; // hardware minimum | |
| if (ticks > 0x00FFFFFFu) ticks = 0x00FFFFFFu; // 24-bit ceiling | |
| TC() = ticks; | |
| fl::u64 ticks = (static_cast<fl::u64>(timeout_ms) * kTickHz + 999u) / 1000u; | |
| if (ticks < 0x100u) ticks = 0x100u; // hardware minimum | |
| if (ticks > 0x00FFFFFFu) ticks = 0x00FFFFFFu; // 24-bit ceiling | |
| TC() = static_cast<fl::u32>(ticks); |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/platforms/arm/lpc/watchdog_lpc.impl.hpp` around lines 163 - 166, The
calculation of ticks on line 163 multiplies two 32-bit values (timeout_ms and
kTickHz) which can overflow before the division by 1000u is applied, causing
incorrect WWDT TC programming for large timeout values. Fix this by casting one
of the operands to a 64-bit type (such as fl::u64) before the multiplication so
that the arithmetic is performed in 64-bit space to prevent overflow, then the
result will be divided correctly and truncated back to 32-bit for the ticks
assignment.
Two bugs the prior commit missed once the firmware actually reached a
physical LPC845-BRK:
1. **Pin discovery hung on LPC.** `_run_schema_and_pin_setup` was
running `run_pin_discovery` against the bring-up sketch, but that
sketch only binds `echo` — no `findConnectedPins` RPC. Result was
a 30-second hang followed by an executor-shutdown crash.
Skip pin discovery AND the GPIO connectivity pre-test when the
target board is one of `{lpc845brk, lpcxpresso845max, lpcxpresso804}`.
The bring-up short-circuit later in the pipeline runs the RPC echo
test directly against the configured upload port — no jumper wire
required, no `findConnectedPins` binding required.
2. **FL_WARN_LIT marker fired during setup() but was drained by the
test scaffolding.** `_run_bring_up_tests` does `reset_input_buffer`
→ sleep(2s) → `reset_input_buffer` before sending the first request,
which discards the boot banner along with the setup-time
`FL_WARN_LIT("FL_WARN: LPC845 bring-up OK")` line. The harness then
reported `warn_ok=False`.
Move the FL_WARN_LIT emit into the `echo` lambda (`FL_WARN_LIT(
"FL_WARN: echo invoked")`) so it fires per-request and lands in the
accumulator alongside the RPC response. Update the harness's
`warn_token` to match.
Verified on real LPC845-BRK on COM10:
TX: {"jsonrpc":"2.0","method":"echo","params":[4242],"id":1}
RX: b'FL_WARN: echo invoked\r\nREMOTE: {"id":1,"result":4242,"jsonrpc":"2.0"}\r\n'
✅ Serial.println — REMOTE: response received
✅ JSON-RPC echo — sentinel 4242 round-trip verified
✅ FL_WARN_LIT — FastLED warn pipeline reached host
This closes the original /goal: "Serial.println, FL_WARN and JSON RPC
all work with the auto research tool" on LPC845-BRK.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
ci/autoresearch/phases.py (1)
1551-1560:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix f-string prefix lint errors and string concatenation syntax bug.
Lines 1551, 1553, 1556, and 1558 use f-string prefixes on static strings without placeholders (Ruff F541 violation, flagged in past review). Additionally, lines 1558-1559 have a syntax bug: the second string literal on line 1559 is orphaned and will be discarded at runtime because there's no concatenation operator.
🐛 Proposed fix
print( - f" ✅ FL_WARN_LIT — FastLED warn pipeline reached host" + " ✅ FL_WARN_LIT — FastLED warn pipeline reached host" if warn_ok - else f" ❌ FL_WARN_LIT — warning literal not observed" + else " ❌ FL_WARN_LIT — warning literal not observed" ) print( - f" ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)" + " ✅ FL_DBG — full log pipeline (bonus, LARGE_MEMORY only)" if log_ok - else f" ⚠️ FL_DBG — full pipeline not active" - " (expected on Low-memory targets — FL_WARN_LIT is the gate)" + else " ⚠️ FL_DBG — full pipeline not active" + " (expected on Low-memory targets — FL_WARN_LIT is the gate)" )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci/autoresearch/phases.py` around lines 1551 - 1560, Remove the f-string prefix (f"") from all four print statement strings on lines 1551, 1553, 1556, and 1558 since they contain no placeholder expressions and violate Ruff F541. Additionally, fix the string concatenation bug on lines 1558-1559 by adding a concatenation operator (+) between the two string literals so the second string on line 1559 is not discarded at runtime.
🧹 Nitpick comments (1)
ci/autoresearch/phases.py (1)
614-614: ⚡ Quick winExtract duplicated
bring_up_envsto a module-level constant.The
bring_up_envsset is defined identically in four different functions (lines 614, 852, 1042, 1178). Extract this to a module-level constant to eliminate duplication and prevent inconsistencies.♻️ Proposed refactor
Add near the top of the file (after imports, around line 58):
MAX_AUTORESEARCH_LANES = 16 + +# LPC bring-up boards that use the minimal AutoResearchLpc sketch +# (JSON-RPC echo only, no pin discovery or LED-protocol matrix). +LPC_BRING_UP_ENVS = {"lpc845brk", "lpcxpresso845max", "lpcxpresso804"}Then replace all four instances:
- bring_up_envs = {"lpc845brk", "lpcxpresso845max", "lpcxpresso804"} - if env_for_sketch in bring_up_envs: + if env_for_sketch in LPC_BRING_UP_ENVS:- bring_up_envs = {"lpc845brk", "lpcxpresso845max", "lpcxpresso804"} - if final_environment in bring_up_envs: + if final_environment in LPC_BRING_UP_ENVS:- bring_up_envs = {"lpc845brk", "lpcxpresso845max", "lpcxpresso804"} - if ctx.final_environment in bring_up_envs: + if ctx.final_environment in LPC_BRING_UP_ENVS:- bring_up_envs = {"lpc845brk", "lpcxpresso845max", "lpcxpresso804"} - if ctx.final_environment in bring_up_envs: + if ctx.final_environment in LPC_BRING_UP_ENVS:Also applies to: 852-852, 1042-1042, 1178-1178
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@ci/autoresearch/phases.py` at line 614, The set constant `bring_up_envs` is defined identically in four separate locations within the file (at lines 614, 852, 1042, and 1178). Extract this duplicated definition to a single module-level constant near the top of the file after the import statements (around line 58) to eliminate duplication and ensure consistency. Then replace all four instances of the local `bring_up_envs` definitions with a reference to the newly created module-level constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@ci/autoresearch/phases.py`:
- Around line 1551-1560: Remove the f-string prefix (f"") from all four print
statement strings on lines 1551, 1553, 1556, and 1558 since they contain no
placeholder expressions and violate Ruff F541. Additionally, fix the string
concatenation bug on lines 1558-1559 by adding a concatenation operator (+)
between the two string literals so the second string on line 1559 is not
discarded at runtime.
---
Nitpick comments:
In `@ci/autoresearch/phases.py`:
- Line 614: The set constant `bring_up_envs` is defined identically in four
separate locations within the file (at lines 614, 852, 1042, and 1178). Extract
this duplicated definition to a single module-level constant near the top of the
file after the import statements (around line 58) to eliminate duplication and
ensure consistency. Then replace all four instances of the local `bring_up_envs`
definitions with a reference to the newly created module-level constant.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: bbff2e37-9ad0-40e9-9fa4-0c78a5c70631
📒 Files selected for processing (2)
ci/autoresearch/phases.pyexamples/AutoResearchLpc/AutoResearchLpc.ino
🚧 Files skipped from review as they are similar to previous changes (1)
- examples/AutoResearchLpc/AutoResearchLpc.ino
Adds `probePair(packed)` RPC to the LPC bring-up sketch — single-int
encoding `(out_pin << 8) | in_pin` reuses the `JsonToType<int>`
instantiation `echo` already pulled in (a 2-int binding would
re-instantiate the tuple/arg-converter chain and blow ~1.6 KB of
flash budget — confirmed in this session).
Probe sequence:
1. Pre-charge: both pins OUTPUT HIGH for 200 µs to flush residual
capacitance left by the previous probe (without this the scan
gave "succeeds both ways" false positives for adjacent pins on
the breakout header).
2. Drive `out` LOW, switch `in` to INPUT_PULLUP, sleep 2 ms — the
~50 kΩ internal pull-up needs the full settle to win against
stray breadboard capacitance. A real jumper wire pulls the line
LOW in nanoseconds; parasitic coupling doesn't survive the fight.
3. Read `in`, restore both pins to plain INPUT (high-Z).
Verified on real LPC845-BRK on COM10:
Bidirectional hits: 1
P0_10 <-> P0_11
P0_10 and P0_11 are the LPC845's only two true open-drain pins (no
internal pull-up resistors — the dedicated I2C SDA/SCL pads). That
asymmetry shows up in the scan as a stripe of unidirectional hits
when EITHER pin is used as the `in` side (its absent pull-up always
reads LOW), but as the `out` side they drive push-pull normally, so
the lone bidirectional hit cleanly identifies the bridge.
Flash impact: 63 060 / 65 536 B text (~940 B headroom remaining).
Refs: #3014, #3015.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Summary
Two follow-ups to #3012 / #3013 that complete the LPC845-BRK bring-up goal (FastLED #3002 + #3004):
1. LPC8xx WWDT watchdog driver
src/platforms/arm/lpc/watchdog_lpc.impl.hppimplements the FastLEDfl::Watchdoginterface against the LPC84x Windowed Watchdog Timer. Routes through the SYSCON-clocked WDOSC (~125 kHz tick after the WWDT-internal /4 prescaler). Self-contained — no dependency on the LPC8xx Arduino core's CMSIS header (which only exposes the IRQ vector list).begin(timeout_ms),feed(),disable()lastResetCause()fromSYSRSTSTAT(sticky bits, write-1-to-clear)reboot()via Cortex-M AIRCR SYSRESETREQFL_IS_ARM_LPCinplatforms/watchdog.impl.cpp.hppsetup()with a 3-second window so a hung firmware unbricks itself on crash2.
FL_WARN_LITenabled on Low-memory targetsFL_WARN_LIT(literal)was documented as the "minimal-overhead variant for literal-only messages" that bypasses the sstream +operator<<chain the full FL_WARN uses — but the gate atlog.h:102made it a no-op on any target withoutSKETCH_HAS_LARGE_MEMORY. The very platforms the lite macro was supposed to serve got a no-op.Fix: new
FASTLED_LOG_LITE_ENABLEDgate (=FASTLED_LOG_VERBOSITY >= 1, no memory check).FL_WARN_LIT/FL_LOG_LITmove under this gate and stay alive on LPC845 / AVR / ATtiny.The autoresearch bring-up harness now verifies the
FL_WARN_LIT(\"FL_WARN: LPC845 bring-up OK\")line reaches the host — third leg of the bring-up contract alongsideSerial.printlnand JSON-RPC echo.Build impact
fl::math)Test plan
bash test fl/math/math.cpp --cpp— host math tests passbash test json --cpp— host JSON tests passbash test log --cpp— host log tests passbash test power --cpp— host power_mgt tests passbash autoresearch lpc845brk— firmware builds and links (text=63260, data=372on 64 KB-flash part)🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation