Repository navigation
Add external repo CI for fprime-samd-reference (SAMD21 Curiosity Nano) - #6329
Conversation
…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>
Coverage report — base
|
| 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>
…1 Curiosity Nano) (#6329)
…1 Curiosity Nano) (#6329)
…1 Curiosity Nano) (#6329)
…D21 Curiosity Nano) (#6329)
…1 Curiosity Nano) (#6329)
…1 Curiosity Nano) (#6329)
…1 Curiosity Nano) (#6329)
…D21 Curiosity Nano) (#6329)
Change Description
Adds
.github/workflows/ext-fprime-samd-reference.yml: the baremetal-SAMD21 counterpart ofext-fprime-zephyr-reference.yml. It cross-builds fprime-community/fprime-samd-reference (CuriosityReference, ATSAMD21G17D Cortex-M0+) against the PR's F Prime withfprime-cionubuntu-22.04, archives the result, then on theapple-cihardware 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@develforbuild/int,fprime-ci -c ./lib/fprime-samd/ci/sample-configs/samd21g17.yml --add-stage build/--skip-stage build,upgrade-packageto a matching fprime-gdspr-xxxxbranch.The pieces it drives live in the community repos and are merged: fprime-community/fprime-samd#62 (
samd-cifprime-ci plugin config +setup-ciaction), fprime-community/fprime-samd#63 (assert hooks under the #6326 names), fprime-community/fprime-samd-reference#15 (setupaction, integration tests,lib/fprime→ nasa devel f28d2da) and fprime-community/fprime-samd-reference#16 (lib/fprime-samdpin).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
actionlintreports only the two items the Zephyr workflow also has (apple-cicustom runner label; unquoted${CI_CONFIG_FILE}).fprime-cibuild stage runs on an x86 host and the--skip-stage buildstage 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 onfprime-samd-referencemain.apple-cirunner needs, before the integration job can pass:openocd(0.12+ withinterface/cmsis-dap.cfg), the udev rulefprime-samd/ci/udev/91-samd21-curiosity.rules(gives/dev/samd21-curiosity), the runner user indialout/plugdev, and the board on USB. The build job needs nothing beyondsetup-ci(it installs the Adafruit SAMD toolchain viaarduino-cli).Future Work
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.
AGENTS.md).IAMAI
Run findings (resolved)
ubuntu-22.04ships Python 3.10, but fprime-samd'sstatic-tlm-packetizer/static-cmd-dispatcherautocoders needtomllib(3.11+) — the job now runs onubuntu-24.04(3.12), matching the floor fprime-samd's ownsetup-fprimeaction documents. Green since bb12ead.interface/cmsis-dap.cfgalone 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'smain, so no change here.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 withlibhidapi-dev(the fork's internal jimtcl also needsLIBS=-lm, build error missing math flag -lm raspberrypi/openocd#145).** Verified OK **, then the plugin timed out waiting for/dev/samd21-curiosity—fprime-samd/ci/udev/91-samd21-curiosity.ruleswas not yet installed on the runner. Runner fix: install the rule,udevadm control --reload && udevadm trigger.** 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.rulesinstalled, runner user indialoutandplugdev, Nano on USB.