CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Unidentified identifier in Watches tab (debugger)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Duane B
Guest







Unidentified identifier in Watches tab (debugger)
PostPosted: Sat Jul 19, 2003 8:43 pm     Reply with quote

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

View user's profile Send private message

Re: Unidentified identifier in Watches tab (debugger)
PostPosted: Sat Jul 19, 2003 10:36 pm     Reply with quote

<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)
PostPosted: Sat Jul 19, 2003 11:26 pm     Reply with quote

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

View user's profile Send private message

Re: Unidentified identifier in Watches tab (debugger)
PostPosted: Sun Jul 20, 2003 9:39 am     Reply with quote

:=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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group