C code executing out of order
-Solved-
Thanks for the reply. That is the fix. Interesting that AC6 does not initially set that when the build type is set to Debug. The default is -Os.
For those who are new the settings can be found by a right click on the Project and selecting "Properties" in the pull down menu (Hot key short cut with the project highlighted Alt+Enter). Expand the "C/C++ Build" tree and select "Settings". Going to the right in the "Tool Settings" tab expand the "MCU GCC Compiler" tree and select "Optimization". going to the right find the "Optimization Level" and use the pull down arrow to select "Optimize for Debug (-Og)".