We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
In the V5 to V6 compiler migration document is the following with respect to optimzations
-O0 No Optimization. Not recommended for use in ARM Compiler 6.6
-O1 Limited Optimization. This is currently the recommended level for source level debugging.
I would like to know why -O0 is not recommended. I find -O1 has optimizations which affect breakpoints and single-stepping through code in a sane manner.
I hadn't seen that. Thank you.
I find the note saying "The Arm Compiler 5 -O0 option is more similar to the Arm Compiler 6 -O1 option than the Arm Compiler 6 -O0 option." peculiar. It may be the most similar, but I find there to be optimizations enabled that are affecting debugging.
I do not expect the point where I set a breakpoint to be optimized away. This includes setting a breakpoint on a variable and on early returns within a function. Setting the optimization to -O0 makes things work how I expect.
If code size is not an issue and I want to prioritize debugging I shouldn't have to worry about why ARM recommends not using -O0.
I guess that -O0 is very unoptimized - but if it is suitable for your needs, then there is no issue in using it.