-
-
Notifications
You must be signed in to change notification settings - Fork 398
Recipes for configuring size / memory usage #480
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
Comments
I love the idea! It could be included in next |
@facchinm - Any chance I could talk you into adding a raw unfiltered size recipe? If a platform defines "recipe.rawsize.pattern", just run the program and use whatever it prints to stdout as-is. No regex matching, no size checks, just copy its message to the output for a user to see. And of course if the command returns a non-zero status, consider than a fail as if the normal size check fails. I tried to accomplish this is a postbuild hook.
But the problem is the user never sees this message in non-verbose mode. For now, I really need a way to show more detailed size info than the 2 regex approach can handle. I really don't want to add yet another patch to the Java IDE, but I just don't see a way to replace the size process that works in all modes. |
@PaulStoffregen I've drafted an implementation, let me polish it a bit so I can open a PR and we'll further discuss it there. |
Please consider making the memory usage summary more configurable with recipes in platform.txt.
Currently arduino-builder assumes there can be only 2 memory regions. The 2 names are hard-coded. The 2 maximum sizes come from prefs in boards.txt.
Some hardware has 3 or more distinct memory regions. I am current struggling with this problem with the latest Teensy board, where combining 2 regions together to fit into a single line causes a lot of user confusion when they try to use memory that Arduino's size summary leads them to believe should be available, but actually isn't... but appears to be free, because of the necessity of shoehorning multiple regions into builder's limited size summary.
Hopefully arduino-builder could someday recognize a group of rules like this:
This should cause builder to print line of text like this:
Or if a 4th rule gives a name for the use of leftover space...
Hopefully this 4 rule case could cause line like this to print:
Alternately, if this is too much trouble, perhaps a rule could be added to simply run a program which will generate the size summery and builder would skip printing its limited-to-2 regions summary?
The text was updated successfully, but these errors were encountered: