-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Optimize for Debugging compiles with -0s
#230
Comments
Hi @zfields. The A |
Yes, I do have an external debugger, and a semi-urgent need to debug. As a workaround, is there a way I can manually update the settings file, so that I can enable debugging and move forward? |
Thanks for getting this fix in! How do I get access to the fix? Is there a new version of the Renesas core I need to download, or do I need to pull the nightly build of the IDE v2.0 to get this update? |
I've updated my file locally, so there is no urgency, but I'd love a more formal solution. |
You'll get a new version for downloading and installing both via IDE and arduino-cli core update-index
arduino-cli core upgrade arduino:renesas_uno If/when a new core is going to be published is a question I can not answer as its subject to many internal considerations and dependencies - sorry. |
Thank you for providing those resources and your candor. |
Describe the problem
When I select "Optimize for Debugging" in the "Sketch" menu, it introduces the
-g3
flag, which is great, but it also leaves-Os
(optimize for size).Normally debug binaries are compiled with
-O0
or-Og
, to prevent variables or instructions from being optimized away. This allows the executed instructions to resemble the code as much as possible and facilitates debugging.To reproduce
Compile the
Blink
sketch with "Optimize for Debug" selected.Expected behavior
I would expect to see
-O0
or-Og
used to compile the program.Arduino IDE version
Version: 2.2.1 Date: 2023-08-31T14:16:33.536Z CLI Version: 0.34.0 Copyright © 2024 Arduino SA
Operating system
Linux
Operating system version
Ubuntu
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: