Repository navigation
test: add hardware-validated smoke tests (xiao_nrf54l15, xiao_mg24) - #41
Merged
Merged
Conversation
Per-board MicroPython smoke tests in example/ (matching the existing per-board test scripts like xiao_stm32c5_full_test.py), run over the board REPL after flashing the CI firmware artifact. Both were executed against the v1.27.0 master builds on real hardware (2026-09-29): xiao_nrf54l15 6/6 PASS, xiao_mg24 7/7 PASS. Findings from the hardware run that are encoded in the tests: - mg24: the user C modules (PR #38, USER_C_MODULES) register with uppercase names -- MP_REGISTER_MODULE(MP_QSTR_ADC, ...) etc, so the importable modules are ADC / RTC / CAN / PDM / LowPWR, and the callable classes live inside (ADC.ADC, RTC.RTC), consistent with example/boards/xiao.py and every shipped example. An early draft of this test did `import adc` / `import rtc` and reported ImportError; that was a test bug, not a firmware bug. The test now also exercises ADC.ADC(("adc0", ch)).read_uv() across channels and an RTC.RTC() datetime round-trip. - nrf54l15: gc threshold lowered 50K -> 32K. The zephyr port default CONFIG_MICROPY_HEAP_SIZE is 49152, leaving 48000 usable bytes after GC bookkeeping (measured: free+alloc == 48000 exactly), so a >50K assertion can never pass on the default build. - Script headers document how to run: both boards expose the REPL via the onboard debug bridge CDC port (mpremote required for raw-paste flow control); the MCU USB peripheral is not wired to the USB-C connector, so no other USB serial device is expected. The LED check is visual. RA4M1 smoke test follows in a separate PR once its hardware run is done. Co-Authored-By: Claude <noreply@anthropic.com>
cumin777
force-pushed
the
test/hw-smoke-nrf54l15-mg24
branch
from
September 30, 2026 02:02
434a59c to
6a1c7e2
Compare
Contributor
Author
Status before merge (2026-09-30)Validated on hardware (2026-09-29): NOT validated — no boards on hand, recorded here so the gap is visible:
Docs gap for users: the wiki has no MicroPython usage page at all for nrf52840 and ra4m1. For nrf54l15/mg24 a wiki page exists but never mentions that the REPL arrives through the onboard debug bridge'''s CDC port (the MCU USB is not wired to the USB-C connector) — users without that context hit "where is the REPL" (see #12). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds per-board MicroPython hardware smoke tests, placed in
example/alongside the existing per-board test scripts (xiao_stm32c5_full_test.py,xiao_nrf54lm20b_full_test.py, ...):example/xiao_nrf54l15_smoke_test.py— 6/6 PASS on hardwareexample/xiao_mg24_smoke_test.py— 7/7 PASS on hardwareBoth were executed against the v1.27.0 master builds on real hardware (2026-09-29).
RA4M1 is not included: no board on hand, hardware run deferred — see the status comment below.
What the hardware run corrected
mg24 user C modules are uppercase (
ADC,RTC,CAN,PDM,LowPWRviaMP_REGISTER_MODULE(MP_QSTR_*)), with the callable class inside the module (ADC.ADC,RTC.RTC). Consistent withexample/boards/xiao.pyand every shipped example; an early draft of this test didimport adc/import rtcand "failed" — that was a test bug, not a firmware bug. The test exercisesADC.ADC(("adc0", ch)).read_uv()across channels and anRTC.RTC()datetime round-trip (the on-hardware validation of the ci(mg24): drop dead-fork PR override, apply repo v1.27.0 patches for USER_C_MODULES #38USER_C_MODULESwiring).nrf54l15 gc threshold 50K was unreachable: the zephyr port default
CONFIG_MICROPY_HEAP_SIZEis 49152, leaving exactly 48000 usable bytes after GC bookkeeping (measuredfree+alloc == 48000). Threshold is now 32K.How to run
Both boards carry an onboard debug bridge (CMSIS-DAP + CDC UART) — the REPL lives on the bridge CDC port; the MCU's own USB peripheral is not wired to the USB-C connector, so no other USB serial device is expected.
mpremotespecifically: its raw-paste flow control is needed to push the ~5 KB script through the bridge. Final LED check is visual.