Fix flash size regex and add RAM size regex#503
Merged
facchinm merged 2 commits intoarduino:masterfrom Mar 4, 2020
Merged
Conversation
This regex would only look at the .text section, but the .data section (initialization values for global variables) also takes up space in flash. The regex is changed to match both sections. arduino-builder will then add together the values and show the sum to the user (this summing seems to have been supported at least since the introduction of arduino-builder, see: arduino/arduino-builder@0802e27 The regex format is copied from the AVR core, which already did the same (though AVR also includes a .bootloader section, which is not relevant here it seems, any bootloader is included in .text). This also copies the start-of-line ^ anchor to the regex, making the matching more accurate.
This was previously omitted, causing arduino-builder to not report the amount of RAM used. This adds the regex, based on the regex used by AVR (omitting the .noinit section, which is not supported by the SAMD linker scripts).
|
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
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.
This fixes the size regex to include intitialized variables (
.datasection) and adds a data/RAM size regex, allowing the RAM usage to be displayed.