-
Notifications
You must be signed in to change notification settings - Fork 389
Avoid additional load seg inserted by espflash #4847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
What does this PR do in detail? Looks to me like we're abusing something in espflash that throws away a small section (likely incorrectly?) |
Well no - it avoids to enter some code in espflash that splits a load segment to make a following flash segment mapable: https://github.com/esp-rs/espflash/blob/5419c6c7ba12050b40585e35cd825b56291691a5/espflash/src/image_format/idf.rs#L491-L506 |
|
A good test for whether this code change is valid or not, might be to also test with esptool. It might indicate if we have flawed merging logic in espflash or if indeed the linkerscripts have an issue. |
| .text_gap (NOLOAD): { | ||
| . = . + 4; | ||
| . = ALIGN(4) + 0x20; | ||
| . = . + 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be + ALIGN(.text)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a gap >4 bytes to not let the tooling merge the segments - and (almost always) ALIGN(.text) is 4
at this point I should reveal I don't really know why this works fine 🙈
I had . = ALIGN(0x10000) + 0x20; initially - that makes totally sense to me,
8 is the len of the segment header but it doesn't make too make sense (but the previous version also didn't make a lot of sense)
Good idea - and it works for me e.g. |
|
/hil full |
|
Triggered full HIL run for #4847. Run: https://github.com/esp-rs/esp-hal/actions/runs/21364101861 Status update: HIL (full) run is still in progress or status unknown._ |
Currently on C6/H2 we see a "random" load segment when booting
With this change it looks like this