Continuing to lean on ATmega4809 Xplained Pro. But, now I have a problem.
I have a function (a TWI function) that returns a status value. My program, at this point, is very small and very primitive, and I have no place to write it for observation. As a result, that return value is optimized away, and invisible to the operator (e.g. me).
Is there something that I can do other than change the optimization level that will force it to be not optimized away? Maybe make the return assignment variable volatile? Or, write to some innocent hardware register, like an SPI data register? Anything else that makes sense?