Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-24 Thread Igor Skochinsky
Hello Xiaofan, Saturday, May 23, 2009, 2:17:33 PM, you wrote: XC On Tue, May 19, 2009 at 8:26 AM, Igor Skochinsky skochin...@mail.ru wrote: What I mean is I could write up a list of missing/underdocumented commands and describe their input/output parameters. I don't have a J-Link so I don't

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-23 Thread Xiaofan Chen
On Tue, May 19, 2009 at 8:26 AM, Igor Skochinsky skochin...@mail.ru wrote: What I mean is I could write up a list of missing/underdocumented commands and describe their input/output parameters. I don't have a J-Link so I don't really need the code myself. Are you using reverse engineering from

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-23 Thread Zach Welch
On Sat, 2009-05-23 at 09:54 +0200, Magnus Lundin wrote: Comment - In jlink_execute_reset(jtag_command_t *cmd) jlink_tap_execute(); Should be removed and be superflous, actually both of them should be removed. After seeing your latest post, I now think I understand this to mean that the

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-23 Thread Zach Welch
On Sat, 2009-05-23 at 13:42 -0700, Zach Welch wrote: On Sat, 2009-05-23 at 09:54 +0200, Magnus Lundin wrote: Comment - In jlink_execute_reset(jtag_command_t *cmd) jlink_tap_execute(); Should be removed and be superflous, actually both of them should be removed. After seeing your

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Zach Welch
On Sat, 2009-05-23 at 00:18 +0200, Magnus Lundin wrote: Zach Welch wrote: On Tue, 2009-05-19 at 16:53 +0200, Magnus Lundin wrote: Hi Info : J-Link compiled Feb 20 2006 18:20:20 -- Update -- Info : JLink caps 0x3 Error: J-Link command EMU_CMD_GET_MAX_MEM_BLOCK failed

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Magnus Lundin
Zach Welch wrote: On Sat, 2009-05-23 at 00:18 +0200, Magnus Lundin wrote: Zach Welch wrote: On Tue, 2009-05-19 at 16:53 +0200, Magnus Lundin wrote: Hi Info : J-Link compiled Feb 20 2006 18:20:20 -- Update -- Info : JLink caps 0x3 Error: J-Link command

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Xiaofan Chen
On Sat, May 23, 2009 at 6:18 AM, Magnus Lundin lun...@mlu.mine.nu wrote: There is a set of new patches that has been tested by Michael Fischer, as far as i know there were no problems. There are still things that should be fixed in the resethandling in jtag_add_reset and minimizing the

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Xiaofan Chen
On Sat, May 23, 2009 at 9:12 AM, Xiaofan Chen xiaof...@gmail.com wrote: I'd like to test as well for my V3 black J-link. It works well with your previous patch. But the latest trunk does not build under Arch Linux. It is also pointed out by Simon Qian. How should I modify that file?

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Zach Welch
On Sat, 2009-05-23 at 09:12 +0800, Xiaofan Chen wrote: On Sat, May 23, 2009 at 6:18 AM, Magnus Lundin lun...@mlu.mine.nu wrote: There is a set of new patches that has been tested by Michael Fischer, as far as i know there were no problems. There are still things that should be fixed in

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Xiaofan Chen
2009/5/23 Zach Welch z...@superlucidity.net: I'd like to test as well for my V3 black J-link. It works well with your previous patch. But the latest trunk does not build under Arch Linux. It is also pointed out by Simon Qian. How should I modify that file? xsvf.c: In function

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Zach Welch
On Sat, 2009-05-23 at 09:35 +0800, Xiaofan Chen wrote: 2009/5/23 Zach Welch z...@superlucidity.net: I'd like to test as well for my V3 black J-link. It works well with your previous patch. But the latest trunk does not build under Arch Linux. It is also pointed out by Simon Qian. How

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-22 Thread Zach Welch
On Sat, 2009-05-23 at 00:46 +0200, Magnus Lundin wrote: Zach Welch wrote: On Sat, 2009-05-23 at 00:18 +0200, Magnus Lundin wrote: Zach Welch wrote: On Tue, 2009-05-19 at 16:53 +0200, Magnus Lundin wrote: [snip] There is a set of new patches that has been tested by

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-20 Thread Gene Smith
Xiaofan, After telnet connect, which monitor command produces this: Info : accepting 'telnet' connection from 0 TapName| Enabled | IdCode ExpectedIrLen IrCap IrMask Instr ---||-|||--|--|--|-

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-20 Thread Gene Smith
Magnus Lundin wrote: The following patch combines my previous patch with most of Ben's patch. It can use both EMU_CMD_HW_JTAG2 and EMU_CMD_HW_JTAG3 It defaults to EMU_CMD_HW_JTAG2 so it should work with all interfaces but EMU_CMD_HW_JTAG3 is recommended by SEgger, you can change the

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-20 Thread Xiaofan Chen
On Wed, May 20, 2009 at 9:25 PM, Gene Smith g...@chartertn.net wrote: Xiaofan, After telnet connect, which monitor command produces this: Info : accepting 'telnet' connection from 0      TapName            | Enabled |   IdCode      Expected    IrLen IrCap  IrMask Instr

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-20 Thread Xiaofan Chen
On Wed, May 20, 2009 at 10:06 PM, Gene Smith g...@chartertn.net wrote: So I guess I must use 2. Yes that is right. For v1/2/3/4, you have to use 2. Still see occasional segfault on startup (still running r1833 except for jlink.c patch). The latest version (1857) seems to be ok, no more

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-20 Thread Gene Smith
Xiaofan Chen wrote: On Wed, May 20, 2009 at 10:06 PM, Gene Smith g...@chartertn.net wrote: So I guess I must use 2. Yes that is right. For v1/2/3/4, you have to use 2. Still see occasional segfault on startup (still running r1833 except for jlink.c patch). The latest version (1857)

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Magnus Lundin
Following patch reads the endpoint numbers from the usb lib device structure, and it removes some of the extra testing that breaks older versions of JLink. This should improve the situation. Hopefully the same trick works under win and mac os. Have a nice day Magnus Index: src/jtag/jlink.c

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Zach Welch
On Tue, 2009-05-19 at 10:53 +0200, Magnus Lundin wrote: Following patch reads the endpoint numbers from the usb lib device structure, and it removes some of the extra testing that breaks older versions of JLink. Let's not remove the test, even if it only works with newer versions. For now, I

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Benjamin Schmidt
Hello Magnus, thanks for your patch... that is half the way needed to make my V3 JLink work. The other thing is that at least mine doesn't support the EMU_CMD_HW_JTAG3 command. This is not documented in the USB protocol description as far as I know. My JLink doesn't answer at all to this

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Gene Smith
Xiaofan Chen wrote: On Mon, May 18, 2009 at 11:09 PM, Gene Smith g...@chartertn.net wrote: Mine says: Updating firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update -- Mine says: Replacing firmware J-Link compiled Dec 2 2004 09:13:33 Mine says: S/N : -3 Kind of strange. Could you try

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Tue, May 19, 2009 at 4:53 PM, Magnus Lundin lun...@mlu.mine.nu wrote: Following patch reads the endpoint numbers from the usb lib device structure, and it removes some of the extra testing that breaks older versions of JLink. This should improve the situation. Hopefully the same trick

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Benjamin Schmidt
On Tuesday 19 May 2009 03:19:06 pm Gene Smith wrote: Info : J-Link compiled Dec 2 2004 09:13:33 That seems like a very very old firmware version. And I just remembered something... When I got my JLink, it was on a somewhat old firmware version as well... Linux segger tool did nothing at

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Gene Smith
Magnus Lundin wrote: Following patch reads the endpoint numbers from the usb lib device structure, and it removes some of the extra testing that breaks older versions of JLink. This should improve the situation. Hopefully the same trick works under win and mac os. Have a nice day

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Tue, May 19, 2009 at 9:30 PM, Gene Smith g...@chartertn.net wrote: Running openocd command or the segger utility commands does produces no new messages. (FYI: this is fedora 8 with last possible updates.) But openocd commands to the jlink cause the LED to go off but segger commands don't.

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Tue, May 19, 2009 at 10:36 PM, Xiaofan Chen xiaof...@gmail.com wrote: Now I see the same behavior of my black J-Link. This is even after adding part of the patch from Magnus to correct the endpoint. Once the LED goes off after running openocd, run Segger's utility and you will know that it

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Tue, May 19, 2009 at 10:43 PM, Xiaofan Chen xiaof...@gmail.com wrote: Now if I compare V6 to V3 based on some simple test, it seems my V6 works (no problem with halt target and single step) and my V3 does not (can not halt target and step). But between yesterday (V1809) and today (V1836),

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Gene Smith
Benjamin Schmidt wrote: On Tuesday 19 May 2009 03:19:06 pm Gene Smith wrote: Info : J-Link compiled Dec 2 2004 09:13:33 That seems like a very very old firmware version. And I just remembered something... When I got my JLink, it was on a somewhat old firmware version as well... Linux

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Magnus Lundin
Hi Info : J-Link compiled Feb 20 2006 18:20:20 -- Update -- Info : JLink caps 0x3 Error: J-Link command EMU_CMD_GET_MAX_MEM_BLOCK failed (-110) Open OCD seems to get reasonable ansvers from first two JLink commands. The /* query hardware maximum memory block */ should not be run for this

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Tue, May 19, 2009 at 9:39 PM, Xiaofan Chen xiaof...@gmail.com wrote: On Tue, May 19, 2009 at 4:53 PM, Magnus Lundin lun...@mlu.mine.nu wrote: Following patch reads the endpoint numbers from the usb lib device structure, and it removes some of the extra testing that breaks older versions of

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Gene Smith
Gene Smith wrote: Gene Smith wrote: Benjamin Schmidt wrote: On Tuesday 19 May 2009 03:19:06 pm Gene Smith wrote: Info : J-Link compiled Dec 2 2004 09:13:33 That seems like a very very old firmware version. And I just remembered something... When I got my JLink, it was on a somewhat old

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Wed, May 20, 2009 at 12:53 AM, Gene Smith g...@chartertn.net wrote: Using the Magnus patch, I just noticed that after openocd starts the jlink LED goes off indicating further USB comm is not possible (it seems to be true) and telnet cmds fail. If I try to restart oocd, I again get the 3

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Wed, May 20, 2009 at 12:04 AM, Gene Smith g...@chartertn.net wrote: I forgot that I have to run ./start as root or sudo or you get this error. It is not difficult to apply the correct udev rules to be able to run openocd or ./start as normal user. OpenOCD has an example in the distribution.

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Xiaofan Chen
On Wed, May 20, 2009 at 12:53 AM, Gene Smith g...@chartertn.net wrote: OK, one more reply to self... Using the Magnus patch, I just noticed that after openocd starts the jlink LED goes off indicating further USB comm is not possible (it seems to be true) and telnet cmds fail. If I try to

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-19 Thread Magnus Lundin
The following patch combines my previous patch with most of Ben's patch. It can use both EMU_CMD_HW_JTAG2 and EMU_CMD_HW_JTAG3 It defaults to EMU_CMD_HW_JTAG2 so it should work with all interfaces but EMU_CMD_HW_JTAG3 is recommended by SEgger, you can change the behaviour with

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Gene Smith
Xiaofan Chen wrote: 2008/12/25 Michel Catudal michelcatu...@gmail.com: I could not get my older black j-link devices to work while the newer yellow one works. I am curious as to what the basic difference would be between the two. I tested them at work and they were working just as good on

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Xiaofan Chen
On Mon, May 18, 2009 at 9:37 PM, Gene Smith g...@chartertn.net wrote: I can't answer your questions but can only add another jlink question. I know very little about the jlink. I have a yellow jlink that says jlink ks, IAR Systems on the front (ks = kickstart?). On the back it says

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Xiaofan Chen
On Mon, May 18, 2009 at 10:18 PM, Xiaofan Chen xiaof...@gmail.com wrote: mc...@ubuntu904:~/Desktop/build/openocd/jlinknew$ openocd -f openocd_lpc2148.cfg Open On-Chip Debugger 0.2.0-in-development (2009-05-18-19:51) svn:1809 BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Xiaofan Chen
More tests on flash writing. I got the script from psas. Maybe it is too old (for V1257). I will try later with new scripts. http://www.linuxjournal.com/article/10421 With black J-link script oocd_flash_lpc2148.script J-Link command 0xdd failed (-2) J-Link command 0xde failed (-2) J-Link command

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Gene Smith
Xiaofan Chen wrote: On Mon, May 18, 2009 at 9:37 PM, Gene Smith g...@chartertn.net wrote: I can't answer your questions but can only add another jlink question. I know very little about the jlink. I have a yellow jlink that says jlink ks, IAR Systems on the front (ks = kickstart?). On the back

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Benjamin Schmidt
Hello, I posted a similar patch several month ago. I have a JLink version v3.0 To get it to work you have to change several little things. This is just a very ugly hack that somewhat disables support for =V5 JLinks I'd just be interested if any of you can also get it to work this way... I

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Gene Smith
Benjamin Schmidt wrote: There's this segger closed source linux gdm server tool... http://www.segger.com/pub/jlink/JLink_Linux_090202.tar.gz It can show the hardware version. With patch still gets three EMU_CMD_GET_CAPS errors and don't worry. Then LED goes off on jlink. Should it go

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Benjamin Schmidt
Does either rev 1833 or 1833 with my patch displaying something like this in the beginning? Info : J-Link compiled Feb 20 2006 18:20:20 -- Update -- Info : JLink caps 0x3 Info : JLink max mem block 32 Info : Vref = 3.283 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 255 The problem is that

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Igor Skochinsky
Hello Benjamin, Tuesday, May 19, 2009, 12:39:26 AM, you wrote: BS There's this segger closed source linux gdm server tool... BS http://www.segger.com/pub/jlink/JLink_Linux_090202.tar.gz BS It can show the hardware version. Is there a necessity to map missing JLink commands? I could find them

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Benjamin Schmidt
Hello Igor I think this wouldn't hurt anyone and could be very useful for debugging like this. But it should definately check via EMU_CMD_GET_CAPS first if command is available. At the moment the caps value is read from the device but for example the call to EMU_CMD_GET_MAX_MEM_BLOCK is done

Re: [Openocd-development] OpenOCD and different versions of J-Link

2009-05-18 Thread Igor Skochinsky
Hello Benjamin, Tuesday, May 19, 2009, 2:48:30 AM, you wrote: BS I think this wouldn't hurt anyone and could be very useful for debugging like BS this. BS But it should definately check via EMU_CMD_GET_CAPS first if command is BS available. At the moment the caps value is read from the device

[Openocd-development] OpenOCD and different versions of J-Link

2009-05-17 Thread Xiaofan Chen
2008/12/25 Michel Catudal michelcatu...@gmail.com: I could not get my older black j-link devices to work while the newer yellow one works. I am curious as to what the basic difference would be between the two. I tested them at work and they were working just as good on windows as the yellow