Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-14 Thread Gary Carlson
On 7/14/09 7:55 AM, "Alan Carvalho de Assis" wrote: > Hi Gary, > > On 7/13/09, Gary Carlson wrote: >> >> I think your board is being held in reset by something other then the J-link >> dongle. If the board is in reset and the jlink device can't free it, your >> will get the problem you des

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-14 Thread Alan Carvalho de Assis
Hi Gary, On 7/13/09, Gary Carlson wrote: > > I think your board is being held in reset by something other then the J-link > dongle. If the board is in reset and the jlink device can't free it, your > will get the problem you described. You can prove that by taking your > working board and holdi

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-14 Thread Alan Carvalho de Assis
Hi Xiaofan, On 7/13/09, Xiaofan Chen wrote: > On Tue, Jul 14, 2009 at 6:39 AM, Alan Carvalho de > Assis wrote: >> Then I think this issue just happen when using OpenOCD + JLink + >> i.MX27ADS board. > > I am not so sure if your problem have something to do with this > thread and maybe you want to

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-13 Thread Gary Carlson
On 7/13/09 3:39 PM, "Alan Carvalho de Assis" wrote: >> >> OK that helps. Here are some additional questions: >> >> What is the host-operating system you are using (Windows, Mac OS X, Linux, >> etc)? >> > > I am running Linux Ubuntu 9.04, gcc 4.3.3, etc :-) > >> Does this error show up 10

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-13 Thread Xiaofan Chen
On Tue, Jul 14, 2009 at 6:39 AM, Alan Carvalho de Assis wrote: > Then I think this issue just happen when using OpenOCD + JLink + > i.MX27ADS board. I am not so sure if your problem have something to do with this thread and maybe you want to try that fix as well. https://lists.berlios.de/pipermail

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-13 Thread Alan Carvalho de Assis
Hello Gary, On 7/13/09, Gary Carlson wrote: > > > > On 7/13/09 3:06 PM, "Alan Carvalho de Assis" wrote: > >> Hi Gary, >> >> On 7/10/09, Gary Carlson wrote: >>> >>> Try the V4 patch. >>> >> >> Same behavior: >> >> # openocd -f interface/jlink.cfg -f board/imx27ads.cfg >> Open On-Chip Debugger 0.

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-13 Thread Gary Carlson
On 7/13/09 3:06 PM, "Alan Carvalho de Assis" wrote: > Hi Gary, > > On 7/10/09, Gary Carlson wrote: >> >> Try the V4 patch. >> > > Same behavior: > > # openocd -f interface/jlink.cfg -f board/imx27ads.cfg > Open On-Chip Debugger 0.2.0-in-development (2009-07-13-18:53) svn:2513 > $URL: htt

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-13 Thread Alan Carvalho de Assis
Hi Gary, On 7/10/09, Gary Carlson wrote: > > Try the V4 patch. > Same behavior: # openocd -f interface/jlink.cfg -f board/imx27ads.cfg Open On-Chip Debugger 0.2.0-in-development (2009-07-13-18:53) svn:2513 $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $ For bug reports,

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-11 Thread Xiaofan Chen
On Sat, Jul 11, 2009 at 5:42 PM, Spencer Oliver wrote: > >> > I will ask again in the libusb mailing list. >> >> Here is the answer from Alan Stern (Linux USB kernel >> developer) in the libusb mailing list. >> http://article.gmane.org/gmane.comp.lib.libusb.devel.general/6569 >> "If the reset cause

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-11 Thread Spencer Oliver
> > I will ask again in the libusb mailing list. > > Here is the answer from Alan Stern (Linux USB kernel > developer) in the libusb mailing list. > http://article.gmane.org/gmane.comp.lib.libusb.devel.general/6569 > "If the reset causes the device to disconnect and reconnect > or change its de

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-10 Thread Xiaofan Chen
On Sat, Jul 11, 2009 at 7:07 AM, Xiaofan Chen wrote: > On Sat, Jul 11, 2009 at 2:31 AM, Spencer Oliver wrote: >>> >>> A minor fix needs to be done as I mentioned before. >>> usb_init(); needs to be moved up to the helper function >>> find_jlink_device(void) (before the line usb_find_busses();) >>>

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-10 Thread Xiaofan Chen
On Sat, Jul 11, 2009 at 2:31 AM, Spencer Oliver wrote: >> >> A minor fix needs to be done as I mentioned before. >> usb_init(); needs to be moved up to the helper function >> find_jlink_device(void) (before the line usb_find_busses();) >> http://libusb.sourceforge.net/doc/examples-code.html >> >> C

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-10 Thread Spencer Oliver
> > If they give a thumbs up, would you agree that committing the > patch makes the most sense at this point given what we know > today about libusb? > Looks good to me - only had time to test win32 however. Cheers Spen ___ Openocd-development mail

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-10 Thread Spencer Oliver
> > A minor fix needs to be done as I mentioned before. > usb_init(); needs to be moved up to the helper function > find_jlink_device(void) (before the line usb_find_busses();) > http://libusb.sourceforge.net/doc/examples-code.html > > Could you rework the patch? Thanks. > Why does it? usb_in

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-10 Thread Gary Carlson
On 7/9/09 8:49 AM, "Alan Carvalho de Assis" wrote: > Hi, > > On 7/9/09, Xiaofan Chen wrote: >> >> It would be nice to have a unified patch. But it seems a bit difficult here. >> Maybe we can accept this as a temporary fix while investigating a better >> fix. >> > > Jlink still failing to

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Xiaofan Chen
On Fri, Jul 10, 2009 at 1:11 PM, Gary Carlson wrote: > I agree with you in principal that in an ideal situation finding the > problems and fixing the behavior there rather then in openocd would the best > practice. We all agree with that. But the reality is different. > I think it is also safe to

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Gary Carlson
Zach, I agree with you in principal that in an ideal situation finding the problems and fixing the behavior there rather then in openocd would the best practice. I think it is also safe to say that the primary testers Xiaofan, Spencer, you, and me are all using the latest library versions. So th

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Alan Carvalho de Assis
Hi, On 7/9/09, Xiaofan Chen wrote: > > It would be nice to have a unified patch. But it seems a bit difficult here. > Maybe we can accept this as a temporary fix while investigating a better > fix. > Jlink still failing to me (i.MX27ADS and Ubuntu 9.04): $ sudo openocd -f interface/jlink.cfg -f

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Xiaofan Chen
On Thu, Jul 9, 2009 at 5:34 PM, Zach Welch wrote: > If you have to use conditionals to use libusb, then libusb is not > portable.  Perhaps I am wrong, but I thought that was one of the entire > points for existing: to provide a _portable_ USB library. Just take note there are libusb 0.1 and libusb

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Xiaofan Chen
On Thu, Jul 9, 2009 at 5:11 PM, Spencer Oliver wrote: >> >> It is starting to look like there is no single solution that >> will fix all OS issues with respect to this issue.  I am >> starting to think it is time to turn to conditional >> compilation directives. >> >> Any thoughts, comments, or res

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Xiaofan Chen
On Thu, Jul 9, 2009 at 8:05 AM, Xiaofan Chen wrote: > What I am thinking now is that this patch is still strange. Typically > the usb_set_configuration() will solve some problems for some USB > device (say USB toggle bit problems) since it is also a light weight > reset. > > But in case usb_reset()

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Zach Welch
On Thu, 2009-07-09 at 01:11 -0700, Gary Carlson wrote: > > > On 7/9/09 12:57 AM, "Spencer Oliver" wrote: > > > > >> Zach/Spencer/Xiaofan, > >> > >> I did some more experimentation on the latest subversion > >> (2499) and was able to tweak the jlink.c code slightly to > >> possibly achieve thr

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Spencer Oliver
> > It is starting to look like there is no single solution that > will fix all OS issues with respect to this issue. I am > starting to think it is time to turn to conditional > compilation directives. > > Any thoughts, comments, or reservations? > Its looking that way - try the attached.

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Xiaofan Chen
On Thu, Jul 9, 2009 at 8:23 AM, Gary Carlson wrote: > According the the libusb manual your use syntax is right.  However, I get > the feeling that the manual makes a deadly assumption that every software > program that uses a USB port cleans it up properly at the end.  I ran one > experiment a few

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Gary Carlson
On 7/9/09 12:57 AM, "Spencer Oliver" wrote: > >> Zach/Spencer/Xiaofan, >> >> I did some more experimentation on the latest subversion >> (2499) and was able to tweak the jlink.c code slightly to >> possibly achieve three objectives: >> >> 1. Make jlink dongles work under Windows for Spencer

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-09 Thread Spencer Oliver
> Zach/Spencer/Xiaofan, > > I did some more experimentation on the latest subversion > (2499) and was able to tweak the jlink.c code slightly to > possibly achieve three objectives: > > 1. Make jlink dongles work under Windows for Spencer. > 2. Make jlink dongles work under Mac OS X for me. >

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-08 Thread Gary Carlson
On 7/8/09 5:05 PM, "Xiaofan Chen" wrote: > On Thu, Jul 9, 2009 at 5:53 AM, Gary Carlson > wrote: >> Zach/Spencer/Xiaofan, >> >> I did some more experimentation on the latest subversion (2499) and was able >> to tweak the jlink.c code slightly to possibly achieve three objectives: >> >> 1. Make

Re: [Openocd-development] Version 3 test patch for jlink.c

2009-07-08 Thread Xiaofan Chen
On Thu, Jul 9, 2009 at 5:53 AM, Gary Carlson wrote: > Zach/Spencer/Xiaofan, > > I did some more experimentation on the latest subversion (2499) and was able > to tweak the jlink.c code slightly to possibly achieve three objectives: > > 1. Make jlink dongles work under Windows for Spencer. > 2. Make

[Openocd-development] Version 3 test patch for jlink.c

2009-07-08 Thread Gary Carlson
Zach/Spencer/Xiaofan, I did some more experimentation on the latest subversion (2499) and was able to tweak the jlink.c code slightly to possibly achieve three objectives: 1. Make jlink dongles work under Windows for Spencer. 2. Make jlink dongles work under Mac OS X for me. 3. Make jlink dongles