While debugging with Atollic's TrueSTUDIO IDE / SDK, variables are reported to contain unbelievable values. But, if the code is left to run, the code behaves as if the variable values are correct.
Why?
Up until now, I have been using TrueSTUDIO to debug my own code which is called from main(). Up until now the variables in my code have contained the expected values. Recently, I started to integrate my code with existing USB CDC code. It is in this new code the values, when inspected using TrueSTUDIO, contain unbelievable values. (To be clear, during the same debugging session, TrueSTUDIO reports variables in my code with expected values. However, TrueSTUDIO reports variables in the USB CDC code with unbelievable values.)
If this is not confusing enough. I switched from using TrueSTUDIO to STMStudio (which is a run-time variables monitoring and visualization tool for STM32 microcontrollers). Now when I inspect the variable in question, their values are as expected.
How can TrueSTUDIO fail & STMStudio work?
Is there a TrueSTUDIO setting I have missed?
-thanks