Embedded C avoid optimization when copy global variable to stack variable in critical section I am working on the RTOS support in our SW components.