Skip to content

tests: build the bundled libraries in CI, and fix Wire on the nRF54L10/L05 DKs - #16

Open
cvaldess wants to merge 2 commits into
meshtastic:masterfrom
cvaldess:pr/ci-build-libraries
Open

cvaldess wants to merge 2 commits into
meshtastic:masterfrom
cvaldess:pr/ci-build-libraries

Conversation

@cvaldess

@cvaldess cvaldess commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

CI only builds tests/blink, which pulls in the core and nothing under libraries/, so a change to Bluefruit54Lib, nRF54Crypto, LittleFS, Wire and the rest passes CI without being compiled. This adds tests/libraries, a sketch that includes and calls each bundled library, and CI builds it for every board after blink. It takes its boards, platform and framework symlink from tests/blink through extra_configs, so the two can't drift apart.

The new test found a bug on the way. On the nRF54L10-DK and nRF54L05-DK, Wire uses the default NRF_TWIM0 alias, TWIM20, which shares SERIAL20 with Serial2's UARTE20. Both define SERIAL20_IRQHandler, so any sketch that uses Wire on those boards fails to link. The first commit routes Wire to TWIM22, as the nRF54L15 variants already do; the L05 and L10 MDK headers define NRF_TWIM22 and SERIAL22_IRQn.

Left out of the test:

  • BLEAdafruitService needs Adafruit libraries from the registry (NeoPixel, Unified Sensor, AHRS, Sensor Calibration).
  • PDM and Servo stop with #error on anything but nRF52, and BLEHomekit doesn't compile against Bluefruit54Lib (Advertisable and BLEAdvertisingData aren't there, and crypto.c has C++ in a .c file). None of the three has been ported to the nRF54L. I can remove them or port them in a separate PR, whichever you prefer.

Testing

Both steps pass for the five boards on my fork's CI: https://github.com/cvaldess/nRF54_Arduino/actions/runs/43725779089. The log shows Bluefruit54Lib, nRF54Crypto, Wire and the rest being compiled. Locally, with platform v0.5.0, the nRF54L10-DK ELF has Wire's handler on SERIAL22 and Serial2's on SERIAL20.

This is compile-only: nothing here has run on hardware, and I don't have an L10 or L05 DK.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed I2C (Wire) interrupt conflicts on the nRF54L05 and nRF54L10 development kits, allowing Wire and Serial2 to be used together.
  • Tests
    • Added compile-and-link coverage for bundled libraries across configured boards.
    • Expanded automated builds to check the bundled-library tests alongside the blink test.

The default NRF_TWIM0 alias is TWIM20, which shares SERIAL20 with UARTE20.
These variants define Serial2, so Uart.cpp and Wire both define
SERIAL20_IRQHandler and any sketch using Wire fails to link. Use TWIM22, as the
nRF54L15 boards do; the nRF54L05 and L10 MDK headers define NRF_TWIM22 and
SERIAL22_IRQn.
Blink only pulls in the core, so CI never compiled anything under libraries/.
tests/libraries includes and uses each bundled library, and takes its boards,
platform and framework symlink from tests/blink through extra_configs, so the
two can't drift apart. CI builds it after blink for every board.

Left out: BLEAdafruitService needs Adafruit libraries from the registry, and
PDM, Servo and BLEHomekit don't build on the nRF54L.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The CI matrix now builds a bundled-library test for each board. The test exercises several libraries. Both nRF54 DK variants map Wire to TWIM22 and the SERIAL22 interrupt definitions.

Changes: Wire mapping and library build

Layer / File(s) Summary
Map Wire to TWIM22
variants/nrf54l05dk/variant.h, variants/nrf54l10dk/variant.h
Both variants map Wire to TWIM22, TWIS22, and SERIAL22 interrupt definitions. Comments document the TWIM20/UARTE20 shared-handler conflict.
Build bundled-library test
tests/libraries/platformio.ini, tests/libraries/src/main.cpp, .github/workflows/githubci.yml
The test configuration imports the blink test configuration. The test sketch initializes and exercises bundled libraries. The CI matrix builds the test for each configured board.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to 016b1

The change moves Wire to TWIM22 on the nRF54L10 and L05 DKs to avoid a duplicate SERIAL20 interrupt handler with Serial2. It also adds a CI build of the bundled libraries for each board. Source inspection shows the interrupt routing is correct. The tests are compile-only and do not run on hardware, but no concrete merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names two changes that the changeset contains: CI now builds the bundled-library test (tests/libraries) for every board, and Wire on the nRF54L10 and nRF54L05 DKs is routed to TWIM22/TWIS22 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names two changes that the changeset contains: CI now builds the bundled-library test (tests/libraries) for every board, and Wire on the nRF54L10 and nRF54L05 DKs is routed to TWIM22/TWIS22 with SERIAL22 interrupt settings. The raw summary confirms both, so the title is related to the main changes. It does not describe the new test sketch, its exclusions, or the compile-only testing scope, which is acceptable for a title.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

A rabbit checks the boards at dawn,
While TWIM22 carries Wire along.
The bundled libraries join the run,
Each matrix build tests one by one.
I nibble code, then hop along!

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30529f9a-5a3c-482a-b299-d59bf02db27e
Commits

Reviewing files that changed from the base of the PR and between b7e729c and 016b151.

Files selected for processing: 5

  • .github/workflows/githubci.yml
  • tests/libraries/platformio.ini
  • tests/libraries/src/main.cpp
  • variants/nrf54l05dk/variant.h
  • variants/nrf54l10dk/variant.h

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant