Tool/software: TI C/C++ Compiler
We are starting a new safety critical project. We want to set the optimization level now and freeze it for the duration of the project to avoid surprises down the road. In the past, I have used level 0, which gave me the most consistent behavior. However, I get a recommendation within code composer to set to level 3, which from my past experience can lead to unexpected behavior such as optimizing out global variables that may change via an interrupt.(Yes I know these should be declared volatile). We do not have any performance or code issues at the moment and so I prefer our debug capability to not be impacted too much. What optimization level do you recommend? Thanks.