feat(nrf52): virtual filesystem mount points + XModem path routing#10141
Draft
benallfree wants to merge 6 commits intomeshtastic:developfrom
Draft
feat(nrf52): virtual filesystem mount points + XModem path routing#10141benallfree wants to merge 6 commits intomeshtastic:developfrom
benallfree wants to merge 6 commits intomeshtastic:developfrom
Conversation
FILE_O_WRITE on nRF52 (Adafruit LittleFS) appends to existing files rather than truncating. Remove the file before opening for write so repeated XModem uploads always produce the correct file size. Made-with: Cursor
…ending to existing files
1 task
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.
This PR stacks on #10139 by introducing the beginnings of a virtual filesystem. I show how to use it via the XModem module, where I happen to need the feature. This allows callers to address storage by mount point rather than by direct FS reference.
Co-author: @GoatsAndMonkeys
Prerequisites
Motivation
Meshtastic currently has one filesystem (
FSCom) mapped to internal flash. With external flash now optionally mountable from #10139, it would help if there were a way to address it from a single API.I'm thinking about these:
/__int__/foo/__ext__/fooextFSif mounted, else internal)/__sd__/foo/fooThe double-underscore delimiters minimize collision risk with real file paths.
New public API:
On platforms without external flash (ESP32, RP2040, STM32WL), all mount variants resolve to FSCom with the prefix stripped — identical behavior to today, zero breaking changes.
🤝 Attestations