Repository navigation
chore(lpc): pick up LPC8xx core IOCON pinMode + HardFault frame fixes - #5264
Conversation
Cascade FastLED/framework-arduino-lpc8xx#42 (fixes #40, #41) into FastLED builds: - ci/boards.py: platform-nxp-lpc8xx 4b6d395 -> 4804de6 (#12, pins the framework at 547b5a7), and pin framework-arduino-lpc8xx 547b5a7 through platform_packages on every LPC board. fbuild does not read a git platform's platform.json package pins, so without the override the build stayed on fbuild's compiled-in core (9e8be02). - AutoResearch: corePullCheck RPC (LPC845, non-DMA-loopback builds) checks the vendor core's ::pinMode pulls, and --pin-toggle-rx runs it on pins the jumper scan finds idle. - autoresearch: the nxplpc re-flash step looked for firmware.bin under .fbuild/build/<env>/release/, but current fbuild writes .fbuild/build/release/. The second --test-fault-emit trigger always failed on that. Both layouts are now accepted. - Docs/comments: the cascade step, the new FAULT line format, the NO_FAULT_EMIT interaction, and a weak (not strong) NMI alias.
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Memory usage (this PR vs. its merge base)Change in
|
|
@coderabbitai review |
Action not completed
|
…d; skip IOCON-identity pins (FastLED#5274) * fix(autoresearch): LPC corePullCheck only in the --pin-toggle-rx build; skip IOCON-identity pins (FastLED#5270) - phases.py passes FASTLED_AUTORESEARCH_LPC_CORE_PULL_CHECK with --pin-toggle-rx; the sketch compiles corePullCheck only under it. The default lpc845 image drops from 60472 to 59684 bytes. - Platform-neutrality markers on the remaining LPC lines from FastLED#5262/FastLED#5264. - The pull check skips P0_4 and P0_24 (IOCON slot == GPIO bit, so they cannot detect framework-arduino-lpc8xx#40), and a missing binding in the --pin-toggle-rx build now fails instead of skipping. Refs FastLED#5268 * fix: address CodeRabbit review feedback - check_core_pulls probes the corePullCheck binding (four -1 slots) before scanning, so a missing RPC fails even when no idle pin qualifies or the scan fails - test_lpc_pin_toggle_rx documents that it requires the --pin-toggle-rx build - lowMemCorePullCheck reads back via lowMemSettledHigh (fl::digitalRead); only the vendor ::pinMode calls under test stay platform specific * fix(autoresearch): an unanswered corePullCheck probe fails instead of skipping
…ly the handshake timeout (FastLED#5293) * ci(fbuild): require fbuild 2.5.52, drop the LPC8xx core pin, retry only the handshake timeout fbuild 2.5.52 builds the LPC8xx core at 547b5a7 itself (FastLED/fbuild#2078), so ci/boards.py no longer needs the framework-arduino-lpc8xx platform_packages override on the five LPC boards. 2.5.52 also fixes the 'session closed' serial attach of FastLED#5271 (FastLED/fbuild#2083, FastLED#2084, FastLED#2089): the client now reports the daemon's reason, so the retry's 'session closed' match was dead. What remains on a CPU-starved host is the client's 5 s handshake timeout (FastLED/fbuild#2095): 0 of 133 attaches failed at this host's own load (18-97), 11 of 16 at load 73-106 and 54 of 56 at 106-148 with CPU hogs added. NativeFbuildSerialAdapter now retries that timeout once without restarting the daemon, and a lost daemon still gets its own single restart. Also silence an unused-variable warning in SlimBridgeController on targets where FL_WARN_EVERY compiles out (seen in the lpc845 Blink build). Refs FastLED#5268, FastLED#5271, FastLED#5264 * fix: address CodeRabbit review feedback - Attach the retried handshake-timeout note to the error when the lost-daemon restart (ensure_fbuild_daemon) itself raises, so RpcBench still reports the first attempt; regression test added. * ci(serial): mark the daemon-restart try as KBI-handled by connect()
Summary
Cascades the LPC8xx Arduino core fixes into FastLED builds.
547b5a7053f60c59bbd86e9c6796bebae07c82414804de671a3a43e204b0b742b8984380c5a1fe2bDepends on FastLED/framework-arduino-lpc8xx#42 and FastLED/platform-nxp-lpc8xx#12. Both are merged.
ci/boards.py:_NXPLPC_PLATFORM4b6d395 -> 4804de6. Every LPC board also getsplatform_packages = framework-arduino-lpc8xx@.../archive/547b5a7….tar.gz#547b5a7…. fbuild ignores a git platform'splatform.jsonpackage pins and uses its compiled-in core (9e8be02; the fbuild cache held only that one). Without the override the platform bump would not reach the build. The generated.build/fbuild/lpc845/platformio.ininow carries the override.AutoResearchLowMemory.h:corePullCheck [a,b,c,d](LPC845, non-DMA-loopback builds; +784 B flash, AutoResearch 63988/65536). FastLED's backend sets the opposite pull, then the core's::pinMode(INPUT_PULLUP / INPUT_PULLDOWN)runs and the pin is read.--pin-toggle-rxcalls it on pins the jumper scan finds idle and fails on a wrong reading (ci/autoresearch/lpc_pin_scan.py::check_core_pulls, with unit tests).phases.py: pre-existing bug. The nxplpc re-flash looked for.fbuild/build/<env>/release/firmware.bin, but current fbuild writes.fbuild/build/release/, so--test-fault-emitalways failed before its second trigger. It now accepts both.register-maps.md), the fault-emit PC check (hardware-autoresearch.md), and the watchdog NMI comment (new FAULT format, weak alias, NO_FAULT_EMIT interaction).Hardware evidence (LPC845-BRK, /dev/ttyACM1)
#40 core
pinModepulls, idle pins fromfindConnectedPins:up=0;down=1(pull landed on another pad)up=1,down=0. In the final--pin-toggle-rxrun:core pull check PASS: 0:up=1,down=0 1:up=1,down=0 6:up=1,down=0 8:up=1,down=0#41 fault frame,
bash autoresearch lpc845 --test-fault-emit:FAULT: HardFault PC=0x10001E70 LR=0xFFFFFFF9 xPSR=0x10000020(PC in RAM, LR is an EXC_RETURN value)PC=0x0000039E LR=0x000005F5 xPSR=0x41000000 EXC_RETURN=0xFFFFFFF9; trigger_stackblowPC=0x0000039E LR=0x00000615 xPSR=0x61000000 EXC_RETURN=0xFFFFFFF9. Both PASS.0x39e: udf #255intriggerLowMemoryNullFault; LR = return addresses afterbl 39aat 0x5f0 (trigger_oom invoker) and 0x610 (recurseLowMemoryStackBlow).Regression,
bash autoresearch lpc845 --pin-toggle-rx(scan picks TX=P0_13 RX=P0_10): 3/3 PASS on the old and the final build (1 kHz mean 1000028 ns, 5 kHz 200059 ns, 10 kHz 100067 ns; 64 edges each).Compiles:
bash compile lpc845 --examples Blink(13968 B),bash compile lpc804 --examples Blink(6856 B),bash compile lpc845 --examples AutoResearch(63988 B). All succeed.bash lintpasses;ci/tests/test_lpc_pin_scan.py11 passed.Not done here
platformio.iniLPC envs still pin platform 12265f7.bash compile/autoresearchsynthesize their own ini, so those envs are unused.Summary by CodeRabbit