-
Notifications
You must be signed in to change notification settings - Fork 3k
Change default optimisation level to O1 when exporting to uVision #11212
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
Conversation
@chrissnow, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before I approve, I would like to make sure the other exporters are aligned or why they shouldn't !
I agree that it would be nice that they are all aligned,I think Os is used in some exports, O1 in others. Ideally the export should match debug profile which it now does? mbed-os/tools/profiles/debug.json Line 19 in 2e09a27
It would be possible to output uVision projects that include all 3 profiles as different project targets Or alternatively pass the profiles optimisation level to the exporter. Sadly both are a bit beyond the time I can commit to this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matching debug profile
I've checked IAR it's set to High balanced, but that shall be fixed separately
CI started |
How do exporters and profiles interact? Are the exporters supposed to export according to a specified profile, or create an export with all profiles? I think it's got to be one of the above, and either way, it would be preferable to pick the optimisation level up from the profile, just like the language selection. I was messing with that mapping in #11225; I'm not familiar with how all the plumbing hangs together, but presumably that concept could easily be copied over for the optimisation and debug options. |
My initial expectation were the same but I checked some and could not find optimization being exported. They contain "non valid flag" checks: IAR implementation:
uvision
This means exporters are using predefined optimization level in templates and even ignores some other flags as we can see.
Ideally yes (exporting profiles is not that simple but if we can use the profile then it would be as simple as export debug or export release. Having multiple profiles is supported by many tools, but might require bit more work to refactor templates). It might be worth creating a new ticket for this (to find out why there are these non valid options in each exporter). cc @ARMmbed/mbed-os-tools |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
I'll merge this as it aligns with the default profile and create a new issue for profiles not being exported |
created #11263 |
Description
When exporting to uVision the default level is O0 which is wasteful as dead code and variables are included. O1 removes this without causing debugging issues.
From
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472k/chr1359124221739.html
Fixes #11068
Pull request type
Reviewers
Release Notes
Default uVision optimisation level changed to O1. It matches the debug profile.