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

uVision2 debugger

In A51 the next definitions takes two cells of RAM, (0AH), for example, and (0BH):

data_variable: DS 1
typeless_number EQU 0BH

and can be treated with the same instruction:

MOV A,data_variable (F50A)
MOV A,typeless_number (F50B)

,but there is the value of "data_variable" displays properly in the "Watch" window,
"typeless_number" shows it's address instead
of the value.

How can I trace such a variable?

Parents
  • -Thanks alot, for a patience for silly questions :)!
    -I'm sorry for the incorrect formulation.
    Of corse, the first case is a "pure" variable, the second, -is a constant to refer to as an address, for example.
    But anyway, how it could be done, to see a random SFR using it's address?
    When I've typed following: ( WS 1, 0x0B ), in watch window appears name: 0x0B with the value: (0x000C)

Reply
  • -Thanks alot, for a patience for silly questions :)!
    -I'm sorry for the incorrect formulation.
    Of corse, the first case is a "pure" variable, the second, -is a constant to refer to as an address, for example.
    But anyway, how it could be done, to see a random SFR using it's address?
    When I've typed following: ( WS 1, 0x0B ), in watch window appears name: 0x0B with the value: (0x000C)

Children
  • to see a random SFR using it's address?

    Ah, but that's quite a completely different question! And the answer to this one is, I think, that you can't, because there is no such thing as a random SFR in the 8051 architecture to start with. SFR are direct addressing only, i.e. there's no such thing as a "pointer to an SFR" that you could dereference to access it. In a sense, 8051 SFRs don't have addresses.

    If your program uses a given SFR, it has to be accessing by name, in the source. So you should access it by name in the debugger, too.

  • -Thank You so much!, but, still confused I've to ask, is it possible to display the "ram dump" in uVision3 debugger. What a mechanism can allow to trace changes in data memory caused by a program using addresation through "a constant as an address"

  • -Wow, I did find it! -It's just a matter of
    overriding the "memory" window from default
    "code" to the wanted.

  • "is it possible to display the 'ram dump' in uVision3 debugger."

    Of course it is - That is precisely what the Memory windows does!

    You can also set a Watch on a specific address.

    uVision3 and uVision2 - makes no difference.

    As has already been said to you, you need to go back to basics and do some serious study of the Manuals - at the moment, you are just thrashing around like a non-swimmer in deep water!

    Specifically for this question, You need to read the uVision Getting Started Guide.

    I suggest that you lay your project aside for now, read the uVision Getting Started Guide and work through the example projects in it.

    This will give you a proper introduction to the tools, how they work, and how to use them - rather than just jumping-in blindly at the deep end.

    Once you've done that, you will be better equipped to proceed with your project.

    (The uVision Getting Started Guide is available on the 'Books' tab in the 'Project' Window; The 'Books' window is also available via the 'Help' menu; failing all that, search for GS51.PDF in your Keil folder)

  • Thank You Mr.Nail, I absolutely agreed,
    all the proceeding must be consequent.