Hello; I’d be gratefull for any advise on the following…
I’m new to VSC, PlatformIO, the ESP32 and proper debugging - other than VB in Excel. As such, I’m on a very steep curve that has me struggling at most stages.
The first query I have is; given that compiling can change the order of variables etc, is there a way that stops optimisation completely - so that program flow is WYSIWYG - as they used to say. I’d like to not have lines oddly jumped and to not see variables “optimized” so that I never get to know their value starring at me. I found a reference and plucked the line “-fno-toplevel-reorder” from it and it seems to improve things - but not completely. I’ve also tried -og, -g and a few others - but with even less success.
I’d also like to know how to put a watch on GPIO pin 26 for example and it would be great to have a row of pin state feedback. I could try to find a way of not losing variables to the optimisation process, but a Watch sounds much cleaner to me.