This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Variable value not showing up in Watch (uVision)

Hi guys,

I'm new to Keil uVision so go easy on me!

I'm having a very simple problem: I'm trying to see the value of a variable in Watch but it does not show up. The variable is named "angle" and is declared as a 32-bit fp pointer like so:

void MPU6050_RD_DMPDate()
{ ... f32 *angle; ... angle = imu_get_ang(); ...
}

MPU6050_RD_DMPDate() is called from main and imu_get_ang() returns a 32-bit fp pointer as required.

My understanding is that the Watch window is for local variables like the one declared above so should show up fine. Am I wrong about this? Is there a reason why it's not showing up?

Cheers,
Tony

  • "I'm new to Keil uVision"

    Do you have experience with other (embedded) IDEs?

    Note the instructions for posting source code: www.danlhenry.com/.../keil_code.png

    "My understanding is that the Watch window is for local variables"

    Not just locals - any variables. But they must be in scope.

    When you say the value, "does not show up" - what does that actually mean? Please clarify.

    And is it the value of the pointer itself you're looking for, or the value that the pointer points to?

    Could it be that the value has just been optimised-out?