Repository navigation
builder: explain builds that do not fit in the board's memory - #260
Open
delilzagros wants to merge 1 commit into
Open
delilzagros wants to merge 1 commit into
delilzagros wants to merge 1 commit into
Conversation
When the selected features make the firmware too big, the build failed with only a linker error in the log (region `flash' overflowed by N bytes). After the build step, look for that error and append a plain message to the build log: how many bytes too large, and that deselecting features fixes it. Fixes ArduPilot#114
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.
Fixes #114 (also the report in #152).
When the selected features make the firmware too big for the board, the build currently fails with only a linker error buried in the log:
Users don't know what that means or that deselecting features fixes it.
What this does
After the build step, the builder scans the build log for GNU ld's
region ... overflowed by N byteserror. If it finds one, it appends a plain message at the end of the log, where users look first:'ram0'.Total Flash Used, so the progress updater still marks the build as FAILURE.The parsing is a small pure function (
memory_overflow_hint) so it can be tested without running a build.Testing
tests/builder/test_memory_overflow_hint.py(8 tests): successful build, unrelated compiler error, flash overflow with size, largest of several overflows, flash preferred over RAM, other region named, straight quotes, and a check that the hint never containsTotal Flash Used.pytest tests/builder: 11 passed.flake8 .: 0 errors.AI assistance
This PR was prepared with AI assistance (Claude): it read the builder and progress updater, wrote the change and the tests, and ran pytest and flake8. I reviewed the change before opening this PR and I'm responsible for it.