Skip to content

Phase 3: NuttX 12 fixes for the Meadow.OS glue - #3

Merged
NevynUK merged 3 commits into
MergeManagedCodefrom
Phase3
Oct 14, 2026
Merged

NevynUK merged 3 commits into
MergeManagedCodefrom
Phase3

Conversation

@NevynUK

@NevynUK NevynUK commented Oct 14, 2026

Copy link
Copy Markdown

Runtime changes needed by Meadow.OS phase 3 (WildernessLabs/Meadow.OS#696):

  • mono-filemap.c: drop the sdram_cache_track_fd hook. Meadow.OS now serves file mmap through CONFIG_FS_RAMMAP, and the hook no longer exists.
  • pal_io.c: under __NuttX__, SystemNative_Close calls nxsock_close_notify before close(). This replaces the firmware's --wrap close.
  • minipal/thread.h: under __NuttX__, do not cache the thread ID in _Thread_local. NuttX user space has no TLS, and __aeabi_read_tp exists only in the kernel.

Tested: Meadow.OS Phase3 built against this branch, flashed to a CCM, and booted. Device info and the boot log report OS and runtime 1.99.1.0.

🤖 Generated with Claude Code

NevynUK and others added 3 commits October 14, 2026 18:36
The NuttX 7 firmware tracked open assembly files so its mmap replacement
could cache them in SDRAM.  Meadow.OS on NuttX 12 serves file mmap with
CONFIG_FS_RAMMAP and no longer provides sdram_cache_track_fd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Call nxsock_close_notify before close() in SystemNative_Close.  This replaces
the firmware's --wrap close, which applied to the whole user image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NuttX user space has no TLS support: __aeabi_read_tp is only provided in the
kernel, so the _Thread_local cache in minipal_get_current_thread_id fails to
link in a protected build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NevynUK
NevynUK merged commit 520e78f into MergeManagedCode Oct 14, 2026
NevynUK added a commit to WildernessLabs/Meadow.OS that referenced this pull request Oct 14, 2026
WildernessLabs/runtime#3 adds the NuttX 12 fixes the phase 3 glue needs.

Co-Authored-By: Claude Opus 5.5 <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