Repository navigation
Add .uninit (NOLOAD) section to tb-app.x for defmt-rtt compatibility - #16
Merged
Merged
Conversation
Collaborator
Author
|
For reference, |
Collaborator
Author
|
Related PR on We can revert this if/when |
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.
Problem
defmt-rttplaces its buffer in.uninit.*sections and expects them to beNOLOAD(not included in the flash image).qingke-rt'slink.xdoesn't define a.uninitsection, so the linker falls back to placing these symbols in a default loadable section with aRAM VMA (0x20000000+).When
wlinksees a loadable segment at a RAM address, it interprets the VMA as a flash offset and attempts to produce a binary spanning from0x00000000to0x20000xxx. This results in a ~500MB output that fails to flash.Fix
Define an explicit
.uninit (NOLOAD)section in tb-app.x placed in RAM after.bss. The NOLOAD attribute tells the linker not to generate a load segment, sowlinkonly sees the actual flash content.