Separate RP2040 implementation details into a separate module - #50
Draft
datdenkikniet wants to merge 1 commit into
Draft
Separate RP2040 implementation details into a separate module#50datdenkikniet wants to merge 1 commit into
RP2040 implementation details into a separate module#50datdenkikniet wants to merge 1 commit into
Conversation
datdenkikniet
commented
Oct 12, 2025
| /// (have the `PT_LOAD` type) and are non-empty. | ||
| pub fn loadable_nonempty(entries: &[Elf32PhEntry]) -> impl Iterator<Item = &Elf32PhEntry> { | ||
| entries.iter().filter(|e| { | ||
| let mapped_size = e.filez.min(e.memsz); |
Collaborator
Author
There was a problem hiding this comment.
Note: previously, this was closer to:
/* `mapped_size` */
e.typ == PT_LOAD && e.memsz > 0 && e.filesz.min(e.memsz) > 0
However, e.memsz > 0 && e.filesz.min(e.memsz) > 0 is the same operation as e.filesz.min(e.memsz) > 0, so we can get rid of an unnecessary check
datdenkikniet
force-pushed
the
isolate-rp2040
branch
3 times, most recently
from
October 12, 2025 20:43
4f5cc30 to
a1e9c92
Compare
datdenkikniet
force-pushed
the
isolate-rp2040
branch
from
October 13, 2025 19:22
a1e9c92 to
3d240e5
Compare
datdenkikniet
marked this pull request as draft
October 13, 2025 19:31
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.
Instead of having RP2040 implementation details scattered around the codebase, this PR aims to centralize all of its details into a single module file.
This way, it becomes more obvious what must be implemented for other targets, and implementing different targets will not greatly increase the complexity of the UF2 flashing and generation code.