Skip to content

Phase 1: build the Mono runtime against NuttX 12 with build-mono.sh - #694

Merged
NevynUK merged 2 commits into
MergeManagedCodefrom
Phase1
Oct 14, 2026
Merged

NevynUK merged 2 commits into
MergeManagedCodefrom
Phase1

Conversation

@NevynUK

@NevynUK NevynUK commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Second phase of bringing the Mono (.NET) runtime into Meadow.OS. This one builds the runtime archives; nothing is linked into the OS yet.

Changes

  • build-mono.sh (new, standalone; build.sh and CI will call it in phase 3):
    • Locates the runtime through MEADOW_RUNTIME_DIR, or ../runtime beside the repository when that's unset.
    • Refuses a checkout that isn't at the MONO_RUNTIME_COMMIT commit and tree, or has local changes. MEADOW_RUNTIME_ALLOW_UNPINNED=1 lifts this for runtime development.
    • Requires arm-none-eabi-gcc 15 and a configured NuttX.
    • Builds Release by default; --debug, --clean and --verbose are available.
    • Writes to monoruntime/<release|debug>/, which is git-ignored.
    • Keeps a build stamp (runtime commit and changes, compiler, NuttX config hash) and rebuilds from scratch when any of these changes.
    • Checks that every archive the OS link needs was produced.
  • .gitignore: ignores monoruntime/.
  • MONO_RUNTIME_COMMIT: points at WildernessLabs/runtime Phase1 (a76e66e60c1). That's the runtime half of this phase: Phase 1: build the NuttX runtime against NuttX 12 headers with GCC 15 runtime#2.

Order

  1. Merge Phase 1: build the NuttX runtime against NuttX 12 headers with GCC 15 runtime#2 into the runtime's MergeManagedCode.
  2. I'll move MONO_RUNTIME_COMMIT here to that merge commit.
  3. Then this PR can merge.

Tested

  • Pinned Release and Debug builds pass from this worktree: 358/358 targets, all archives present.
  • The guards work: no runtime found, wrong commit or dirty checkout each stop the build with a clear message.
  • The OS build is unaffected; ./build.sh --clean --force passes.
  • No hardware test, as agreed for phase 1.

🤖 Generated with Claude Code

NevynUK and others added 2 commits October 14, 2026 15:07
Add build-mono.sh, which builds the .NET Mono runtime archives against
this repository's NuttX headers.  It is standalone for now; build.sh and
CI will call it once the archives are linked into the OS (phase 3).

- The runtime checkout comes from MEADOW_RUNTIME_DIR, or ../runtime beside
  this repository when that is not set, and must be at the commit and tree
  recorded in MONO_RUNTIME_COMMIT with no local changes.
  MEADOW_RUNTIME_ALLOW_UNPINNED=1 relaxes this for runtime development.
- The compiler must be arm-none-eabi-gcc 15, the same as the rest of the
  OS.  NuttX must be configured first.
- Release by default; --debug builds Debug, --clean starts again and
  --verbose shows the runtime build output.
- Output goes to monoruntime/<release|debug>/ (ignored by git), so several
  checkouts can build one runtime checkout without clashing.  A build stamp
  records the runtime commit and local changes, the compiler version and a
  hash of the NuttX configuration; when any of them changes the build
  directory is discarded and CMake configures again.
- The script checks that every archive the OS link needs was produced.

Move MONO_RUNTIME_COMMIT to WildernessLabs/runtime Phase1 (a76e66e60c1),
which builds cleanly against NuttX 12 with GCC 15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WildernessLabs/runtime#2 merged Phase1 into the runtime's MergeManagedCode
as c668e4a3aea; the tree is unchanged (5cf48371256).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NevynUK
NevynUK merged commit 50fa130 into MergeManagedCode Oct 14, 2026
2 checks passed
@NevynUK
NevynUK deleted the Phase1 branch October 14, 2026 14:35
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