Repository navigation
Phase 4: first Mono boot - Hello World on CCM (JIT and interpreter) - #697
Merged
Merged
Conversation
meadow_mono_main ignored the options hcom builds from meadow.config.yaml (MonoControl: Options), so --interp, --debug and the others had no effect. monovm_execute_assembly puts the entry assembly first on the mono_main() command line, where runtime options are no longer read, so join the options into MONO_ENV_OPTIONS, which mono_main() reads first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Turn on CONFIG_HCOM_MONO_STDERR_STDOUT so the Mono app's stdout and stderr reach the host (meadow listen), and fix two faults in hcom_stdxxx_redirect.c that had not been exercised under NuttX 12: - The readers opened the FIFOs O_RDONLY. NuttX reports POLLHUP on every poll of an empty FIFO with no writer, so while Mono was not running the read loop spun and starved hcom (the CLI could not connect). Open them O_RDWR so the reader also counts as a writer. - hcom_mono_open_mono_fifo() ignored its fd argument and dup2'd both FIFOs onto STDOUT_FILENO, so stdout reached the host labelled stderr and stderr was lost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WildernessLabs/runtime#4: the NuttX 12 stack bounds and the Thumb-2 code buffer alignment. To be moved to the MergeManagedCode merge commit once that pull request is merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WildernessLabs/runtime#4 is merged; the tree is the same as the Phase4 commit pinned before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WildernessLabs/runtime#5: the 32-bit Thumb-2 LDR/STR encoding for negative offsets, which fixes the interpreter (--interp) crash. To be moved to the MergeManagedCode merge commit once that pull request is merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WildernessLabs/runtime#5 is merged; the tree is the same as the Phase4b commit pinned before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First part of Phase 4: Mono now starts on the board and runs a managed Hello World, and its output reaches
meadow listen; GC stress passes under both the JIT and the interpreter. Blinky is still to do.Changes
meadow_mono_mainused to ignore the options that hcom builds frommeadow.config.yaml, and Legacy ignores them too. They now go intoMONO_ENV_OPTIONS. They can't be passed as arguments, becausemonovm_execute_assemblyputs the assembly first andmono_main()stops reading runtime options there. Tested with--interpand--debug.CONFIG_HCOM_MONO_STDERR_STDOUT=y, plus two fixes inhcom_stdxxx_redirect.c:O_RDONLY, and NuttX reports POLLHUP on an empty FIFO with no writer. While Mono wasn't running, the read loop spun and starved hcom, so the CLI couldn't connect. They are now openedO_RDWR.hcom_mono_open_mono_fifo()dup2'd both FIFOs onto fd 1, so stdout arrived labelled stderr and stderr was lost. Legacy has the same bug.--interp). Its tree is the same as the Phase4b head that was tested.Testing (CCM, 1.99.1.7)
/meadow0:build.sh -subset mono.corelib -arch arm -os linux -c Release /p:FeaturePerfTracing=false)meadow_assembliespackageMeadow.dllmono_exec returned: ret=0x00000000 exit_code=42under the JIT (about 5.8 s), the JIT with--debug, and--interp(about 3.5 s). A breakpoint confirmed that--interpreally uses the interpreter.meadow listenoutput:stdout> Hello from Meadow!,stderr> Hello from Meadow on stderr, andstdout> mono_mbedtls_init: OK.--debug: 30/30 tests pass, 121 s.--interp: 30/30 tests pass, 229 s. Before runtime#5, the board locked up with SP = 0 in the first test.🤖 Generated with Claude Code