Hi all,
I'm having a very troubling problem when debugging with the new version of µvision (4.11) that I didn't have with the last I was on (it was 4.03 I think). When I debug code on various platforms (working on an STM32F103 and an NXPLPC1768, both CM3), I have a lot of variables that appears "Out of scope" in the watch window.
I'd like to add that I'm at optimization level 0, I tried default but it optimized more and I had even less variables visible, and that this problem did NOT happened with the previous version of the software.
Thank you in advance for you answers.
The optimizer removed the variable bar since you do not do anything with it. It is initialized but left unused, so all code related to the variable is removed.
You can either
volatile unsigned char bar;
Reza_ab said:the variable bar
I see no such variable in any of the nine-year-old posts.
Reza_ab said:stops the compiler from optimizing
Not entirely true - it prevents certain optimisations.
That makes sense. Thanks for a practical solution!