Skip to content

Fix flash size regex and add RAM size regex #503

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

Merged
merged 2 commits into from
Mar 4, 2020

Conversation

matthijskooijman
Copy link
Collaborator

This fixes the size regex to include intitialized variables (.data section) and adds a data/RAM size regex, allowing the RAM usage to be displayed.

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).
@ArduinoBot
Copy link

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/samd/package_samd-b207_index.json

ℹ️ To test this build:

  1. Open the Preferences of the Arduino IDE.
  2. Add the Build URL above in the Additional Boards Manager URLs field, and click OK.
  3. Open the Boards Manager (menu Tools->Board->Board Manager...)
  4. Install Arduino SAMD core - Pull Request Fix flash size regex and add RAM size regex #503
  5. Select one of the boards under SAMD Pull Request Fix flash size regex and add RAM size regex #503 in Tools->Board menu
  6. Compile/Upload as usual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants