View previous topic :: View next topic |
Author |
Message |
Duane B Guest
|
Unidentified identifier in Watches tab (debugger) |
Posted: Sat Jul 19, 2003 8:43 pm |
|
|
Hello fellow Picsters,
What does one have to do to add a variable expression to the 'Watch' tab of the debugger using the ICD-U40? Here in my code:
#include <16f877.h>
#device *=16 ICD=TRUE
#use delay (clock=4000000)
void main()
{
byte q = 0;
while (1)
{
q++;
delay_ms(1000);
}
}
When I click the '+' in the Watch tab and enter 'q' as the expression to watch, I get this:
ERROR #12: Unidentified identifier
Any suggestions as to what I'm doing wrong?
Thanks,
Duane
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516188 |
|
|
john cutler
Joined: 06 Sep 2003 Posts: 82 Location: Hot Tub, California
|
Re: Unidentified identifier in Watches tab (debugger) |
Posted: Sat Jul 19, 2003 10:36 pm |
|
|
<font face="Courier New" size=-1>I just experimented with this, and before I run my target program, I get that error for all non global variables. After I run the program and hit "stop" from the debugger (or a breakpoint) the error message disappears and the proper value
is in the watch.
I didn't run your program, however.
Hope that's somewhat helpful.
JC</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516189 |
|
|
Duane B Guest
|
Re: Unidentified identifier in Watches tab (debugger) |
Posted: Sat Jul 19, 2003 11:26 pm |
|
|
Well, that seemed to be the problem.
Thanks,
Duane
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516190 |
|
|
john cutler
Joined: 06 Sep 2003 Posts: 82 Location: Hot Tub, California
|
Re: Unidentified identifier in Watches tab (debugger) |
Posted: Sun Jul 20, 2003 9:39 am |
|
|
:=Well, that seemed to be the problem.
:=
:=Thanks,
:=Duane
I guess, if one thinks about it, it makes sense. The non-global variables have not yet been assigned memory locations because they haven't been created yet, so how could the debugger know about them?
JC
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516197 |
|
|
|