fix(nrf54l15): give the LittleFS File shim the readBytes() Stream API - #11638
Draft
cvaldess wants to merge 1 commit into
Draft
fix(nrf54l15): give the LittleFS File shim the readBytes() Stream API#11638cvaldess wants to merge 1 commit into
cvaldess wants to merge 1 commit into
Conversation
WaypointStore::loadFromFlash() (added in meshtastic#10920) reads its header and records through File::readBytes(), which the Zephyr-backed shim never implemented, so nrf54l15dk stopped compiling. Add it on top of the existing read(), looping until fs_read() stops making progress: a short read is legal and the callers treat a byte count below the requested size as end-of-file.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
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.
nrf54l15dkdoes not build on currentdevelop.#10920 added
WaypointStore::loadFromFlash(), which reads the store header and each record throughFile::readBytes()(src/WaypointStore.cpp, lines 313-314 and 326). On nRF54L15,Fileis the Zephyr/LittleFS-backed shim insrc/platform/nrf54l15/InternalFileSystem.h— a plain class rather than an ArduinoStreamsubclass — and it never implemented that method, so the build stops with:This adds
readBytes()on top of the shim's existingread(), looping untilfs_read()stops making progress. A short read is legal there, and the caller already treats a count below the requested size as end-of-file, so returning the number of bytes actually delivered matches what the ArduinoStreamversion does.Verified:
pio run -e nrf54l15dkgoes from FAILED to SUCCESS (RAM 46.8%, flash 36.8%). The change is confined to the nRF54L15 platform shim, so no other target is affected.