My main() function ends with this loop:
In debug builds, with optimization off, it gets compiled to these two instructions.
Good! It's jumping back to the idle instruction, looping forever--just what I want.
FF2F JUMP.S -2
But in release builds, with optimizing on, it gets compiled to these two instructions.
Bad! It runs idle once and then loops forever by jumping to the jump.
0020 JUMP.S 0
Even when I replace the "idle" function call with this, it get's optimized.
I can't find a way to apply the "volatile" keyword. And "#pragma optimize_off" is ignored.
How, oh how, can I keep the IDLE instruction in the loop??