Skip to content

ci(nrf54l15,nrf52840): drop dead-fork PR override, build at MicroPython v1.27.0 pin - #37

Merged
cumin777 merged 1 commit into
Seeed-Studio:masterfrom
cumin777:ci/nrf54l15-nrf52840-pin-v1.27.0
Sep 28, 2026
Merged

cumin777 merged 1 commit into
Seeed-Studio:masterfrom
cumin777:ci/nrf54l15-nrf52840-pin-v1.27.0

Conversation

@cumin777

Copy link
Copy Markdown
Contributor

Problem (ref #28)

Both workflows overrode the lib/micropython submodule before building:

git reset --hard origin/master
gh pr checkout 18030

Upstream micropython PR #18030 (zephyr: supports adding external user modules) was closed unmerged on 2025-11-20 and its source fork has since been deleted, so gh pr checkout fails with upload-pack: not our ref and CI has been red for both boards.

Why deleting the override is safe for these two boards

  1. PR #18030's entire diff is one file, three additive lines (ports/zephyr/CMakeLists.txt: include(usermod.cmake), into QSTR, into include dirs). Neither workflow passes -DUSER_C_MODULES — grep across both files has zero matches — so those lines were a no-op for these boards. There is nothing else the fork could have contributed; the diff is the complete set.
  2. The last-green base is a strict ancestor of v1.27.0. The PR head tree was fork-base 9939565 (master, 2025-08-26) + 3 lines; compare v1.27.0...9939565 → ahead_by=0, behind_by=409. So v1.27.0 strictly contains everything the green builds had — no feature can be lost by the move.
  3. The repo is already pinned there. lib/micropython gitlink = 78ff170 = the v1.27.0 tag commit, and the green nRF54LM20A/B jobs build at exactly that submodule pin. This PR makes nRF54L15/nRF52840 do the same instead of moving the submodule to a deleted fork.

Scope (single variable changed)

  • ❌ removed: reset --hard origin/master + gh pr checkout 18030
  • ✅ build at the repo-wide pin (v1.27.0 via actions/checkout submodules, logged with git describe)
  • untouched: NCS sdk-nrf v3.0.2, Zephyr SDK 0.17.0, the banner.c version.h shim, board overlays (BOARD_ROOT stays this repo)

What CI adjudicates

v1.27.0 (409 commits newer than the 2025-08-26 snapshot) × NCS v3.0.2 is the one unproven combination — that is exactly what this trial run tests. Fallback if red: pin the submodule checkout to 9939565 (the exact last-green base, already used as MP_BASE in tools/xiao_stm32c5/build.sh) and treat v1.27.0 unification as a follow-up with a compat patch, mirroring the micropython/patches/v1.27.0/ pattern.

Closes half of the "4 red boards" in #28 (MG24 needs USER_C_MODULES — patch or native usermod; RA4M1 needs #16409).

🤖 Generated with Claude Code

…on v1.27.0 pin

Both workflows overrode the lib/micropython submodule with:
    git reset --hard origin/master
    gh pr checkout 18030
PR #18030 (upstream micropython, 'zephyr: supports adding external user
modules') was closed unmerged and its source fork has been deleted, so
'gh pr checkout 18030' fails with 'upload-pack: not our ref' and CI is
red for both boards.

Why deleting the override is safe for these two boards:
- PR #18030 changes exactly one file (ports/zephyr/CMakeLists.txt) with
  three additive lines that wire up USER_C_MODULES.  Neither workflow
  passes -DUSER_C_MODULES, so those lines are a no-op here.
- The PR head branch tree was fork-base(9939565, 2025-08-26 master) +
  3 lines; 9939565 is a strict ancestor of the repo-wide pin v1.27.0
  (compare behind_by=409, ahead_by=0), so v1.27.0 strictly contains
  everything the last-green build had.
- lib/micropython is already pinned at v1.27.0 (78ff170) in this repo
  and the green nRF54LM20A/B jobs build at exactly that submodule pin.

This change builds both boards at the repo-wide v1.27.0 pin, like
nRF54LM20A/B, instead of moving the submodule to a deleted fork.  NCS
v3.0.2 and the banner.c version.h shim are left untouched (single
variable changed).

Ref Seeed-Studio#28

Co-Authored-By: Claude <noreply@anthropic.com>
@cumin777

Copy link
Copy Markdown
Contributor Author

Environment change notes (pre-merge summary)

What these boards were building on before (the "old environment"):

Both workflows overrode the lib/micropython submodule before compiling:

git reset --hard origin/master
gh pr checkout 18030     # upstream micropython PR, "zephyr: supports adding external user modules"
  • PR #18030 was closed unmerged (author-closed 2025-11-20), and its source fork has since been deleted — GitHub can no longer serve the PR head ref, so gh pr checkout fails with upload-pack: not our ref. That is the entire reason CI went red for both boards (~2026-07). Nothing on the Seeed side changed.
  • The PR's full diff is 3 additive lines in ports/zephyr/CMakeLists.txt (USER_C_MODULES plumbing). Neither board passes -DUSER_C_MODULES, so it was functionally a no-op here. What the boards were effectively compiling was the fork's base: master commit 9939565 (2025-08-26) — a frozen snapshot, not a release, and no longer fetchable once the fork died.

What they build on now:

The repo-wide pin — lib/micropython at v1.27.0 (78ff170) — the same model as the green nRF54LM20A/B jobs. 9939565 is a strict ancestor of v1.27.0 (compare v1.27.0...9939565 → behind_by 409, ahead_by 0), so nothing from the old base is lost. NCS v3.0.2, Zephyr SDK 0.17.0 and the board overlays are untouched.

Test status / caveat:

✅ CI compiles both firmwares green (artifacts: zephyr.elf/.hex for nRF54L15, zephyr.elf/.uf2 for nRF52840).

⚠️ No on-hardware validation has been done yet. The firmware builds but has not been flashed to or smoke-tested on an actual XIAO nRF54L15 / nRF52840 (REPL over USB, basic imports, GPIO/BLE presence). Recommend a hardware smoke test before cutting a release that ships these images.

@cumin777
cumin777 merged commit 4367bc0 into Seeed-Studio:master Sep 28, 2026
5 of 7 checks passed
cumin777 added a commit that referenced this pull request Sep 29, 2026
…USER_C_MODULES

Same dead-fork failure as PR #37 (upstream PR #18030 closed unmerged,
source fork deleted -> 'upload-pack: not our ref'), but unlike
nRF54L15/nRF52840 this board genuinely uses USER_C_MODULES
(src/cmodules/modadc + modrtc), so the override cannot simply be
deleted.

The repo's shared 0001-zephyr-xiao-nrf54lm20b-runtime.patch already
carries PR #18030's entire one-file diff (include py/usermod.cmake +
MICROPY_SOURCE_USERMOD + MICROPY_INC_USERMOD in ports/zephyr), and
py/usermod.cmake at v1.27.0 appends /micropython.cmake to directory
entries, so the existing -DUSER_C_MODULES="dir;dir" keeps working
unchanged.

Also drops the 'sed 4096 -> 4096 * 2' hack on main.c: v1.27.0 moved
flash storage to zephyr_storage.c which reads erase_block_size from
the devicetree (4096 is only the fallback).

Cross-impact of running the shared patch script on this job was
checked: the BT advertiser-option shim is version-guarded (#ifdef),
and xiao_nrf54lm20b_imu_power.c is CONFIG_BOARD-guarded (compiles to
an empty translation unit on xiao_mg24).

Zephyr v4.2.0, board overlays and the USER_C_MODULES list are
unchanged.

Ref #28

Co-Authored-By: Claude <noreply@anthropic.com>
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