Searching \ for 'Q: ICD questions' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devprogs.htm?key=icd
Search entire site for: 'Q: ICD questions'.

Truncated match.
PICList Thread
'Q: ICD questions'
2000\04\25@190947 by Quitt, Walter

flavicon
face
Now the fun begins.

I've created a multifile project and am running it (currently)
on the ICD demo target.  My target code is for the 877 and I have
an 11.0592 Mhz oscilator module installed on the ICD demo target.
It's all written as relocatable code and seems to run just fine
and as expected.  ISRs, PAGESELs, BANKSEL, returns and all that
cool stuff we've been discussing lately.  I'm happy with the
execution of my code.  Happy as a fly in ....

Now though I have a couple of questions:
F8 the StepOver command doesn't seem to work on call statements.
If I set a breakpoint on a call, I end up on the first line of code
of the called subroutine.  I can F7 Step just fine.
What's up with this????

-Walt...

2000\04\25@210735 by Robert Wuest

flavicon
face
"Quitt, Walter" wrote:
>
> Now the fun begins.
>
> I've created a multifile project and am running it (currently)
> on the ICD demo target.  My target code is for the 877 and I have
> an 11.0592 Mhz oscilator module installed on the ICD demo target.
> It's all written as relocatable code and seems to run just fine
> and as expected.  ISRs, PAGESELs, BANKSEL, returns and all that
> cool stuff we've been discussing lately.  I'm happy with the
> execution of my code.  Happy as a fly in ....
>
> Now though I have a couple of questions:
> F8 the StepOver command doesn't seem to work on call statements.
> If I set a breakpoint on a call, I end up on the first line of code
> of the called subroutine.  I can F7 Step just fine.
> What's up with this????
>
> -Walt...

I see the same thing.  It does it to c source that way, too.  Always
stops after the statement  where you set your breakpoint.  And it is not
always easy to set the breakpoint to the line before the one you want to
stop on.  Mplab is broken.  Sort of an "off by one" bug.

Ooooh, for a decent in circuit PIC debugger (with a call stack
display)....

--
Robert Wuest, PE
Sirius Engineering Company

2000\04\26@113718 by Kbek Tony

flavicon
face
>Now the fun begins.

Sure does :-)

>I've created a multifile project and am running it (currently)
>on the ICD demo target.  My target code is for the 877 and I have
>an 11.0592 Mhz oscilator module installed on the ICD demo target.
>It's all written as relocatable code and seems to run just fine
>and as expected.  ISRs, PAGESELs, BANKSEL, returns and all that
>cool stuff we've been discussing lately.  I'm happy with the
>execution of my code.  Happy as a fly in ....

Would You be willing to share some pointers to the one's like
me that are still left in the dark ( at least greyish ).
I havent actually read the portion of the relocatable code
in the user manual, then again never was bitten by the PCLATH before.
So what advantages are there ? ( page boundary ? )
Any disadvantages ? ( more code, messy code ?)


>Now though I have a couple of questions:
>F8 the StepOver command doesn't seem to work on call statements.
>If I set a breakpoint on a call, I end up on the first line of code
>of the called subroutine.  I can F7 Step just fine.
>What's up with this????

My guess it's a Mchip 'feature',
But actually that first line of the called routine isn't
actually executed yet right ? so in essence you are at the call
statement. ( I think )


/Tony


Tony KŸbek, Flintab AB            
ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓ
E-mail: spam_OUTtony.kubekTakeThisOuTspamflintab.com
ÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓÓ

2000\04\26@121916 by Quitt, Walter

flavicon
face
This message has been answered privately.
If ya really don't understand this relocatable
stuff AFTER READING ABOUT IT IN THE MicroChip
MANUALS, then ask.

TTFN,
Walt...

{Original Message removed}

2000\04\26@132816 by Michael Rigby-Jones

flavicon
face
part 0 3786 bytes
<P><FONT SIZE=2 FACE="Arial">&gt;Now the fun begins.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Sure does :-)</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">&gt;I've created a multifile project and am running it (currently)</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;on the ICD demo target.&nbsp; My target code is for the 877 and I have</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;an 11.0592 Mhz oscilator module installed on the ICD demo target.</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;It's all written as relocatable code and seems to run just fine</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;and as expected.&nbsp; ISRs, PAGESELs, BANKSEL, returns and all that</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;cool stuff we've been discussing lately.&nbsp; I'm happy with the</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;execution of my code.&nbsp; Happy as a fly in ....</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Would You be willing to share some pointers to the one's like</FONT>
<BR><FONT SIZE=2 FACE="Arial">me that are still left in the dark ( at least greyish ).</FONT>
<BR><FONT SIZE=2 FACE="Arial">I havent actually read the portion of the relocatable code</FONT>
<BR><FONT SIZE=2 FACE="Arial">in the user manual, then again never was bitten by the PCLATH before.</FONT>
<BR><FONT SIZE=2 FACE="Arial">So what advantages are there ? ( page boundary ? )</FONT>
<BR><FONT SIZE=2 FACE="Arial">Any disadvantages ? ( more code, messy code ?)</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">&gt;Now though I have a couple of questions:</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;F8 the StepOver command doesn't seem to work on call statements.</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;If I set a breakpoint on a call, I end up on the first line of code</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;of the called subroutine.&nbsp; I can F7 Step just fine.</FONT>
<BR><FONT SIZE=2 FACE="Arial">&gt;What's up with this????</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">My guess it's a Mchip 'feature',</FONT>
<BR><FONT SIZE=2 FACE="Arial">But actually that first line of the called routine isn't</FONT>
<BR><FONT SIZE=2 FACE="Arial">actually executed yet right ? so in essence you are at the call</FONT>
<BR><FONT SIZE=2 FACE="Arial">statement. ( I think )</FONT>
</P>
</UL>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">It's the same problem that you get with the simulator and with many ICE's.&nbsp; The PIC uses a pipeline so one instruction is being fetched while one is executed.&nbsp; When you set a breakpoint, because of this pipeline, the instruction imeadiately following the breakpoint get's fetched ready for execution and forces you to jump into the subroutine (or something like that).&nbsp; Easiest way around this is to put a nop before the call to the sub, and set the breakpoint on the nop.</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Mike</FONT>
</P>

</BODY>
</HTML>
</x-html>

2000\04\26@135727 by Jerry Merrill

flavicon
face
<x-flowed> >F8 the StepOver command doesn't seem to work on call statements.  >If I
set a breakpoint on a call, I end up on the first line of code  >of the
called subroutine.  I can F7 Step just fine.  >What's up with this????

>My guess it's a Mchip 'feature',  But actually that first line of the
>called routine isn't  actually executed yet right ? so in essence you are
>at the call  statement. ( I think )
You are being bitten by 'breakpoint skidding'.  Most PIC ICEs skid on
breakpoints, causing this confusion and making debugging more
difficult.  You will see the same problem if you set a breakpoint on ANY
instruction that modifies the program flow.  Ideally, you would like to
break BEFORE executing the line you set the breakpoint on.  I *THINK* our
ICE is the only one that does not skid (please correct me if anyone knows
of others).

It is easier to live with skidding if you avoid setting breakpoints on
lines that affect the PC (goto/jmp, call, retlw, movw PC...).

Jerry Merrill

.....jerrymKILLspamspam@spam@tech-tools.com
http://www.tech-tools.com
FAX: (972) 494-5814
VOICE:(972) 272-9392
TechTools
PO Box 462101
Garland,  TX  75046-2101

</x-flowed>

2000\04\26@142636 by Quitt, Walter

flavicon
face
My MPLAB ICE 2000 does NOT "skid."
That's at 28+ MHz too.
I recall my ICEPIC may not have had that issue either.

But my question is: about F8 SkipOver.  It doesn't skip.
Is F8 Skipping not available with the ICD or what?

My emulators skip just fine.  I just don't have an F877 pod
for those (yet.)

The breakpoint skidding I can sorta forgive.  Seen that before
on much more expensive (read HP and Tektronix) emulators.

But what's the deal with F8 and the ICD?

-W

{Original Message removed}

2000\04\26@152049 by jamesnewton

face picon face
If the '8xx chips can be made to single step (as the ICD does)
and the value of the PC is known after the step
and the value of the PC can be changed after the step

then:
An ICD designer should be able to

setup for single step
point the PC to a RET instruction
step
record the new PC value as the first entry on the stack

repeat this 8 times. Now you know the contents of the stack.

---
James Newton (PICList Admin #3)
jamesnewtonspamKILLspampiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...