Question
STM32CubuIDE and RT-Thread Local variables are optimized out
Dear experts
I use STM32CubeIDE to compile the RT Thread project. When the optimization level is selected as "Optimize", local variables will be optimized,
Only when "Optimize for debug" is selected, local variables will not be optimized and the program can run normally,
May I ask why this is happening and what should I do?
Using 'Optimize for debug' will result in losing a lot of flash



