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

Error 34

I have a compiled key scan program I wrote using the latest full version of C51. I went to the debugger (added my variables to watch window 1) and ran the code successfully. I returned to uVisionII. After looking the code over (no changes) I returned back to the debugger for a more thorough test of the code. Now debug refuses to accept some of the variables it previously accepted. I get an error 34 'undefined identifier' any time I try to add (specific variables) to the watch window.

I'm using XP Pro.

Is this a bug or what?

Please help
Brian

  • Hello Brian,
    Not that I'm an expert, but the problem is most probably that the variables are local.
    Try making them global, I think that you can then add them to the watch windows 1 or 2. Of course you can view them without adding them in the local watch window.

    Hope this helps somewhat

    Regards
    John

  • Thanks for the reply. How can I view the variables without adding them to the Watch Window? If I Hover over the (problem) variables they never popup a value. All the other variables show there values. The problematic variables are all local to a function (unsigned char's). I did notice that the value popup started working once. I was then able to add them to the Watch. I don't know what caused the change, from not working to working. I do know I can't seam to repeat this so I can continue on debugging. Both times I was able to debug, the problem came back after returning from uVisionII.

    Thanks
    Brian

  • If you want to view the values of local variables (automatics and function arguments), you must step into that function.

    Local variables are out of scope and are undefined until that function is executing.

    There is a Locals Tab in the Watch Window. It shows the values of all local variables in a function.

    If you add local variables to a watch window, uVision (be default) attempts to restore those watch points when you re-enter the debugger. However, if those variables are local, you will receive the error that you do.

    Jon