EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

JTAG Programmer Confusion - Noob Question

Started by sixtyfivebit December 3, 2005
May I add some additional points about the wiggler-jtag isssue.

I wrote a tutorial titled "ARM Cross Development with Eclipse" that
is referenced in the "links" section of this message board. This
tutorial shows in excessive detail how to set up a free GNU compiler
set for the ARM using the Eclipse/CDT IDE and how to use the Eclipse
debugger with the wiggler. Hopefully, you have had a look at that.

The obvious shortcoming is that it couldn't debug in FLASH memory.

I'm now furiously working on a revision to this tutorial that does
show how to debug in FLASH. Thanks to the genius of my new co-
author, Norwegian engineer Kjell Eirik Andersen, we now have a
simple utility program, RSPBreakout.exe, that reads all commands
intended for the Macraigor OCDRemote and converts all Z0,addr,length
commands (software breakpoints) into Z1,addr,length commands
(hardware breakpoints). As long as you limit yourself to setting no
more than two breakpoints at a time, it will properly break in FLASH
and all single-stepping, variable inspection, etc works
magnificently. This requires Macraigor's OCDRemote version 2.14
which supports -Z2 GDB remote serial protocol commands.

Not the ultimate solution, but a great breakthrough for a completely
free development system nonetheless.

One last point, I can get the Olimex Wiggler to run at speed 3 (140
khz) using the latest OCDRemote ver 2.14

However, I found that certain Windows applications, such as my
beloved SKYPE internet phone system, used so much of my CPU
resources that the speed that the Wiggler could run was severely
degraded (to the lowest speed). I suggest that you bring up Windows
Task Manager and make sure that you don't have any applications like
that running. Remember that the OCDRemote/wiggler is ssentially "bit-
banging" the parallel port and this LPT1 port probably has a much
lower priority on the Windows driver pecking order.

I hope to have the tutorial finished in the next several days. I'm
also hoping that the Eclipse foundation may accept my tutorial as an
official Eclipse Corner article.

Cheers,
Jim Lynch


An Engineer's Guide to the LPC2100 Series

Dear Jim

Your Eclipse-Arm tutorial is magnificent.
Thank you verry much for this great
work.

Cheers
Michael >From: "lynchzilla" <lynchzilla@lync...>
>Reply-To: lpc2000@lpc2...
>To: lpc2000@lpc2...
>Subject: [lpc2000] Re: JTAG Programmer Confusion - Noob Question
>Date: Sun, 04 Dec 2005 16:20:59 -0000
>
>May I add some additional points about the wiggler-jtag isssue.
>
>I wrote a tutorial titled "ARM Cross Development with Eclipse" that
>is referenced in the "links" section of this message board. This
>tutorial shows in excessive detail how to set up a free GNU compiler
>set for the ARM using the Eclipse/CDT IDE and how to use the Eclipse
>debugger with the wiggler. Hopefully, you have had a look at that.
>
>The obvious shortcoming is that it couldn't debug in FLASH memory.
>
>I'm now furiously working on a revision to this tutorial that does
>show how to debug in FLASH. Thanks to the genius of my new co-
>author, Norwegian engineer Kjell Eirik Andersen, we now have a
>simple utility program, RSPBreakout.exe, that reads all commands
>intended for the Macraigor OCDRemote and converts all Z0,addr,length
>commands (software breakpoints) into Z1,addr,length commands
>(hardware breakpoints). As long as you limit yourself to setting no
>more than two breakpoints at a time, it will properly break in FLASH
>and all single-stepping, variable inspection, etc works
>magnificently. This requires Macraigor's OCDRemote version 2.14
>which supports -Z2 GDB remote serial protocol commands.
>
>Not the ultimate solution, but a great breakthrough for a completely
>free development system nonetheless.
>
>One last point, I can get the Olimex Wiggler to run at speed 3 (140
>khz) using the latest OCDRemote ver 2.14
>
>However, I found that certain Windows applications, such as my
>beloved SKYPE internet phone system, used so much of my CPU
>resources that the speed that the Wiggler could run was severely
>degraded (to the lowest speed). I suggest that you bring up Windows
>Task Manager and make sure that you don't have any applications like
>that running. Remember that the OCDRemote/wiggler is ssentially "bit-
>banging" the parallel port and this LPT1 port probably has a much
>lower priority on the Windows driver pecking order.
>
>I hope to have the tutorial finished in the next several days. I'm
>also hoping that the Eclipse foundation may accept my tutorial as an
>official Eclipse Corner article.
>
>Cheers,
>Jim Lynch


Michael Rubitschka wrote:

> Dear Jim
>
> Your Eclipse-Arm tutorial is magnificent.
> Thank you verry much for this great
> work.
>
> Cheers
> Michael


I think we all can agree on that. Superb!

/Ake

>
>
> >From: "lynchzilla" <lynchzilla@lync...>
> >Reply-To: lpc2000@lpc2...
> >To: lpc2000@lpc2...
> >Subject: [lpc2000] Re: JTAG Programmer Confusion - Noob Question
> >Date: Sun, 04 Dec 2005 16:20:59 -0000
> >
> >May I add some additional points about the wiggler-jtag isssue.
> >
> >I wrote a tutorial titled "ARM Cross Development with Eclipse" that
> >is referenced in the "links" section of this message board. This
> >tutorial shows in excessive detail how to set up a free GNU compiler
> >set for the ARM using the Eclipse/CDT IDE and how to use the Eclipse
> >debugger with the wiggler. Hopefully, you have had a look at that.
> >
> >The obvious shortcoming is that it couldn't debug in FLASH memory.
> >
> >I'm now furiously working on a revision to this tutorial that does
> >show how to debug in FLASH. Thanks to the genius of my new co-
> >author, Norwegian engineer Kjell Eirik Andersen, we now have a
> >simple utility program, RSPBreakout.exe, that reads all commands
> >intended for the Macraigor OCDRemote and converts all Z0,addr,length
> >commands (software breakpoints) into Z1,addr,length commands
> >(hardware breakpoints). As long as you limit yourself to setting no
> >more than two breakpoints at a time, it will properly break in FLASH
> >and all single-stepping, variable inspection, etc works
> >magnificently. This requires Macraigor's OCDRemote version 2.14
> >which supports -Z2 GDB remote serial protocol commands.
> >
> >Not the ultimate solution, but a great breakthrough for a completely
> >free development system nonetheless.
> >
> >One last point, I can get the Olimex Wiggler to run at speed 3 (140
> >khz) using the latest OCDRemote ver 2.14
> >
> >However, I found that certain Windows applications, such as my
> >beloved SKYPE internet phone system, used so much of my CPU
> >resources that the speed that the Wiggler could run was severely
> >degraded (to the lowest speed). I suggest that you bring up Windows
> >Task Manager and make sure that you don't have any applications like
> >that running. Remember that the OCDRemote/wiggler is ssentially "bit-
> >banging" the parallel port and this LPT1 port probably has a much
> >lower priority on the Windows driver pecking order.
> >
> >I hope to have the tutorial finished in the next several days. I'm
> >also hoping that the Eclipse foundation may accept my tutorial as an
> >official Eclipse Corner article.
> >
> >Cheers,
> >Jim Lynch
> >
> >
> >
> >
> >
> >
> >
> >
>
> SPONSORED LINKS
> Microprocessor
> <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w451+microprocessor&c=4&s&.sig=tsVC-J9hJ5qyXg0WPR0l6g>
> Microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w451+microprocessor&c=4&s&.sig=DvJVNqC_pqRTm8Xq01nxwg>
> Pic microcontrollers
> <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w451+microprocessor&c=4&s&.sig=TpkoX4KofDJ7c6LyBvUqVQ>
>
> 8051 microprocessor
> <http://groups.yahoo.com/gads?t=ms&k51+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+microcontrollers&w451+microprocessor&c=4&s&.sig=1Ipf1Fjfbd_HVIlekkDP-A >
>
> >. >
>


--
---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavägen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 84 84 102
Company home: http://www.eurosource.se
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org


Leon Heller wrote:
> ----- Original Message -----
> From: "Bertrik Sikken" <bertrik@bert...>
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Dominic Rath wrote:
>>> Hello,
>>>
>>> gdb-jtag-arm doesn't support ARM7 targets, only ARM9TDMI. The ARM9 code
>>> has
>>> bugs, and I wouldn't count on its operation.
>>
>> How hard would it be to make it work? Something like this:
>> * fix existing bugs (what bugs do you know of?)
>> * replace pp.c (linux parallel port io) with a windows equivalent
>> * add support for LPC specific registers
>> ?
>>
>>> Macraigor (the company that sells the original "Wiggler") allows you to
>>> download their on-chip debug software for free. I used it with an Amontec
>>> Chameleon in its Wiggler configuration, but only on windows, the wiggler
>>> isn't supported by their linux version.
>>
>> I got my wiggler clone today (an olimex arm-jtag cable, the "new model"
>> with pin 8 and 15 connected on the PC side) and here what I found out
>> so far:
>>
>> I tried both ocdcommander and ocdremote and as far as I understand now,
>> the big problem with these is that they cannot set breakpoints in flash.
>> Besides, these programs and some wiggler clones don't seem to be
>> completely compatible with each other (my cable only works at the lowest
>> speed setting, 4 kHz, unless I perform some tricks.)
>
> My interface works at full speed, perhaps I have a better PCB design. I
> wasn't very impressed by the layout on the genuine Wiggler I have, and mine
> is faster than that.

The weird thing is, getting ocdremote to recognise the cable is the
hard part, once that works it seems to run fine.
The trick I mentioned is to first tell ocdcommander that a raven cable
is connected, let it fail, then tell it to look for a wiggler. If I do
that, the wiggler is recognised fine, even at the highest speed.

Regards,
Bertrik



ntfreak2000 wrote:
> --- In lpc2000@lpc2..., Scott Newell <digital.pickle@g...>
> wrote:
>>
>> At 06:14 PM 12/3/2005, Bertrik Sikken wrote:
>>
>> >I tried both ocdcommander and ocdremote and as far as I
> understand now,
>> >the big problem with these is that they cannot set breakpoints in
> flash.
>>
>> What? Under OCD Commander, the HBR command doesn't work for you?
> That's
>> very odd.
>>
>> I've used hardware breakpoints before, and if you really want to
> get
>> tricky, you can access the ICE-breaker registers from OCD
> commander as well.

Thanks for the correction, the HBR command works fine.

> Newer versions of ocdremote support the hbreak command, they have
> also added another monitor command:
> monitor softbkpts off
>
> this means that all breakpoint requests by insight/gdb will be set
> as hardware breakpoints, which means when enabled stepping etc works
> correctly in Flash.
>
> to resume the default behaviour type monitor softbkpts on

Ah nice, thanks for the tip.
I tried this in gdb console and indeed it works (have not been
able to also get it to work with insight source level debugging yet).

Kind regards,
Bertrik



--- In lpc2000@lpc2..., "ntfreak2000" <ntfreak2@h...> wrote:
>
> --- In lpc2000@lpc2..., "lynchzilla" <lynchzilla@a...>
wrote:
> >
> > May I add some additional points about the wiggler-jtag isssue.
> >
> > I wrote a tutorial titled "ARM Cross Development with Eclipse"
that
> > is referenced in the "links" section of this message board. This
> > tutorial shows in excessive detail how to set up a free GNU
> compiler
> > set for the ARM using the Eclipse/CDT IDE and how to use the
> Eclipse
> > debugger with the wiggler. Hopefully, you have had a look at that.
> >
> > The obvious shortcoming is that it couldn't debug in FLASH memory.
> >
> > I'm now furiously working on a revision to this tutorial that
does
> > show how to debug in FLASH. Thanks to the genius of my new co-
> > author, Norwegian engineer Kjell Eirik Andersen, we now have a
> > simple utility program, RSPBreakout.exe, that reads all commands
> > intended for the Macraigor OCDRemote and converts all
> Z0,addr,length
> > commands (software breakpoints) into Z1,addr,length commands
> > (hardware breakpoints). As long as you limit yourself to setting
no
> > more than two breakpoints at a time, it will properly break in
> FLASH
> > and all single-stepping, variable inspection, etc works
> > magnificently. This requires Macraigor's OCDRemote version 2.14
> > which supports -Z2 GDB remote serial protocol commands.
> >
> > Not the ultimate solution, but a great breakthrough for a
> completely
> > free development system nonetheless.
> >
> > One last point, I can get the Olimex Wiggler to run at speed 3
(140
> > khz) using the latest OCDRemote ver 2.14
> >
> > However, I found that certain Windows applications, such as my
> > beloved SKYPE internet phone system, used so much of my CPU
> > resources that the speed that the Wiggler could run was severely
> > degraded (to the lowest speed). I suggest that you bring up
Windows
> > Task Manager and make sure that you don't have any applications
> like
> > that running. Remember that the OCDRemote/wiggler is
> ssentially "bit-
> > banging" the parallel port and this LPT1 port probably has a much
> > lower priority on the Windows driver pecking order.
> >
> > I hope to have the tutorial finished in the next several days.
I'm
> > also hoping that the Eclipse foundation may accept my tutorial as
> an
> > official Eclipse Corner article.
> >
> > Cheers,
> > Jim Lynch
> >
>
> You mention a utility RSPBreakout.exe that converts the soft
> breakpoint requests to hardware for the ocdremote, this is what the
> new monitor softbkpts command does.
> As single stepping/stepping and breakpoints within insight work
> fantastic with monitor softbkpts off command.
>
> Regards
> sjo
>
Thanks, Sjo.

Is that an OCDRemote command, GDB command or Insight command? Where
is it documented? It may be just what I've been looking for.

Jim Lynch


--- In lpc2000@lpc2..., "lynchzilla" <lynchzilla@a...> wrote:
>
> --- In lpc2000@lpc2..., "ntfreak2000" <ntfreak2@h...>
wrote:
> >
> > --- In lpc2000@lpc2..., "lynchzilla" <lynchzilla@a...>
> wrote:
> > >
> > > May I add some additional points about the wiggler-jtag isssue.
> > >
> > > I wrote a tutorial titled "ARM Cross Development with Eclipse"
> that
> > > is referenced in the "links" section of this message board.
This
> > > tutorial shows in excessive detail how to set up a free GNU
> > compiler
> > > set for the ARM using the Eclipse/CDT IDE and how to use the
> > Eclipse
> > > debugger with the wiggler. Hopefully, you have had a look at
that.
> > >
> > > The obvious shortcoming is that it couldn't debug in FLASH
memory.
> > >
> > > I'm now furiously working on a revision to this tutorial that
> does
> > > show how to debug in FLASH. Thanks to the genius of my new co-
> > > author, Norwegian engineer Kjell Eirik Andersen, we now have a
> > > simple utility program, RSPBreakout.exe, that reads all
commands
> > > intended for the Macraigor OCDRemote and converts all
> > Z0,addr,length
> > > commands (software breakpoints) into Z1,addr,length commands
> > > (hardware breakpoints). As long as you limit yourself to
setting
> no
> > > more than two breakpoints at a time, it will properly break in
> > FLASH
> > > and all single-stepping, variable inspection, etc works
> > > magnificently. This requires Macraigor's OCDRemote version
2.14
> > > which supports -Z2 GDB remote serial protocol commands.
> > >
> > > Not the ultimate solution, but a great breakthrough for a
> > completely
> > > free development system nonetheless.
> > >
> > > One last point, I can get the Olimex Wiggler to run at speed 3
> (140
> > > khz) using the latest OCDRemote ver 2.14
> > >
> > > However, I found that certain Windows applications, such as my
> > > beloved SKYPE internet phone system, used so much of my CPU
> > > resources that the speed that the Wiggler could run was
severely
> > > degraded (to the lowest speed). I suggest that you bring up
> Windows
> > > Task Manager and make sure that you don't have any
applications
> > like
> > > that running. Remember that the OCDRemote/wiggler is
> > ssentially "bit-
> > > banging" the parallel port and this LPT1 port probably has a
much
> > > lower priority on the Windows driver pecking order.
> > >
> > > I hope to have the tutorial finished in the next several days.
> I'm
> > > also hoping that the Eclipse foundation may accept my tutorial
as
> > an
> > > official Eclipse Corner article.
> > >
> > > Cheers,
> > > Jim Lynch
> > >
> >
> > You mention a utility RSPBreakout.exe that converts the soft
> > breakpoint requests to hardware for the ocdremote, this is what
the
> > new monitor softbkpts command does.
> > As single stepping/stepping and breakpoints within insight work
> > fantastic with monitor softbkpts off command.
> >
> > Regards
> > sjo
> >
> Thanks, Sjo.
>
> Is that an OCDRemote command, GDB command or Insight command?
Where
> is it documented? It may be just what I've been looking for.
>
> Jim Lynch
>

It is a ocdremote command, added in 2.14 release.
to treat all soft breakpoints requests as hardware use:
monitor softbkpts off
use monitor help to list all other ocdremore commands.
help on individual commands can be seen by typing:
eg, monitor help softbkpts

Hope this helps

Regards
sjo



Bertrik Sikken wrote:

>>My interface works at full speed, perhaps I have a better PCB design. I
>>wasn't very impressed by the layout on the genuine Wiggler I have, and mine
>>is faster than that.
>>
>>
>
>The weird thing is, getting ocdremote to recognise the cable is the
>hard part, once that works it seems to run fine.
>The trick I mentioned is to first tell ocdcommander that a raven cable
>is connected, let it fail, then tell it to look for a wiggler. If I do
>that, the wiggler is recognised fine, even at the highest speed.

Are you debugging from Windows or Linux with the wiggler?

TomW

--
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------


--- In lpc2000@lpc2..., "lynchzilla" <lynchzilla@a...> wrote:
>
> May I add some additional points about the wiggler-jtag isssue.
>
> I wrote a tutorial titled "ARM Cross Development with Eclipse" that
> is referenced in the "links" section of this message board. This
> tutorial shows in excessive detail how to set up a free GNU
compiler
> set for the ARM using the Eclipse/CDT IDE and how to use the
Eclipse
> debugger with the wiggler. Hopefully, you have had a look at that.
>
> The obvious shortcoming is that it couldn't debug in FLASH memory.
>
> I'm now furiously working on a revision to this tutorial that does
> show how to debug in FLASH. Thanks to the genius of my new co-
> author, Norwegian engineer Kjell Eirik Andersen, we now have a
> simple utility program, RSPBreakout.exe, that reads all commands
> intended for the Macraigor OCDRemote and converts all
Z0,addr,length
> commands (software breakpoints) into Z1,addr,length commands
> (hardware breakpoints). As long as you limit yourself to setting no
> more than two breakpoints at a time, it will properly break in
FLASH
> and all single-stepping, variable inspection, etc works
> magnificently. This requires Macraigor's OCDRemote version 2.14
> which supports -Z2 GDB remote serial protocol commands.
>
> Not the ultimate solution, but a great breakthrough for a
completely
> free development system nonetheless.
>
> One last point, I can get the Olimex Wiggler to run at speed 3 (140
> khz) using the latest OCDRemote ver 2.14
>
> However, I found that certain Windows applications, such as my
> beloved SKYPE internet phone system, used so much of my CPU
> resources that the speed that the Wiggler could run was severely
> degraded (to the lowest speed). I suggest that you bring up Windows
> Task Manager and make sure that you don't have any applications
like
> that running. Remember that the OCDRemote/wiggler is
ssentially "bit-
> banging" the parallel port and this LPT1 port probably has a much
> lower priority on the Windows driver pecking order.
>
> I hope to have the tutorial finished in the next several days. I'm
> also hoping that the Eclipse foundation may accept my tutorial as
an
> official Eclipse Corner article.
>
> Cheers,
> Jim Lynch
>

You mention a utility RSPBreakout.exe that converts the soft
breakpoint requests to hardware for the ocdremote, this is what the
new monitor softbkpts command does.
As single stepping/stepping and breakpoints within insight work
fantastic with monitor softbkpts off command.

Regards
sjo




> Bertrik Sikken wrote:
>
> >>My interface works at full speed, perhaps I have a better
> PCB design.
> >>I wasn't very impressed by the layout on the genuine
> Wiggler I have,
> >>and mine is faster than that.
> >>
> >>
> >
> >The weird thing is, getting ocdremote to recognise the cable is the
> >hard part, once that works it seems to run fine.
> >The trick I mentioned is to first tell ocdcommander that a
> raven cable
> >is connected, let it fail, then tell it to look for a
> wiggler. If I do
> >that, the wiggler is recognised fine, even at the highest speed.
> >
> >
>
> Are you debugging from Windows or Linux with the wiggler?

I was able to run at full speed 0 with the Chameleon Pod pretending to
be a Macraigor Raven (sexier wiggler)....until I moved to a faster PC
where I had to drop to speed 3. Looks like processor speed is a variable
you need to take into account with the wiggler speed.

Cheers
Bruce




The 2024 Embedded Online Conference