Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

newbie question--debugging from flash

newbie question--debugging from flash

2005-02-23 by c_hall2001

Is there anyway to debug from flash using gnu (free) tools and the 
wiggler?  I'm new to the ARM and GNU tools but my fog is slowly 
starting to lift.  Also, the wiggler seems quite unstable--lots of 
errors while trying to connect.  It eventually works after a few 
tries at low speed (8) but doesn't give me much confidence.  Is 
there another low cost JTAG solution for the ARM?  Are there any 
good app notes that walk through a debugging session with 
GNU+ARM+wiggler for us rather slow newbies?

TIA

Chris

Re: [lpc2000] newbie question--debugging from flash

2005-02-23 by Bruce Paterson

c_hall2001 wrote:
> 
> Is there anyway to debug from flash using gnu (free) tools and the 
> wiggler?  I'm new to the ARM and GNU tools but my fog is slowly 
> starting to lift.  Also, the wiggler seems quite unstable--lots of 
> errors while trying to connect.  It eventually works after a few 
> tries at low speed (8) but doesn't give me much confidence.  Is 
> there another low cost JTAG solution for the ARM?  Are there any 
> good app notes that walk through a debugging session with 
> GNU+ARM+wiggler for us rather slow newbies?

I'm using the Chamaleon Pod which pretends to be a Macraigor Raven. This 
works well with ocdremote and ocd commander. I can't go faster than 
speed 6, but seems quite stable.

The main diadavantage I find with using Insight (gui based gdb) and 
debugging from flash is the lack of proper hardware breakpoint support.
Debugging this way is really pretty crappy (using gdp console to put in 
hardware breakpoints by hand), and for that reason alone I might have to 
recommend buying a debugger. A pity really.
Has Insight any near term prospects of being able to support hardware 
breakpoints from the gui ?


-- 
Cheers,
Bruce

     /\\\/\\\/\\\    /   /      Bruce Paterson
    /  \\\ \\\ \\\  /   /    Senior Design Engineer
   /   /\\\/\\\/\\\/   /   8 Anzed Court, Mulgrave, Vic, 3170
  /   /  \\\ \\\ \\\  /  PO Box 4112, Mulgrave, Vic, 3170, Australia
/   /    \\\/\\\ \\\/   Ph: +61 3 8561 4232   Fax: +61 3 9560 9055
       Tele-IP Ltd.      Email: bruce@...    Icq: #32015991
                         WWW:   http://www.tele-ip.com       VK3TJN
-------------------------------------------------------------------

Re: [lpc2000] newbie question--debugging from flash

2005-02-23 by Aalt Lokhorst

Hello Chris,

Yesterday I build a JTAG Wiggler according to the schematic diagram from 
Leon. (inclusive the strap between DB25_pin8 and DB25_pin15)
I also had some problems to connect at speed-1 until I found some 
information at:

   http://www.mikrocontroller.net/forum/read-2-135959.html

I found a 'workaround' to get a speed=1 connection. Strange enough you 
need to do dummy connect to a RAVEN device first. This wil fail but it 
leaves the interface in the correct state to connect properly for 
WIGGLER. I am using now the next two commands and this works a lot 
better (commands are for WIGGLER at LPT1)

ocdremote -cARM7TDMI-S -dRAVEN -a1 -s1   (results in Internal error 43)

ocdremote -cARM7TDMI-S -dWIGGLER -a1 -s1 (connects correctly)


> the wiggler seems quite unstable--lots of errors while trying to 
 > connect.  It eventually works after a few tries at low speed (8)
 > but doesn't give me much confidence.

-- 
==============================
Aalt Lokhorst
Schut Geometrische Meettechniek bv
Duinkerkenstraat 21
9723 BN Groningen
P.O. Box 5225
9700 GE Groningen
The Netherlands
Tel: +31-50-5877877
Fax: +31-50-5877899
E-mail: Lokhorst@...
==============================

Re: newbie question--debugging from flash

2005-02-23 by Jan Szymanski

you know, I was like you, when I was young...
Now I more value my time. If something doesn't work well forget about 
it. There are better ways of wasting time than fighting with 
unreliable tools. How many hours of your time is equivalent 
to the cost of a proper tools ? Is a 'low cost' tool really low cost ?
Jan

--- In lpc2000@yahoogroups.com, "Aalt Lokhorst" <lokhorst@s...> wrote:
> Hello Chris,
> 
> Yesterday I build a JTAG Wiggler according to the schematic diagram 
from 
> Leon. (inclusive the strap between DB25_pin8 and DB25_pin15)
> I also had some problems to connect at speed-1 until I found some 
> information at:
> 
>    http://www.mikrocontroller.net/forum/read-2-135959.html
> 
> I found a 'workaround' to get a speed=1 connection. Strange enough 
you 
> need to do dummy connect to a RAVEN device first. This wil fail but 
it 
> leaves the interface in the correct state to connect properly for 
> WIGGLER. I am using now the next two commands and this works a lot 
> better (commands are for WIGGLER at LPT1)
> 
> ocdremote -cARM7TDMI-S -dRAVEN -a1 -s1   (results in Internal error 
43)
Show quoted textHide quoted text
> 
> ocdremote -cARM7TDMI-S -dWIGGLER -a1 -s1 (connects correctly)
> 
> 
> > the wiggler seems quite unstable--lots of errors while trying to 
>  > connect.  It eventually works after a few tries at low speed (8)
>  > but doesn't give me much confidence.
> 
> -- 
> ==============================
> Aalt Lokhorst
> Schut Geometrische Meettechniek bv
> Duinkerkenstraat 21
> 9723 BN Groningen
> P.O. Box 5225
> 9700 GE Groningen
> The Netherlands
> Tel: +31-50-5877877
> Fax: +31-50-5877899
> E-mail: Lokhorst@S...
> ==============================

Re: [lpc2000] newbie question--debugging from flash

2005-02-23 by Bill Knight

I've added a few things to my .gdbinit file which help debugging
quite a bit.  I didn't write these but have modified them some.

First to speed up downloads to RAM and uploads of tables, memory, etc

# Increase the packet size to improve download speed.
# Wish this didn't cause an "Are you sure?" popup in Insight
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed

The following make debugging in flash easier by allowing better access
to the two hardware breakpoints.

# Define some macros for setting & clearing breakpoints using the EmbeddedICE logic
define ib
   monitor reg w$arg0av = $arg1
   monitor reg w$arg0am = 1
   monitor reg w$arg0dv = 0
   monitor reg w$arg0dm = 0xFFFFFFFF
   monitor reg w$arg0cv = 0x100
   monitor reg w$arg0cm = 0xFFFFFEF7
end

document ib
ib <idx> <addr>
Configures hardware Instruction Breakpoint <idx> (0 or 1 for ARM7TDMI)
to break at address <addr>.  To disable the breakpoint, set <addr> to
some address that won't be executed or use 'db <idx>'.
end

define db
   monitor reg w$arg0av = 0xFFFFFFFF
   monitor reg w$arg0am = 1
   monitor reg w$arg0dv = 0
   monitor reg w$arg0dm = 0xFFFFFFFF
   monitor reg w$arg0cv = 0x100
   monitor reg w$arg0cm = 0xFFFFFEF7
end

document db
db <idx>
Disable hardware instruction Breakpoint <idx> by setting it to 0xFFFFFFFF
end


Hope they prove useful to the group.

Regards
-Bill Knight
R O SoftWare &
http://www.theARMPatch.com


On Wed, 23 Feb 2005 16:01:19 +1100, Bruce Paterson wrote:


c_hall2001 wrote:
> 
> Is there anyway to debug from flash using gnu (free) tools and the 
> wiggler?  I'm new to the ARM and GNU tools but my fog is slowly 
> starting to lift.  Also, the wiggler seems quite unstable--lots of 
> errors while trying to connect.  It eventually works after a few 
> tries at low speed (8) but doesn't give me much confidence.  Is 
> there another low cost JTAG solution for the ARM?  Are there any 
> good app notes that walk through a debugging session with 
> GNU+ARM+wiggler for us rather slow newbies?

I'm using the Chamaleon Pod which pretends to be a Macraigor Raven. This 
works well with ocdremote and ocd commander. I can't go faster than 
speed 6, but seems quite stable.

The main diadavantage I find with using Insight (gui based gdb) and 
debugging from flash is the lack of proper hardware breakpoint support.
Debugging this way is really pretty crappy (using gdp console to put in 
hardware breakpoints by hand), and for that reason alone I might have to 
recommend buying a debugger. A pity really.
Has Insight any near term prospects of being able to support hardware 
breakpoints from the gui ?


-- 
Cheers,
Bruce

     /\\\/\\\/\\\    /   /      Bruce Paterson
    /  \\\ \\\ \\\  /   /    Senior Design Engineer
   /   /\\\/\\\/\\\/   /   8 Anzed Court, Mulgrave, Vic, 3170
  /   /  \\\ \\\ \\\  /  PO Box 4112, Mulgrave, Vic, 3170, Australia
/   /    \\\/\\\ \\\/   Ph: +61 3 8561 4232   Fax: +61 3 9560 9055
       Tele-IP Ltd.      Email: bruce@...    Icq: #32015991
                         WWW:   http://www.tele-ip.com       VK3TJN
-------------------------------------------------------------------




Yahoo! Groups Links

Re: [lpc2000] Re: newbie question--debugging from flash

2005-02-23 by Aalt Lokhorst

Hello Jan Szymanski,

You are right, loosing time is very expensive.
The reason that I sometimes dive into 'low level problems' is to learn 
more of the stuff.
When I was a young boy I was busy with screwdrivers to disassemble al my 
toys. I lost several toys before I had the skills to assemble the stuff 
properly. I don't think this was wasted time and money because I learned 
from it.

Soldering the simple JTAG Wiggler circuit and 'playing' with the 
software didn't took very long so I think it is Ok.

Thanks,

-- 
==============================
Aalt Lokhorst
Schut Geometrische Meettechniek bv
Duinkerkenstraat 21
9723 BN Groningen
P.O. Box 5225
9700 GE Groningen
The Netherlands
Tel: +31-50-5877877
Fax: +31-50-5877899
E-mail: Lokhorst@...
==============================

Re: newbie question--debugging from flash

2005-02-23 by ntfreak2000

--- In lpc2000@yahoogroups.com, "Aalt Lokhorst" <lokhorst@s...> wrote:
> Hello Chris,
> 
> Yesterday I build a JTAG Wiggler according to the schematic diagram 
from 
> Leon. (inclusive the strap between DB25_pin8 and DB25_pin15)
> I also had some problems to connect at speed-1 until I found some 
> information at:
> 
>    http://www.mikrocontroller.net/forum/read-2-135959.html
> 
> I found a 'workaround' to get a speed=1 connection. Strange enough 
you 
> need to do dummy connect to a RAVEN device first. This wil fail but 
it 
> leaves the interface in the correct state to connect properly for 
> WIGGLER. I am using now the next two commands and this works a lot 
> better (commands are for WIGGLER at LPT1)
> 
> ocdremote -cARM7TDMI-S -dRAVEN -a1 -s1   (results in Internal error 
43)
> 
> ocdremote -cARM7TDMI-S -dWIGGLER -a1 -s1 (connects correctly)
> 
> 
> > the wiggler seems quite unstable--lots of errors while trying to 
>  > connect.  It eventually works after a few tries at low speed (8)
>  > but doesn't give me much confidence.
> 
> -- 
> ==============================
> Aalt Lokhorst
> Schut Geometrische Meettechniek bv
> Duinkerkenstraat 21
> 9723 BN Groningen
> P.O. Box 5225
> 9700 GE Groningen
> The Netherlands
> Tel: +31-50-5877877
> Fax: +31-50-5877899
> E-mail: Lokhorst@S...
> ==============================

I have used the wiggler compatible interface for a while now and 
always connect at speed 1, with very few problems.
I agree flash debugging can be a problem with insight due to the 
hardware breakpoint implementation of gdb. This should change over 
the next few months as a lot of work is being done on this in gdb.
If you want to use the wiggler interface and need reliable/easy flash 
debugging use Rowley Crosstudio.

Regards
Spen

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.