DSPRelated.com
Forums

VisualDSP++ 3.1 breakpoints

Started by albinofrosch January 21, 2004
Hello,

I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-BF532.
After setting a breakpoint its not possible to make a single step.
The emulator always goes to an interrupt function and not to the
expected instruction.
Is it possible to disable the interrupts in debugging mode?

Thanks in advance
Christoph



Hello,
At the most only one break point can be set.
Use run to cursor option to step thru(right click mouse,see for Run To Corsor option)
Actually when U r steeping thru pressing F9 button, the DSP get interrupt and execution goes to interrupt routine.
OR
place break point for each intruction and give run.

albinofrosch <a...@yahoo.com> wrote:
Hello,

I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-BF532.
After setting a breakpoint its not possible to make a single step.
The emulator always goes to an interrupt function and not to the
expected instruction.
Is it possible to disable the interrupts in debugging mode?

Thanks in advance
Christoph
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join: Send an email to a...@yahoogroups.com

To Post: Send an email to a...@yahoogroups.com

To Leave: Send an email to a...@yahoogroups.com

Archives: http://groups.yahoo.com/group/adsp

Other Groups: http://www.dsprelated.com/groups.php3Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/adsp/

To unsubscribe from this group, send an email to:
a...@yahoogroups.com



--On Wednesday, January 21, 2004 2:29 PM +0000 albinofrosch
<> wrote:

> I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-BF532.
> After setting a breakpoint its not possible to make a single step.
> The emulator always goes to an interrupt function and not to the
> expected instruction.
> Is it possible to disable the interrupts in debugging mode?

One of my long-standing pet peeves about the SHARC debugger. It always leaps
off into the timer ISR when I single step, so I have to turn that bit off in
IMASK if I want to single step, and turn it back on before I run again.

A similar problem is that single-stepping at a breakpoint doesn't move off of
the breakpoint. I don't know if this one is the case with the Blackfin, though.




On Wed, 21 Jan 2004, Kenneth Porter wrote:

> --On Wednesday, January 21, 2004 2:29 PM +0000 albinofrosch
> <> wrote:
>
> > I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-BF532.
> > After setting a breakpoint its not possible to make a single step.
> > The emulator always goes to an interrupt function and not to the
> > expected instruction.
> > Is it possible to disable the interrupts in debugging mode?
>
> One of my long-standing pet peeves about the SHARC debugger. It always leaps
> off into the timer ISR when I single step, so I have to turn that bit off in
> IMASK if I want to single step, and turn it back on before I run again.
>
> A similar problem is that single-stepping at a breakpoint doesn't move off of
> the breakpoint. I don't know if this one is the case with the Blackfin,
though.

It has to do with the processor and how it works as well as your reflex
timing versus the processors timing. when an interrupt occurs, it gets
latched, and the next possible cycle it gets executed. Since you halt the
processor with the debugger, the next possible cycle is your single step.
There's no way around it, you have to turn off interrupts (except the one
you want to debug) if you want to single step thru code.

One way to fix this is to use a command like IMASK=0; when you hit a
break. You can then have interrupts enabled, you halt and turn off
further interrupts, then before running again turn interrupts back on
with IMASK = ....

Patience, persistence, truth,
Dr. mike


I have seen BMD's for the Coldfire processor that manage to single step with an interrupt running.  It would seem to me that the solution for single stepping would be to automatically set a breakpoint at the next source line and run until there.  Not that difficult as that is what I wind up doing anyway.

At 11:05 AM 1/21/2004, Kenneth Porter wrote:
--On Wednesday, January 21, 2004 2:29 PM +0000 albinofrosch
<a...@yahoo.com> wrote:

> I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-BF532.
> After setting a breakpoint its not possible to make a single step.
> The emulator always goes to an interrupt function and not to the
> expected instruction.
> Is it possible to disable the interrupts in debugging mode?

One of my long-standing pet peeves about the SHARC debugger. It always leaps
off into the timer ISR when I single step, so I have to turn that bit off in
IMASK if I want to single step, and turn it back on before I run again.

A similar problem is that single-stepping at a breakpoint doesn't move off of
the breakpoint. I don't know if this one is the case with the Blackfin, though.

_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to a...@yahoogroups.com

To Post:  Send an email to a...@yahoogroups.com

To Leave: Send an email to a...@yahoogroups.com

Archives: http://groups.yahoo.com/group/adsp

Other Groups: http://www.dsprelated.com/groups.php3
 

--------------------------
Steve Holle
Link Communications, Inc.
1035 Cerise Road
Billings, Montana  59101-7378
406.245.5002
s...@link-comm.com
--------------------------



With the Sharc, I just leave the MODE1 window open, and then I can
quickly clear the INTEN bit. Can you do the same on the Blackfin?
--- In , Steve Holle <sholle@l...> wrote:
> I have seen BMD's for the Coldfire processor that manage to single
step
> with an interrupt running. It would seem to me that the solution
for
> single stepping would be to automatically set a breakpoint at the
next
> source line and run until there. Not that difficult as that is
what I wind
> up doing anyway.
>
> At 11:05 AM 1/21/2004, Kenneth Porter wrote:
> >--On Wednesday, January 21, 2004 2:29 PM +0000 albinofrosch
> ><albinofrosch@y...> wrote:
> >
> > > I use VisualDSP++ 3.1 with the Blackfin Apex ICE on an ADSP-
BF532.
> > > After setting a breakpoint its not possible to make a single
step.
> > > The emulator always goes to an interrupt function and not to the
> > > expected instruction.
> > > Is it possible to disable the interrupts in debugging mode?
> >
> >One of my long-standing pet peeves about the SHARC debugger. It
always leaps
> >off into the timer ISR when I single step, so I have to turn that
bit off in
> >IMASK if I want to single step, and turn it back on before I run
again.
> >
> >A similar problem is that single-stepping at a breakpoint doesn't
move off of
> >the breakpoint. I don't know if this one is the case with the
Blackfin,
> >though.
> >
> >_____________________________________
> >Note: If you do a simple "reply" with your email client, only the
author
> >of this message will receive your answer. You need to do a "reply
all" if
> >you want your answer to be distributed to the entire group.
> >
> >_____________________________________
> >About this discussion group:
> >
> >To Join: Send an email to
> >
> >To Post: Send an email to
> >
> >To Leave: Send an email to
> >
> >Archives: http://groups.yahoo.com/group/adsp
> >
> >Other Groups: http://www.dsprelated.com/groups.php3
> >
> >
> >
>
> --------------------------
> Steve Holle
> Link Communications, Inc.
> 1035 Cerise Road
> Billings, Montana 59101-7378
> 406.245.5002
> sholle@l...
> --------------------------




--- In , Steve Holle <sholle@l...> wrote:
> I have seen BMD's for the Coldfire processor that manage to single
step
> with an interrupt running. It would seem to me that the solution
for
> single stepping would be to automatically set a breakpoint at the
next
> source line and run until there. Not that difficult as that is
what I wind
> up doing anyway.
>

This would work in cases where code flow is linear. But figuring
out where to put the breakpoint(s?) might get tricky in cases like:

a) Any loop termination/continuation conditional.
b) A function call that may or may not be made (i.e., "if ( ( vfoo
&& foo() ) || ( vbar && bar () )" ).
c) A switch() statement with lots of case's.
d) Anything that might thrown a C++ exception.
e) Calling a function through function pointer variable or C++
virtual function call.

RUSS



At 11:40 AM 1/27/2004, russell_washington wrote:
--- In a...@yahoogroups.com, Steve Holle <sholle@l...> wrote:
> I have seen BMD's for the Coldfire processor that manage to single
step
> with an interrupt running.  It would seem to me that the solution
for
> single stepping would be to automatically set a breakpoint at the
next
> source line and run until there.  Not that difficult as that is
what I wind
> up doing anyway. This would work in cases where code flow is linear.  But figuring
out where to put the breakpoint(s?) might get tricky in cases like:

a) Any loop termination/continuation conditional.
b) A function call that may or may not be made (i.e., "if (  ( vfoo
&& foo() ) || ( vbar && bar () )" ).
c) A switch() statement with lots of case's.
d) Anything that might thrown a C++ exception.
e) Calling a function through function pointer variable or C++
virtual function call.

RUSS

Yah, that is a problem.  I wonder how Single Step does it?
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to a...@yahoogroups.com

To Post:  Send an email to a...@yahoogroups.com

To Leave: Send an email to a...@yahoogroups.com

Archives: http://groups.yahoo.com/group/adsp

Other Groups: http://www.dsprelated.com/groups.php3
 

--------------------------
Steve Holle
Link Communications, Inc.
1035 Cerise Road
Billings, Montana  59101-7378
406.245.5002
s...@link-comm.com
--------------------------



On Wed, 28 Jan 2004, Steve Holle wrote:

>
> Yah, that is a problem. I wonder how Single Step does it?

the JTAG sets a bit in the eumlation controller which forces single step
operation. This is fine when there are no interrupts. If you have
interrupts, and they are coming in at 1kHz rates but your reflexes are
in .1 Hz rates, you get a lot more interrupts latched than a single step
can respond to. The emulator itself is a higher priority interrupt than
reset (locations 0x20000->0x20003 are "reserved" in the 2106x processors,
it's basicly emulator interrupt space). So every step from the JTAG is an
interrupt. If you don't want to walk thru every interrupt in the system,
then set breaks for specific locations or memory access, then turn off
all interrupts, then single step the problem. It's not that hard, it's
part of the art of debugging.

Patience, persistence, truth,
Dr. mike