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.
Hi. Can you tell me which level of optimalization I have to choose i Keil ARM? I'm working whith STM32F103. In WinAVR I allways had -Os (speed) but what i Keil ARM?
Maybe I want large code? Maybe I want inlined code? Maybe I want loop unrolling? Maybe speed is king?
Every single project is different.
And the requirement may not even be the same for all parts of a big project - some critical loops and ISR may be extremely time-critical, while there is a menu backend that does not have any timing requirements at all. Just a need to be as small as possible.
Next thing is that the same optimization level will give different results for different language constructs.
There are really two situations can can face: - you have a specific need. You find that a specific optimization setting best matches that need. - you are neither in need of speed or size and find yourself in a situation where it really doesn't matter what setting you go for.
If you could live with -Os before to just optimize for size, that would indicate that you really did not have much specific requirements. You could just select one of the settings and it would be good enough.