Reply by boB G May 29, 20122012-05-29
Thought I better document my Segger (IAR) J-Link problem properly...

Looks like the problem was an intermittent J-Link (yellow) JTAG box. We bought a (another) new one and it hasn't failed yet. No nasty 10 second interval "target is running" messages when USB cable is unplugged.

Not sure if my being banned on the Segger site will have any impact on my being able to get service in the future or not. We have a lot of these yellow and black JTAG programmers and debuggers here.

Thanks,
boB
--- In l..., "boB G" wrote:
>
>
>
> Hey !! Just in case anybody else sees this problem...
>
> I use IAR EWARM version 5.40 but also have 5.50.
> I use 5.40 because 5.50 didn't used to compile or link properly
> and I couldn't go through the pain of verifying our entire
> software changes with 5.50 after getting it to compile... SO...
> I just had another J-Link problem not being able to program.
> Re-installing the Segger drivers and re-booting did not help this time. SO I went to the bin directories of both versions and noticed that the file, jtag_usb.dll had a different date. I then backed up the old V5.40 one and copied over it with the V5.50 version.
>
> It worked !! It programmed again !
>
> Not sure how long this will work for, but it worked once at least.
>
> Whew !!
>
> boB
>
>
> PS. I usually use the Flash Loader in the Download options. Not sure if this jtag_usb.dll file is used for both FLdr and non-flash loader versions.
>
> PPS. Can I have my hair back now ???
>
>
> --- In l..., "boB G" wrote:
> >
> >
> > I have an Olimex OpenOCD JTAG programmer but haven't got it to quite work correctly yet with IAR. It does at least appear to program the flash. Well, at least it appears to screw it up and overwrite what was in there so it's doing something. Hopefully will get there...
> >
> >
> > My IAR J-Link has been working for over 3 years on this laptop and
> > lately it stops working and I have to re-install the drives and re-boot the computer after Control-Alt-Deleting to stop the errors from continuing for many minutes on end... All of my hair has been pulled out now...
> >
> > I suspect drivers or USB or something but there is evidently nobody anywhere that understands windows and USB drivers that can even give a clue. How the heck did this stuff get working in the first place ??
> >
> >
> > BTW, Anybody know J-Link reset number 9 might be ??
> >
> > (from the IAR J-Link log)
> > "Hardware reset with strategy 9 was performed"
> >
> >
> > boB
> >
> >
> > --- In l..., "stevec" wrote:
> > >
> > > J-link... guess I've been lucky? WIndows 7, windows XP, ARM7, never had any issues. The IAR debugger with flash breakpoints is great. If someone took away my flash breakpoints tool, I'd go after them with an axe!
> > >
> > > I wonder if this new IAR JTAG pod is made by Segger as was J-Link?
> > >
> > >
> > > --- In l..., "Paul Curtis" wrote:
> > > >
> > > > > > I actually would provide a different slant on this. The problem we
> > > > > > have with supporting 3P JTAG adapters is that they all have their
> > > > > > wrinkles, J-Link included (pre/post bits swapped between different DLL
> > > > > > versions, for instance). Offering a complete, known-working solution
> > > > > > from software through to debug adapter means you can control what
> > > > > > happens in your software end to end and nobody side-steps the issue.
> > > > > >
> > > > > Yes Paul, the better thing should be an universal adapter or an universal
> > > > > "standard" for the adapter implementation leaving the suppliers to do
> > > > > their best in other fields as speed, number of mcu supported, size and so
> > > > > on.
> > > >
> > > > For ARM, RDI is an open standard. I'm not sure how much it's used any more.
> > > > However, it's much harder to test n dev environments x m adapters than 1 dev
> > > > environment x 1 adapter. You can see the advantages...
> > > >
> > > > --
> > > > Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
> > > > SolderCore running Defender... http://www.vimeo.com/25709426
> > > >
> > >
>

An Engineer's Guide to the LPC2100 Series

Reply by stevec May 24, 20122012-05-24
Thanks... I'll look again at the '2106. Long ago, I looked and didn't see such a sense-bit.
--- In l..., Mike Harrison wrote:
>
> On Thu, 24 May 2012 03:22:33 -0000, you wrote:
>
> >A wish I have for JTAG, flash breakpoints, etc., is maybe an NXP unique issue... there's no way I can find to disable or otherwise keep control of the CPU/Core, with JTAG plugged in, when the watchdog timer expires. It just blows-up the debugger and JTAG.
> >
> >I'd wish that when JTAG is plugged in/active, the watchdog could be disabled as an option. Of course, there comes a time when you need to test the watchdog interrupt, but I tend to just let it reset the CPU.
> >
> >My code is so perfect that the watchdog can never fire.
>
> On some of the NXP parts, e.g. LPC2136 using PINSEL2, it is possible for software to detect when
> JTAG is being used, so the code can decide to not enable the watchdog at startup.
>

Reply by Paul Curtis May 24, 20122012-05-24
Hi,

> uLink definitely does offer flash breakpoints, any good debugger should
> since the HW support required for them is in the microcontroller core, it
> does not need any HW in the jtag probe.

You have the wrong end of the stick. The OP is asking whether any other
JTAG probe has the ability for the Segger Flash Breakpoint feature:

http://www.segger.com/jlink-flash-breakpoints.html

This allows unlimited breakpoints in flash memory and is absolutely not part
of the core. U-LINK doess not offer it.

http://www.keil.com/ulink/cmp.asp

For Flash Breakpoints you require intelligence in the JTAG adapter/host
software to manage flash reprogramming. The J-Link Flash Breakpoint feature
allows this, and CrossWorks can do this too on any JTAG adapter.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore running Defender... http://www.vimeo.com/25709426

Reply by Mike Harrison May 24, 20122012-05-24
On Thu, 24 May 2012 03:22:33 -0000, you wrote:

>A wish I have for JTAG, flash breakpoints, etc., is maybe an NXP unique issue... there's no way I can find to disable or otherwise keep control of the CPU/Core, with JTAG plugged in, when the watchdog timer expires. It just blows-up the debugger and JTAG.
>
>I'd wish that when JTAG is plugged in/active, the watchdog could be disabled as an option. Of course, there comes a time when you need to test the watchdog interrupt, but I tend to just let it reset the CPU.
>
>My code is so perfect that the watchdog can never fire.

On some of the NXP parts, e.g. LPC2136 using PINSEL2, it is possible for software to detect when
JTAG is being used, so the code can decide to not enable the watchdog at startup.
Reply by stevec May 24, 20122012-05-24
"use your jtag to disable the watchdog"
With J-Link and EWARM, I've found no way to do so. Is there a way?

To disable the watchdog timer, the only way I've found is to run code that does not enable the watchdog, but then I must cause it to timeout once.

PITA.

--- In l..., Triffid Hunter wrote:
>
> On Thu, May 24, 2012 at 1:22 PM, stevec wrote:
>
> > A wish I have for JTAG, flash breakpoints, etc., is maybe an NXP unique
> > issue... there's no way I can find to disable or otherwise keep control of
> > the CPU/Core, with JTAG plugged in, when the watchdog timer expires. It
> > just blows-up the debugger and JTAG.
> > this is a well known issue. use your jtag to disable the watchdog, or use
> debug code that doesn't enable it when debugging
>
>

Reply by Triffid Hunter May 24, 20122012-05-24
On Thu, May 24, 2012 at 1:22 PM, stevec wrote:

> A wish I have for JTAG, flash breakpoints, etc., is maybe an NXP unique
> issue... there's no way I can find to disable or otherwise keep control of
> the CPU/Core, with JTAG plugged in, when the watchdog timer expires. It
> just blows-up the debugger and JTAG.
>

this is a well known issue. use your jtag to disable the watchdog, or use
debug code that doesn't enable it when debugging


Reply by stevec May 24, 20122012-05-24
A wish I have for JTAG, flash breakpoints, etc., is maybe an NXP unique issue... there's no way I can find to disable or otherwise keep control of the CPU/Core, with JTAG plugged in, when the watchdog timer expires. It just blows-up the debugger and JTAG.

I'd wish that when JTAG is plugged in/active, the watchdog could be disabled as an option. Of course, there comes a time when you need to test the watchdog interrupt, but I tend to just let it reset the CPU.

My code is so perfect that the watchdog can never fire.

Reply by Phil Young May 23, 20122012-05-23
uLink definitely does offer flash breakpoints, any good debugger should
since the HW support required for them is in the microcontroller core, it
does not need any HW in the jtag probe.

One criticism I have of uLink, and it would be interesting to know how
others handle this is the switch between HW and SW breakpoints.

SW BP's can only be used in RAM, so uLink defaults to HW breakpoints, but as
soon as you use more than the number supported by the core it switches
everything to SW BP's and no bp's every get hit.

It would be nice to be able to specify ONE BP that is always a HW BP.

The reason is that the BP's get installed by the debugger before the boot
code runs, so when running from flash and copying to RAM the BP's get
overwritten. What is needed is a HW BP to be set after the startup code has
been executed which can then be used to halt the CPU and let the debugger
install the SW BP's in RAM so that they don't get overwritten.

A workaround seems to be to put a memory access BP ( which is always in HW
) at a location that does not get written by the loader and then access this
from main, the debugger then restores the correct SW BP's.

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
Bob T
Sent: 23 May 2012 19:36
To: l...
Subject: [lpc2000] Re: New IAR debugging probe

Paul,

out of curiosity, who else is offering Flash Breakpoints besides Segger?
AFAIK, U-Link does not offer this, all the OCDxyz and other low cost do not
offer this either!?
What did I miss?
It took Segger lots of effort to optimize flash breakpoints and these
breakpoints can be set really fast, work very well ...
Just interested what alternatives there might be, currently I have no desire
to switch.

Bob

--- In l... , "Paul
Curtis" wrote:
>
> Hi,
>
> > J-link... guess I've been lucky? WIndows 7, windows XP, ARM7, never had
> > any issues. The IAR debugger with flash breakpoints is great. If someone
> > took away my flash breakpoints tool, I'd go after them with an axe!
>
> Flash breakpoints are available with any JTAG debugger, with the right
> software. Certainly, J-Link isn't the only kid on the block here.
>
-- snip --



Reply by Paul Curtis May 23, 20122012-05-23
On 23 May 2012, at 19:35, Bob T wrote:

> Paul,
>
> out of curiosity, who else is offering Flash Breakpoints besides Segger?

We are. On any JTAG adapter, including wigglers.

> AFAIK, U-Link does not offer this, all the OCDxyz and other low cost do not offer this either!?
> What did I miss?

You miss the engineering work required to do this outside of the adapter itself.

>
> It took Segger lots of effort to optimize flash breakpoints and these breakpoints can be set really fast, work very well ...
> Just interested what alternatives there might be, currently I have no desire to switch.
>

Then you're stuffed, metaphorically.

-- Paul.

Reply by Bob T May 23, 20122012-05-23
Paul,

out of curiosity, who else is offering Flash Breakpoints besides Segger? AFAIK, U-Link does not offer this, all the OCDxyz and other low cost do not offer this either!?
What did I miss?
It took Segger lots of effort to optimize flash breakpoints and these breakpoints can be set really fast, work very well ...
Just interested what alternatives there might be, currently I have no desire to switch.

Bob

--- In l..., "Paul Curtis" wrote:
>
> Hi,
>
> > J-link... guess I've been lucky? WIndows 7, windows XP, ARM7, never had
> > any issues. The IAR debugger with flash breakpoints is great. If someone
> > took away my flash breakpoints tool, I'd go after them with an axe!
>
> Flash breakpoints are available with any JTAG debugger, with the right
> software. Certainly, J-Link isn't the only kid on the block here.
>
-- snip --