I am having issues modifying/viewing all variables currently in scope while running the debugger. The debugger shows 'unknown error' for certain variables that are currently in scope.
uint32 GetFractionalMultiplier(uint32 data)
int32 tempFraction = 0;
uint32 fractionalMultiplier = 1;
uint32 orderOfMagnitude = 1;
tempFraction = GET_FRACTIONAL_PART(data);
orderOfMagnitude = 1;
while (0 != tempFraction)
tempFraction = (tempFraction / 10);
orderOfMagnitude = (orderOfMagnitude * 10);
fractionalMultiplier = (FLOAT_MULTIPLIER / orderOfMagnitude);
At all points while stepping through this function, orderOfMagnitude shows `unknown error X100428X` where X is some strange character that I don't know how to type. The address is also blank.
If I use the View -> Registers tool while stepping through the function, I can see D2 getting set to 0x0000001 just prior to the while loop, and guess that is where the processor is setting orderOfMagnitude. To confirm this, I set D2 to 0 after the while loop and got a divide by zero exception. But why should I have to guess which register is being used in order to modify the value?
Debugging an MCF52211, 16K version.