Skip to content

Add external repo CI for fprime-samd-reference (SAMD21 Curiosity Nano) - #6329

Merged
LeStarch merged 2 commits into
nasa:develfrom
lestarch-autobot:ext-fprime-samd-reference
Nov 5, 2026
Merged

LeStarch merged 2 commits into
nasa:develfrom
lestarch-autobot:ext-fprime-samd-reference

Conversation

@lestarch-autobot

@lestarch-autobot lestarch-autobot commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator
Related Issue(s) none — requested by @LeStarch; follows #5360 (cFS) and the Zephyr external-repo workflows
Has Unit Tests (y/n) n (CI workflow only)
Documentation Included (y/n) n
Generative AI was used in this contribution (y/n) AI

Change Description

Adds .github/workflows/ext-fprime-samd-reference.yml: the baremetal-SAMD21 counterpart of ext-fprime-zephyr-reference.yml. It cross-builds fprime-community/fprime-samd-reference (CuriosityReference, ATSAMD21G17D Cortex-M0+) against the PR's F Prime with fprime-ci on ubuntu-22.04, archives the result, then on the apple-ci hardware runner flashes it to a Microchip SAMD21 Curiosity Nano over the on-board nEDBG (OpenOCD) and runs the deployment's pytest integration tests over UART.

Structure is the Zephyr file with one board instead of two: reusable-get-pr-branch.yml (default_target_ref: main), nasa/fprime-actions/external-repository-setup@devel for build / int, fprime-ci -c ./lib/fprime-samd/ci/sample-configs/samd21g17.yml --add-stage build / --skip-stage build, upgrade-package to a matching fprime-gds pr-xxxx branch.

The pieces it drives live in the community repos and are merged: fprime-community/fprime-samd#62 (samd-ci fprime-ci plugin config + setup-ci action), fprime-community/fprime-samd#63 (assert hooks under the #6326 names), fprime-community/fprime-samd-reference#15 (setup action, integration tests, lib/fprime → nasa devel f28d2da) and fprime-community/fprime-samd-reference#16 (lib/fprime-samd pin).

Rationale

Gives devel a third hardware-in-the-loop reference build, and the first baremetal (no-OS, 16 KiB RAM) one. #6326 and #6285 each broke the SAMD reference without any signal on nasa/fprime; this workflow would have caught both on the PR.

Testing/Review Recommendations

  • actionlint reports only the two items the Zephyr workflow also has (apple-ci custom runner label; unquoted ${CI_CONFIG_FILE}).
  • The exact fprime-ci build stage runs on an x86 host and the --skip-stage build stage on a Linux aarch64 host with the Curiosity Nano attached: OpenOCD ** Verified OK **, GDS on /dev/samd21-curiosity @ 115200, 3 passed, hardware stage ≈ 40 s. Three such runs are logged in the companion PRs; the final one used the exact pins now on fprime-samd-reference main.
  • The apple-ci runner needs, before the integration job can pass: openocd (0.12+ with interface/cmsis-dap.cfg), the udev rule fprime-samd/ci/udev/91-samd21-curiosity.rules (gives /dev/samd21-curiosity), the runner user in dialout/plugdev, and the board on USB. The build job needs nothing beyond setup-ci (it installs the Adafruit SAMD toolchain via arduino-cli).

Future Work

  • Second SAMD board (e.g. the Feather M0) would be another include: entry on this file, as the Zephyr file does.

Contributor Checklist

AI Usage (see policy)

Devin (generative AI) wrote the workflow, the community-repo CI plumbing it depends on, and ran the hardware validation, under the direction of @LeStarch who reviewed the plan and merge order.

IAMAI

Run findings (resolved)

  • Build job: ubuntu-22.04 ships Python 3.10, but fprime-samd's static-tlm-packetizer / static-cmd-dispatcher autocoders need tomllib (3.11+) — the job now runs on ubuntu-24.04 (3.12), matching the floor fprime-samd's own setup-fprime action documents. Green since bb12ead.
  • Integration run 1: interface/cmsis-dap.cfg alone attached to the Pico 2 Debug Probe (2e8a:000c, DPv3) rather than the Nano's nEDBG. Fixed in the sample config by ci: pin the OpenOCD probe to the Curiosity Nano's nEDBG (VID:PID 03eb:2175) fprime-community/fprime-samd#64 (cmsis_dap_vid_pid 0x03eb 0x2175), pulled into the reference by Bump lib/fprime-samd to main d4ecc6b (fprime-samd#64: pin the OpenOCD probe to the nEDBG) fprime-community/fprime-samd-reference#17; this workflow reads the reference's main, so no change here.
  • Integration run 2: unable to find a matching CMSIS-DAP device — the nEDBG is CMSIS-DAP v1 (HID only) and the runner's from-source raspberrypi/openocd had been built without libhidapi, so it only enumerated v2/bulk probes. Runner fix: rebuild with libhidapi-dev (the fork's internal jimtcl also needs LIBS=-lm, build error missing math flag -lm raspberrypi/openocd#145).
  • Integration run 3: flash ** Verified OK **, then the plugin timed out waiting for /dev/samd21-curiosity — fprime-samd/ci/udev/91-samd21-curiosity.rules was not yet installed on the runner. Runner fix: install the rule, udevadm control --reload && udevadm trigger.
  • Integration run 4: green — ** Verified OK **, GDS on /dev/samd21-curiosity, 3 passed in 1.59s, CI success!.

Runner prerequisites, as actually verified: openocd ≥ 0.12 with the HID (CMSIS-DAP v1) backend, 91-samd21-curiosity.rules installed, runner user in dialout and plugdev, Nano on USB.

…n external repository

Adds ext-fprime-samd-reference.yml, the baremetal-SAMD21 counterpart of ext-fprime-zephyr-reference.yml: cross-build CuriosityReference with fprime-ci on ubuntu, then flash it to a Curiosity Nano on the hardware runner and run its integration tests.

Co-authored-by: M Starch <LeStarch@googlemail.com>
LeStarch
LeStarch previously approved these changes Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report — base devel

Overall (line): 85.81% → 85.93% (+0.12)
Regression threshold: 0.50% (line).

Regressions

Module Line Δ Function Δ Branch Δ
Fw/DataStructures 97.42 -0.54 97.14 +0.00 81.75 -0.91

Modules changed

Module Line Δ Function Δ Branch Δ
Fw/DataStructures 97.42 -0.54 97.14 +0.00 81.75 -0.91
Os/Generic 90.18 -0.10 89.13 +0.00 75.67 +0.38
Os/Generic/Types 92.14 +0.35 92.86 +0.00 74.77 +0.00
Os/Posix 71.03 +0.39 87.50 +0.00 50.89 +0.22
Svc/DpCatalog 89.44 +1.50 98.00 +0.13 82.44 +1.92
Svc/FprimeDeframer 100.00 +1.85 100.00 +0.00 100.00 +4.08
Fw/Types 57.79 +2.30 61.14 +0.45 37.88 +2.60

New modules

Module Line Function Branch
Fw/Prm 0.00 0.00 0.00

Modules without UTs

CFDP/Checksum/GTest, Drv/LinuxGpioDriver, Drv/LinuxI2cDriver, Drv/LinuxSpiDriver, Drv/Ports/DataTypes, Drv/PosixUartDriver, FppTestProject/FppTest/topology/async, FppTestProject/FppTest/topology/components/Comp, FppTestProject/FppTest/topology/components/Framework, FppTestProject/FppTest/topology/components/Receiver, FppTestProject/FppTest/topology/components/Sender, FppTestProject/FppTest/topology/guarded, FppTestProject/FppTest/topology/sync, FppTestProject/FppTest/topology/top_ports, FppTestProject/FppTest/topology/types, Fw/Com, Fw/Comp, Fw/FilePacket/GTest, Fw/Fpy, Fw/Obj, Fw/Port, Fw/Sm, Fw/Test, Fw/Types/GTest, Os/Models, Svc/Ccsds/Types, Svc/Ccsds/Utils, Svc/FatalHandler, Svc/Subtopologies/CdhCore, Svc/Subtopologies/ComCcsds, Svc/Subtopologies/ComCcsdsSdls, Svc/Subtopologies/ComFprime, Svc/Subtopologies/ComLoggerTee, Svc/Subtopologies/DataProducts, Svc/Subtopologies/DpCompression, Svc/Subtopologies/FileHandling, Svc/Subtopologies/FileHandlingCfdp, Svc/Subtopologies/FileHandlingCfdp/FileHandlingCfdpConfig, TestDeploymentsProject/Ref/DpDemo, TestDeploymentsProject/Ref/PingReceiver, TestDeploymentsProject/Ref/RecvBuffApp, TestDeploymentsProject/Ref/SendBuffApp, TestDeploymentsProject/Ref/Top, TestDeploymentsProject/Ref/TypeDemo, cmake/test/data/TestConfigDeployment, cmake/test/data/TestDeployment/TestBuildAutocoder, cmake/test/data/TestDeployment/TestDuplicateDirective, cmake/test/data/TestDeployment/TestHeaderAutocoder, cmake/test/data/TestDeployment/TestLinkDepends, cmake/test/data/TestDeployment/TestRelative, cmake/test/data/test-fprime-library/TestLibrary/TestComponent, cmake/test/data/test-fprime-library2/TestLibrary2/TestComponent

fprime-samd's static-tlm-packetizer and static-cmd-dispatcher autocoders import
tomllib, so the build needs Python >= 3.11; ubuntu-22.04 ships 3.10 and the job
failed with ModuleNotFoundError. ubuntu-24.04 ships 3.12, matching the floor
fprime-samd's own setup-fprime action documents.

Co-authored-by: M Starch <LeStarch@googlemail.com>
@LeStarch
LeStarch merged commit 3556871 into nasa:devel Nov 5, 2026
91 of 94 checks passed
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
github-actions Bot added a commit that referenced this pull request Nov 5, 2026
github-actions Bot added a commit that referenced this pull request Nov 6, 2026
github-actions Bot added a commit that referenced this pull request Nov 6, 2026
github-actions Bot added a commit that referenced this pull request Nov 6, 2026
github-actions Bot added a commit that referenced this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Issues pertaining to Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants