|
From: Xiaofan C. <xia...@gm...> - 2009-05-18 07:06:39
|
2008/12/25 Michel Catudal <mic...@gm...>: > 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 one with IAR 5.2. (I don't use windows at home) > Sorry to rehash this thread as I am interested in this topic as well. I have both black J-link and yellow one at work. Yellow ones are mostly of V5/V6 (and V7?) firmware. The one I have is for V6. The black one I have is of the old V3 version. The MCU used is different as far as I know. It seems to me that the Black one is using a Renesas MCU (M16C?). The yellow one seems to use AT91SAM7S. The speed difference is big. V1/2/3/4 supports 4MHz JTAG and V5/6/7 support 12MHz JTAG. http://www.segger.com/jlink.html Last time I tried both with LPC-2148 and LPC-2468. The yellow one seems to work with Openocd. The black one does not. Both works under Windows with IAR 4.42/5.20/5.30. Both also seem to work with the Segger Linux beta software. There is also a new J-Link Pro with Ethernet/USB interface. It is compatible with J-Link so I assume it will work with OpenOCD as well. It is said that it is using AT91SAM7X256 according to some websites. http://www.segger.com/jlinkpro.html -- Xiaofan http://mcuee.blogspot.com |
|
From: Gene S. <gd...@ch...> - 2009-05-18 15:37:59
|
Xiaofan Chen wrote: > 2008/12/25 Michel Catudal <mic...@gm...>: >> 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 one with IAR 5.2. (I don't use windows at home) >> > > Sorry to rehash this thread as I am interested in this topic as well. > I have both black J-link and yellow one at work. Yellow ones are mostly > of V5/V6 (and V7?) firmware. The one I have is for V6. The black one > I have is of the old V3 version. The MCU used is different as far as I know. > It seems to me that the Black one is using a Renesas MCU (M16C?). > The yellow one seems to use AT91SAM7S. > 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 J-Link-ARM-KS Serial Number 10001576. No idea of the rev level or processor it contains (it is borrowed). The evaluation board I am connecting it to is IAR (made by Olimex) STR712 (ARM7TDMI). Should this work with openocd? If so, what is the correct linux/bash command line? It works OK with IAR Embedded Workbench Kickstart for ARM 4.30A on windows. Right now whether the board is powered on or off or even if the jtag cable is connected or not all I see is: sudo ./openocd -f target/interface/jlink -f target/target/str710.cfg Error: J-Link Command 0x01 failed (-2) Error: J-Link command EMU_CMD_VERSION failed (-110) <repeated 3 times> Info : J-Link initial read failed, don't worry <-- actually, need to worry! Info : J-Link JTAG Interface ready Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xdf failed (-2) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (9190). Workaround: increase "set remotetimeout" in GDB Error: J-Link setting speed failed (-2) Error: There are no enabled taps? Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xdf failed (-2) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xdf failed (-2) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: There are no enabled taps? Warn : no telnet port specified, using default port 4444 Warn : no gdb ports allocated as no target has been specified Warn : no tcl port specified, using default port 6666 Info : accepting 'telnet' connection from 0 Error: J-Link command 0x01 failed (-2) (Then I can telnet but can do nothing useful.) -gene |
|
From: Xiaofan C. <xia...@gm...> - 2009-05-18 16:18:49
|
On Mon, May 18, 2009 at 9:37 PM, Gene Smith <gd...@ch...> 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 > J-Link-ARM-KS Serial Number 10001576. No idea of the rev level or > processor it contains (it is borrowed). http://www.segger.com/download_jlink.html You can download the beta software for Linux. Here is what I get for the V6 Jlink. mcuee@ubuntu904:~/Desktop/build/openocd/jlink$ ./start SEGGER J-Link Commander V4.03a ('?' for help) Compiled Feb 2 2009 11:34:21 Updating firmware: J-Link ARM V6 compiled Jan 15 2009 11:58:34 Replacing firmware: J-Link ARM V6 compiled Dec 03 2007 17:34:18 Waiting for new firmware to boot New firmware booted successfully ****** Error: Communication timed out after firmware update DLL version V4.03a, compiled Feb 2 2009 11:34:13 Unable to retrieve firmware info ! S/N : 156007287 OEM : IAR VTarget = 3.248V Info: TotalIRLen = 4, IRPrint = 0x01 WARNING: Identified core does not match configuration. (Found: ARM7, Configured: None) Found 1 JTAG device, Total IRLen = 4: Id of device #0: 0x4F1F0F0F Found ARM with core Id 0x4F1F0F0F (ARM7) ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters RTCK reaction time is approx. 126ns Using adaptive clocking instead of fixed JTAG speed. > The evaluation board I am > connecting it to is IAR (made by Olimex) STR712 (ARM7TDMI). Should this > work with openocd? If so, what is the correct linux/bash command line? > It works OK with IAR Embedded Workbench Kickstart for ARM 4.30A on > windows. Right now whether the board is powered on or off or even if the > jtag cable is connected or not all I see is: > > sudo ./openocd -f target/interface/jlink -f target/target/str710.cfg > > Error: J-Link Command 0x01 failed (-2) > Error: J-Link command EMU_CMD_VERSION failed (-110) > <repeated 3 times> > > Info : J-Link initial read failed, don't worry <-- actually, need to worry! > Info : J-Link JTAG Interface ready > Error: J-Link command 0xdd failed (-2) > Error: J-Link command 0xdf failed (-2) > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (9190). Workaround: increase "set remotetimeout" in GDB > Error: J-Link setting speed failed (-2) > Error: There are no enabled taps? > Error: J-Link command 0xdd failed (-2) > Error: J-Link command 0xdf failed (-2) > Error: usb_bulk_write failed (requested=6, result=-2) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Error: usb_bulk_write failed (requested=6, result=-2) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Error: J-Link command 0xdd failed (-2) > Error: J-Link command 0xdf failed (-2) > Error: usb_bulk_write failed (requested=6, result=-2) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Error: There are no enabled taps? > Warn : no telnet port specified, using default port 4444 > Warn : no gdb ports allocated as no target has been specified > Warn : no tcl port specified, using default port 6666 > Info : accepting 'telnet' connection from 0 > Error: J-Link command 0x01 failed (-2) > > (Then I can telnet but can do nothing useful.) Similar error message here with latest svn version but it seems to work. mcuee@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 $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ jtag_speed: 15 force hard breakpoints Error: J-Link command EMU_CMD_VERSION failed (-110) Info : J-Link ARM V6 compiled Dec 03 2007 17:34:18 Info : JLink caps 0xf7fbf Info : JLink max mem block 9992 Info : Vref = 3.248 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1 Info : J-Link JTAG Interface ready Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3104). Workaround: increase "set remotetimeout" in GDB Error: usb_bulk_read failed (requested=1, result=-110) Error: jlink_tap_execute, wrong result -107 (expected 1) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3012). Workaround: increase "set remotetimeout" in GDB Error: usb_bulk_read failed (requested=1, result=-110) Error: jlink_tap_execute, wrong result -107 (expected 1) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3237). Workaround: increase "set remotetimeout" in GDB Error: usb_bulk_read failed (requested=1, result=-110) Error: jlink_tap_execute, wrong result -107 (expected 1) Warn : no tcl port specified, using default port 6666 Info : accepting 'telnet' connection from 0 TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr ---|--------------------|---------|------------|------------|------|------|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f mcuee@ubuntu904:~/Desktop/build/openocd/jlinknew$ telnet localhost 4444 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > scan_chain TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr ---|--------------------|---------|------------|------------|------|------|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f -- Xiaofan http://mcuee.blogspot.com |
|
From: Gene S. <gd...@ch...> - 2009-05-18 17:09:27
|
Xiaofan Chen wrote: > On Mon, May 18, 2009 at 9:37 PM, Gene Smith <gd...@ch...> 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 >> J-Link-ARM-KS Serial Number 10001576. No idea of the rev level or >> processor it contains (it is borrowed). > > http://www.segger.com/download_jlink.html > You can download the beta software for Linux. Here is what I get > for the V6 Jlink. Yes, found it too. > mcuee@ubuntu904:~/Desktop/build/openocd/jlink$ ./start > SEGGER J-Link Commander V4.03a ('?' for help) > Compiled Feb 2 2009 11:34:21 > Updating firmware: J-Link ARM V6 compiled Jan 15 2009 11:58:34 Mine says: Updating firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update -- > Replacing firmware: J-Link ARM V6 compiled Dec 03 2007 17:34:18 Mine says: Replacing firmware J-Link compiled Dec 2 2004 09:13:33 > Waiting for new firmware to boot > New firmware booted successfully > > ****** Error: Communication timed out after firmware update > DLL version V4.03a, compiled Feb 2 2009 11:34:13 > Unable to retrieve firmware info ! > S/N : 156007287 Mine says: S/N : -3 WARNING: No matching core found. Selecting default core (ARM7) *** Error: could not read hardware status! JTAG speed: 5 Hhz J-Link> Green LED goes off then *don't* see exactly what you see: > OEM : IAR > VTarget = 3.248V > Info: TotalIRLen = 4, IRPrint = 0x01 > > WARNING: Identified core does not match configuration. (Found: ARM7, > Configured: None) > Found 1 JTAG device, Total IRLen = 4: > Id of device #0: 0x4F1F0F0F > Found ARM with core Id 0x4F1F0F0F (ARM7) > ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters > RTCK reaction time is approx. 126ns > Using adaptive clocking instead of fixed JTAG speed. > > >> The evaluation board I am >> connecting it to is IAR (made by Olimex) STR712 (ARM7TDMI). Should this >> work with openocd? If so, what is the correct linux/bash command line? >> It works OK with IAR Embedded Workbench Kickstart for ARM 4.30A on >> windows. Right now whether the board is powered on or off or even if the >> jtag cable is connected or not all I see is: >> >> sudo ./openocd -f target/interface/jlink -f target/target/str710.cfg >> >> Error: J-Link Command 0x01 failed (-2) >> Error: J-Link command EMU_CMD_VERSION failed (-110) >> <repeated 3 times> >> >> Info : J-Link initial read failed, don't worry <-- actually, need to worry! >> Info : J-Link JTAG Interface ready >> Error: J-Link command 0xdd failed (-2) >> Error: J-Link command 0xdf failed (-2) >> Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive >> packet not sent! (9190). Workaround: increase "set remotetimeout" in GDB >> Error: J-Link setting speed failed (-2) >> Error: There are no enabled taps? >> Error: J-Link command 0xdd failed (-2) >> Error: J-Link command 0xdf failed (-2) >> Error: usb_bulk_write failed (requested=6, result=-2) >> Error: jlink_tap_execute, wrong result -107 (expected 1) >> Error: usb_bulk_write failed (requested=6, result=-2) >> Error: jlink_tap_execute, wrong result -107 (expected 1) >> Error: J-Link command 0xdd failed (-2) >> Error: J-Link command 0xdf failed (-2) >> Error: usb_bulk_write failed (requested=6, result=-2) >> Error: jlink_tap_execute, wrong result -107 (expected 1) >> Error: There are no enabled taps? >> Warn : no telnet port specified, using default port 4444 >> Warn : no gdb ports allocated as no target has been specified >> Warn : no tcl port specified, using default port 6666 >> Info : accepting 'telnet' connection from 0 >> Error: J-Link command 0x01 failed (-2) >> >> (Then I can telnet but can do nothing useful.) > > Similar error message here with latest svn version but it seems to work. > > mcuee@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 > > > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > jtag_speed: 15 > force hard breakpoints > Error: J-Link command EMU_CMD_VERSION failed (-110) But I see three re-tries on this at all fail. Yours seems to only fail once. Then yours seems to do useful stuff: > > Info : J-Link ARM V6 compiled Dec 03 2007 17:34:18 > Info : JLink caps 0xf7fbf > Info : JLink max mem block 9992 > Info : Vref = 3.248 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1 > > Info : J-Link JTAG Interface ready > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3104). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3012). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3237). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : no tcl port specified, using default port 6666 > Info : accepting 'telnet' connection from 0 > TapName | Enabled | IdCode Expected IrLen > IrCap IrMask Instr > ---|--------------------|---------|------------|------------|------|------|------|--------- > 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | > 0x01 | 0x0f | 0x0f > > mcuee@ubuntu904:~/Desktop/build/openocd/jlinknew$ telnet localhost 4444 > Trying ::1... > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > Open On-Chip Debugger >> scan_chain > TapName | Enabled | IdCode Expected IrLen > IrCap IrMask Instr > ---|--------------------|---------|------------|------------|------|------|------|--------- > 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | > 0x01 | 0x0f | 0x0f My libusb on my fedora 8 is libusb-0.1.12-10.fc8. Do you think I might need a newer libusb? That is the last version it updated to. |
|
From: Xiaofan C. <xia...@gm...> - 2009-05-19 07:21:23
|
On Mon, May 18, 2009 at 11:09 PM, Gene Smith <gd...@ch...> 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 the segger utilities under Windows?
C:\Program Files\SEGGER\JLinkARM_V337a>jlink
SEGGER J-Link Commander V3.37a ('?' for help)
Compiled Aug 8 2006 19:16:44
DLL version V3.37a, compiled Aug 8 2006 19:16:40
Firmware: J-Link ARM V6 compiled Dec 03 2007 17:34:18
Hardware: V6.00
S/N : xxxxxx
OEM : IAR
...
> WARNING: No matching core found. Selecting default core (ARM7)
>
> *** Error: could not read hardware status!
> JTAG speed: 5 Hhz
> J-Link>
> Green LED goes off then *don't* see exactly what you see:
What does dmesg says when this happens? Something
is wrong with your kernel or this particular version of J-Link.
> My libusb on my fedora 8 is libusb-0.1.12-10.fc8. Do you think I might
> need a newer libusb? That is the last version it updated to.
>
That should be fine. libusb 0.1 has not changed for a while.
David Brownell is on this list and he is a prominent member of the
Linux USB kernel team. So if there is a real USB/Kernel issue here,
I think he can probably help you here. ;-)
--
Xiaofan http://mcuee.blogspot.com
|
|
From: Magnus L. <lu...@ml...> - 2009-05-19 10:53:43
Attachments:
jlink_090519.patch
|
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 |
|
From: Zach W. <zw...@su...> - 2009-05-19 11:43:38
|
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 would prefer it to be '#if 0'd out or moved to a function. Once we have version detection, we can put it back into the flow. > This should improve the situation. Despite the above, I am following this thread and curious about the success with older versions, so please continue testing this. I like to see this progress and hope to make some time of my own to contribute this week. Cheers, Zach |
|
From: Benjamin S. <De...@gm...> - 2009-05-19 12:16:04
|
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 command. So I switched to "EMU_CMD_HW_JTAG2" I'ts all the same with the exception of the 0-Read for success. With that my JLink works with at least with AT91SAM7S and STM32 Benjamin On Tuesday 19 May 2009 10:53:28 am 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 > Magnus |
|
From: Gene S. <gd...@ch...> - 2009-05-19 16:19:57
|
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 > Magnus > See the same messages startup with this as with Benjamin's patch. Also, still see this after connecting with telnet: > jlink_info J-Link command EMU_CMD_VERSION failed (-110) Also, don't see "segger" or "j-link" mentioned when I do lsusb -vvv |
|
From: Xiaofan C. <xia...@gm...> - 2009-05-18 16:25:48
|
On Mon, May 18, 2009 at 10:18 PM, Xiaofan Chen <xia...@gm...> wrote: > mcuee@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 > > > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > jtag_speed: 15 > force hard breakpoints > Error: J-Link command EMU_CMD_VERSION failed (-110) > > Info : J-Link ARM V6 compiled Dec 03 2007 17:34:18 > Info : JLink caps 0xf7fbf > Info : JLink max mem block 9992 > Info : Vref = 3.248 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1 > > Info : J-Link JTAG Interface ready > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3104). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3012). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > packet not sent! (3237). Workaround: increase "set remotetimeout" in > GDB > Error: usb_bulk_read failed (requested=1, result=-110) > Error: jlink_tap_execute, wrong result -107 (expected 1) > Warn : no tcl port specified, using default port 6666 > Info : accepting 'telnet' connection from 0 > TapName | Enabled | IdCode Expected IrLen > IrCap IrMask Instr > ---|--------------------|---------|------------|------------|------|------|------|--------- > 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | > 0x01 | 0x0f | 0x0f > > mcuee@ubuntu904:~/Desktop/build/openocd/jlinknew$ telnet localhost 4444 > Trying ::1... > Trying 127.0.0.1... > Connected to localhost. > Escape character is '^]'. > Open On-Chip Debugger >> scan_chain > TapName | Enabled | IdCode Expected IrLen > IrCap IrMask Instr > ---|--------------------|---------|------------|------------|------|------|------|--------- > 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | > 0x01 | 0x0f | 0x0f > Same test for the black V3 Jlink. mcuee@ubuntu904:~/Desktop/build/openocd/jlinkold$ 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 $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ jtag_speed: 15 force hard breakpoints Error: J-Link command 0x01 failed (-2) Error: J-Link command EMU_CMD_VERSION failed (-110) Error: J-Link command 0x01 failed (-2) Error: J-Link command EMU_CMD_VERSION failed (-110) Error: J-Link command 0x01 failed (-2) Error: J-Link command EMU_CMD_VERSION failed (-110) Info : J-Link initial read failed, don't worry Info : J-Link JTAG Interface ready Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xdf failed (-2) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (9087). Workaround: increase "set remotetimeout" in GDB Error: J-Link setting speed failed (-2) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xde failed (-2) Error: J-Link command 0xdc failed (-2) Error: J-Link command 0xde failed (-2) Error: J-Link command 0xdd failed (-2) Error: J-Link command 0xdf failed (-2) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Error: usb_bulk_write failed (requested=6, result=-2) Error: jlink_tap_execute, wrong result -107 (expected 1) Warn : no tcl port specified, using default port 6666 Info : accepting 'telnet' connection from 0 TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr ---|--------------------|---------|------------|------------|------|------|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f mcuee@ubuntu904:~/Desktop/build/openocd/jlinknew$ telnet localhost 4444 Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Open On-Chip Debugger > scan_chain TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr ---|--------------------|---------|------------|------------|------|------|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f More error messages. I need to learn more about openocd to carry out more tests. I have the Olimex LPC-P2148 board at home. It seemed to me that different Jlink version may need different codes to deal with. -- Xiaofan http://mcuee.blogspot.com |
|
From: Xiaofan C. <xia...@gm...> - 2009-05-18 16:36:39
|
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 0xdc failed (-2) J-Link command 0xde failed (-2) J-Link command 0xdd failed (-2) J-Link command 0xdf failed (-2) usb_bulk_write failed (requested=6, result=-2) jlink_tap_execute, wrong result -107 (expected 1) usb_bulk_write failed (requested=6, result=-2) jlink_tap_execute, wrong result -107 (expected 1) Runtime error, file "embedded:startup.tcl", line 172: error: -104 in procedure 'ocd_process_reset' Runtime error, file "oocd_flash_lpc2148.script", line 10: in procedure 'script' called at file "command.c", line 453 called at file "embedded:startup.tcl", line 122 With Yellow Jlink > script oocd_flash_lpc2148.script usb_bulk_read failed (requested=1, result=-110) jlink_tap_execute, wrong result -107 (expected 1) keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3245). Workaround: increase "set remotetimeout" in GDB usb_bulk_read failed (requested=1, result=-110) jlink_tap_execute, wrong result -107 (expected 1) Runtime error, file "embedded:startup.tcl", line 172: error: -104 in procedure 'ocd_process_reset' Runtime error, file "oocd_flash_lpc2148.script", line 10: in procedure 'script' called at file "command.c", line 453 called at file "embedded:startup.tcl", line 122 -- Xiaofan http://mcuee.blogspot.com |
|
From: Benjamin S. <De...@gm...> - 2009-05-18 23:12:53
Attachments:
testpatch.patch
|
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 would like to build a clean version of this patch that doesen't break the rest of the system, but I'd need some more help as I'm not experienced in any openocd/jtag code If you're interested I can explaine all the things that I needed to change... Benjamin Schmidt On Monday 18 May 2009 05:09:06 pm Gene Smith wrote: > Xiaofan Chen wrote: > > On Mon, May 18, 2009 at 9:37 PM, Gene Smith <gd...@ch...> 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 > >> J-Link-ARM-KS Serial Number 10001576. No idea of the rev level or > >> processor it contains (it is borrowed). > > > > http://www.segger.com/download_jlink.html > > You can download the beta software for Linux. Here is what I get > > for the V6 Jlink. > > Yes, found it too. > > > mcuee@ubuntu904:~/Desktop/build/openocd/jlink$ ./start > > SEGGER J-Link Commander V4.03a ('?' for help) > > Compiled Feb 2 2009 11:34:21 > > Updating firmware: J-Link ARM V6 compiled Jan 15 2009 11:58:34 > > Mine says: Updating firmware: J-Link compiled Feb 20 2006 18:20:20 -- > Update -- > > > Replacing firmware: J-Link ARM V6 compiled Dec 03 2007 17:34:18 > > Mine says: Replacing firmware J-Link compiled Dec 2 2004 09:13:33 > > > Waiting for new firmware to boot > > New firmware booted successfully > > > > ****** Error: Communication timed out after firmware update > > DLL version V4.03a, compiled Feb 2 2009 11:34:13 > > Unable to retrieve firmware info ! > > S/N : 156007287 > > Mine says: S/N : -3 > > WARNING: No matching core found. Selecting default core (ARM7) > > *** Error: could not read hardware status! > JTAG speed: 5 Hhz > J-Link> > > Green LED goes off then *don't* see exactly what you see: > > OEM : IAR > > VTarget = 3.248V > > Info: TotalIRLen = 4, IRPrint = 0x01 > > > > WARNING: Identified core does not match configuration. (Found: ARM7, > > Configured: None) > > Found 1 JTAG device, Total IRLen = 4: > > Id of device #0: 0x4F1F0F0F > > Found ARM with core Id 0x4F1F0F0F (ARM7) > > ETM V1.2: 1 pairs addr.comp, 0 data comp, 4 MM decs, 1 counters > > RTCK reaction time is approx. 126ns > > Using adaptive clocking instead of fixed JTAG speed. > > > >> The evaluation board I am > >> connecting it to is IAR (made by Olimex) STR712 (ARM7TDMI). Should this > >> work with openocd? If so, what is the correct linux/bash command line? > >> It works OK with IAR Embedded Workbench Kickstart for ARM 4.30A on > >> windows. Right now whether the board is powered on or off or even if the > >> jtag cable is connected or not all I see is: > >> > >> sudo ./openocd -f target/interface/jlink -f target/target/str710.cfg > >> > >> Error: J-Link Command 0x01 failed (-2) > >> Error: J-Link command EMU_CMD_VERSION failed (-110) > >> <repeated 3 times> > >> > >> Info : J-Link initial read failed, don't worry <-- actually, need to > >> worry! Info : J-Link JTAG Interface ready > >> Error: J-Link command 0xdd failed (-2) > >> Error: J-Link command 0xdf failed (-2) > >> Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > >> packet not sent! (9190). Workaround: increase "set remotetimeout" in GDB > >> Error: J-Link setting speed failed (-2) > >> Error: There are no enabled taps? > >> Error: J-Link command 0xdd failed (-2) > >> Error: J-Link command 0xdf failed (-2) > >> Error: usb_bulk_write failed (requested=6, result=-2) > >> Error: jlink_tap_execute, wrong result -107 (expected 1) > >> Error: usb_bulk_write failed (requested=6, result=-2) > >> Error: jlink_tap_execute, wrong result -107 (expected 1) > >> Error: J-Link command 0xdd failed (-2) > >> Error: J-Link command 0xdf failed (-2) > >> Error: usb_bulk_write failed (requested=6, result=-2) > >> Error: jlink_tap_execute, wrong result -107 (expected 1) > >> Error: There are no enabled taps? > >> Warn : no telnet port specified, using default port 4444 > >> Warn : no gdb ports allocated as no target has been specified > >> Warn : no tcl port specified, using default port 6666 > >> Info : accepting 'telnet' connection from 0 > >> Error: J-Link command 0x01 failed (-2) > >> > >> (Then I can telnet but can do nothing useful.) > > > > Similar error message here with latest svn version but it seems to work. > > > > mcuee@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 > > > > > > $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $ > > jtag_speed: 15 > > force hard breakpoints > > Error: J-Link command EMU_CMD_VERSION failed (-110) > > But I see three re-tries on this at all fail. Yours seems to only fail > > once. Then yours seems to do useful stuff: > > Info : J-Link ARM V6 compiled Dec 03 2007 17:34:18 > > Info : JLink caps 0xf7fbf > > Info : JLink max mem block 9992 > > Info : Vref = 3.248 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1 > > > > Info : J-Link JTAG Interface ready > > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > > packet not sent! (3104). Workaround: increase "set remotetimeout" in > > GDB > > Error: usb_bulk_read failed (requested=1, result=-110) > > Error: jlink_tap_execute, wrong result -107 (expected 1) > > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > > packet not sent! (3012). Workaround: increase "set remotetimeout" in > > GDB > > Error: usb_bulk_read failed (requested=1, result=-110) > > Error: jlink_tap_execute, wrong result -107 (expected 1) > > Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive > > packet not sent! (3237). Workaround: increase "set remotetimeout" in > > GDB > > Error: usb_bulk_read failed (requested=1, result=-110) > > Error: jlink_tap_execute, wrong result -107 (expected 1) > > Warn : no tcl port specified, using default port 6666 > > Info : accepting 'telnet' connection from 0 > > TapName | Enabled | IdCode Expected IrLen > > IrCap IrMask Instr > > ---|--------------------|---------|------------|------------|------|----- > >-|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | > > 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f > > > > mcuee@ubuntu904:~/Desktop/build/openocd/jlinknew$ telnet localhost 4444 > > Trying ::1... > > Trying 127.0.0.1... > > Connected to localhost. > > Escape character is '^]'. > > Open On-Chip Debugger > > > >> scan_chain > > > > TapName | Enabled | IdCode Expected IrLen > > IrCap IrMask Instr > > ---|--------------------|---------|------------|------------|------|----- > >-|------|--------- 0 | lpc2148.cpu | Y | 0x00000000 | > > 0x4f1f0f0f | 0x04 | 0x01 | 0x0f | 0x0f > > My libusb on my fedora 8 is libusb-0.1.12-10.fc8. Do you think I might > need a newer libusb? That is the last version it updated to. > > _______________________________________________ > Openocd-development mailing list > Ope...@li... > https://lists.berlios.de/mailman/listinfo/openocd-development |
|
From: Gene S. <gd...@ch...> - 2009-05-18 23:25:07
|
Benjamin Schmidt wrote: > 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 would like to build a clean version of this patch that doesen't break the > rest of the system, but I'd need some more help as I'm not experienced in any > openocd/jtag code > > If you're interested I can explaine all the things that I needed to change... I will let you know if it works before you explain it. > > > Benjamin Schmidt > Thanks! I have no idea what "version" jlink I have (yellow, marked j-link ks/IAR systems on front, j-link-arm-ks on back. Where do you find the version? Inside? I see your patch is against 1833 (head) which I now have so will give it a try. Thanks again! |
|
From: Benjamin S. <De...@gm...> - 2009-05-18 23:38:46
|
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. On Monday 18 May 2009 11:24:51 pm Gene Smith wrote: > Benjamin Schmidt wrote: > > 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 would like to build a clean version of this patch that doesen't break > > the rest of the system, but I'd need some more help as I'm not > > experienced in any openocd/jtag code > > > > If you're interested I can explaine all the things that I needed to > > change... > > I will let you know if it works before you explain it. > > > Benjamin Schmidt > > Thanks! I have no idea what "version" jlink I have (yellow, marked > j-link ks/IAR systems on front, j-link-arm-ks on back. Where do you find > the version? Inside? > > I see your patch is against 1833 (head) which I now have so will give it > a try. Thanks again! > > _______________________________________________ > Openocd-development mailing list > Ope...@li... > https://lists.berlios.de/mailman/listinfo/openocd-development |
|
From: Gene S. <gd...@ch...> - 2009-05-19 15:09:00
|
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. > Firmware not retrievable: J-Link>f Unable to retrieve firmware info ! J-Link> But status and hwinfo read up (don't know if it is meaningful): J-Link>st VTarget=0.000V ITarget=0mA TCK=0 TDI=0 TDO=0 TMS=0 TRES=0 TRST=0 Supported JTAG speeds: - 16 MHz/n, (n>=4. => 4000kHz, 3200kHz, 2666kHz, ... J-Link> J-Link>hwinfo HWInfo[00] = Target power is disabled HWInfo[02] = 0mA (ITarget) HWInfo[03] = 0mA (ITargetPeak) HWInfo[04] = 0mA (ITargetPeakOperation) HWInfo[05] = 0x00000000 HWInfo[06] = 0x00000000 HWInfo[07] = 0x00000000 HWInfo[08] = 0x00000000 HWInfo[09] = 0x00000000 HWInfo[10] = 0ms (ITargetMaxTime0) HWInfo[11] = 0ms (ITargetMaxTime1) HWInfo[12] = 0ms (ITargetMaxTime2) HWInfo[13] = 0x00000000 HWInfo[14] = 0x00000000 HWInfo[15] = 0x00000000 HWInfo[16] = 0x00000000 HWInfo[17] = 0x00000000 HWInfo[18] = 0x00000000 HWInfo[19] = 0x00000000 HWInfo[20] = 0x00000000 HWInfo[21] = 0x00000000 HWInfo[22] = 0x00000000 HWInfo[23] = 0x00000000 HWInfo[24] = 0x00000000 HWInfo[25] = 0x00000000 HWInfo[26] = 0x00000000 HWInfo[27] = 0x00000000 HWInfo[28] = 0x00000000 HWInfo[29] = 0x00000000 HWInfo[30] = 0x00000000 HWInfo[31] = 0x00000000 J-Link> |
|
From: Gene S. <gd...@ch...> - 2009-05-19 00:36:37
|
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 off? Not sure how I know that it is definitely working or not working. "Reset halt" command fails "usb_bulk_read failed ...". "flash info 0" seems to work. Will try the link above in morning. What command line do you use to start openocd with jlink and str712 board? Thanks for any pointers you can provide! -gene > > > > > > On Monday 18 May 2009 11:24:51 pm Gene Smith wrote: >> Benjamin Schmidt wrote: >>> 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 would like to build a clean version of this patch that doesen't break >>> the rest of the system, but I'd need some more help as I'm not >>> experienced in any openocd/jtag code >>> >>> If you're interested I can explaine all the things that I needed to >>> change... >> I will let you know if it works before you explain it. >> >>> Benjamin Schmidt >> Thanks! I have no idea what "version" jlink I have (yellow, marked >> j-link ks/IAR systems on front, j-link-arm-ks on back. Where do you find >> the version? Inside? >> >> I see your patch is against 1833 (head) which I now have so will give it >> a try. Thanks again! >> |
|
From: Benjamin S. <De...@gm...> - 2009-05-19 01:03:59
|
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 my old JLink uses a different USB endpoint, so if one version succedes this simple output message, the other WILL fail because it is sending to a channel where the jlink doesn't answer at all I only have access to a stm32 and an at91sam7s64 board ./src/openocd -f ./src/target/interface/jlink.cfg -f ./src/target/target/stm32.cfg That's how i call oocd atm... With my patch I only get one Error: J-Link command EMU_CMD_VERSION failed (-110) error in the beginning and every other 2 or 3 times it doesn't detect the jlink at all, but if the JLink info message appeares, there's no more errors... Benjamin On Tuesday 19 May 2009 12:36:24 am Gene Smith wrote: > 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 off? Not sure how I know that > it is definitely working or not working. "Reset halt" command fails > "usb_bulk_read failed ...". "flash info 0" seems to work. > Will try the link above in morning. > What command line do you use to start openocd with jlink and str712 > board? Thanks for any pointers you can provide! > -gene > > > On Monday 18 May 2009 11:24:51 pm Gene Smith wrote: > >> Benjamin Schmidt wrote: > >>> 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 would like to build a clean version of this patch that > >>> doesen't break the rest of the system, but I'd need some more help as > >>> I'm not experienced in any openocd/jtag code > >>> > >>> If you're interested I can explaine all the things that I needed to > >>> change... > >> > >> I will let you know if it works before you explain it. > >> > >>> Benjamin Schmidt > >> > >> Thanks! I have no idea what "version" jlink I have (yellow, marked > >> j-link ks/IAR systems on front, j-link-arm-ks on back. Where do you find > >> the version? Inside? > >> > >> I see your patch is against 1833 (head) which I now have so will give it > >> a try. Thanks again! > > _______________________________________________ > Openocd-development mailing list > Ope...@li... > https://lists.berlios.de/mailman/listinfo/openocd-development |
|
From: Gene S. <gd...@ch...> - 2009-05-19 15:19:23
|
Benjamin Schmidt wrote: > 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 This is what I see with 1833 with your patch. It is some different that my original post of the reaction, but not sure if it is OK or not. Does this look correct?: [gene@localhost src]$ sudo ./openocd -f target/interface/jlink.cfg -f target/board/iar_str712_sk1.cfg Password: Open On-Chip Debugger 0.2.0-in-development (2009-05-18-18:21) svn:1833M BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS $URL: svn://localhost:36903/openocd/trunk/src/openocd.c $ 10 kHz Info : J-Link compiled Dec 2 2004 09:13:33 Error: J-Link command EMU_CMD_GET_CAPS failed (-110) Info : J-Link compiled Dec 2 2004 09:13:33 Error: J-Link command EMU_CMD_GET_CAPS failed (-110) Info : J-Link compiled Dec 2 2004 09:13:33 Error: J-Link command EMU_CMD_GET_CAPS failed (-110) Info : J-Link initial read failed, don't worry Info : J-Link JTAG Interface ready Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (9219). Workaround: increase "set remotetimeout" in GDB Error: usb_bulk_read failed (requested=1, result=-110) Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (3029). Workaround: increase "set remotetimeout" in GDB Error: usb_bulk_read failed (requested=1, result=-110) Error: usb_bulk_read failed (requested=1, result=-110) Warn : no telnet port specified, using default port 4444 Warn : no gdb port specified, using default port 3333 Warn : no tcl port specified, using default port 6666 > > The problem is that my old JLink uses a different USB endpoint, so if one > version succedes this simple output message, the other WILL fail because it is > sending to a channel where the jlink doesn't answer at all > > I only have access to a stm32 and an at91sam7s64 board > > ./src/openocd -f ./src/target/interface/jlink.cfg -f > ./src/target/target/stm32.cfg > That's how i call oocd atm... Mine is about the same but I am using the file for str710 (but my board is str712 that I copied to target/board/iar_str712_sk1.cfg > > With my patch I only get one Error: J-Link command EMU_CMD_VERSION failed > (-110) error in the beginning and every other 2 or 3 times it doesn't detect > the jlink at all, but if the JLink info message appeares, there's no more > errors... > > Benjamin > > |
|
From: Benjamin S. <De...@gm...> - 2009-05-19 15:54:38
|
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 all... But when I hooked it up to the windows version of these segger tools, it asked me whether to update the device or not. (Wine did not do the job, had to use a native win xp setup for that) After that I could use the linux tool as well Maybe you could try that first Benjamin |
|
From: Gene S. <gd...@ch...> - 2009-05-19 16:51:30
|
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 segger tool did nothing at all...
> But when I hooked it up to the windows version of these segger tools, it asked
> me whether to update the device or not. (Wine did not do the job, had to use a
> native win xp setup for that)
>
> After that I could use the linux tool as well
>
> Maybe you could try that first
>
> Benjamin
Just loaded the windows tools and ran J-Link Commander. Can't seem to
copy/paste from its terminal so I will type in what it says:
SEGGER J-Link Commander V4.05i ('?' for help)
Compiled May 18 2009 19:21:08
DLL version V4.05i, compiled May 18 2009 19:20:52
Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
Hardware: V4.30
S/N : 10001576
OEM: IAR
VTarget = 3.250V
Info: TotalIRLen = 4, IRPrint = 0x01
Found 1 JTAG device, Total IRLen = 4:
Id of device #0: 0x3f0f0f0f
Found ARM with cord Id 0x3f0f0f0f (ARM7)
JTAG speed: 5 kHz
This did not ask me to update f/w. I think yesterday linux version may
have actually updated it to what is says above, not sure. The info above
looks right. The serial number is correct and matches what is printed on
the bottom.
I may not have mentioned that the Linux version of J-Link Commander
always says after starting:
"Can not connect to J-Link via USB"
while windows version above issues no such complaint.
Appears to probably be a USB comm problem. But I have no problem with
other USB devices on same linux box (mem sticks, SD cards, eth adapters,
etc.)
|
|
From: Gene S. <gd...@ch...> - 2009-05-19 18:04:43
|
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 firmware version as well...
>> Linux segger tool did nothing at all...
>> But when I hooked it up to the windows version of these segger tools, it asked
>> me whether to update the device or not. (Wine did not do the job, had to use a
>> native win xp setup for that)
>>
>> After that I could use the linux tool as well
>>
>> Maybe you could try that first
>>
>> Benjamin
>
> Just loaded the windows tools and ran J-Link Commander. Can't seem to
> copy/paste from its terminal so I will type in what it says:
>
> SEGGER J-Link Commander V4.05i ('?' for help)
> Compiled May 18 2009 19:21:08
> DLL version V4.05i, compiled May 18 2009 19:20:52
> Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
> Hardware: V4.30
> S/N : 10001576
> OEM: IAR
> VTarget = 3.250V
> Info: TotalIRLen = 4, IRPrint = 0x01
> Found 1 JTAG device, Total IRLen = 4:
> Id of device #0: 0x3f0f0f0f
> Found ARM with cord Id 0x3f0f0f0f (ARM7)
> JTAG speed: 5 kHz
>
> This did not ask me to update f/w. I think yesterday linux version may
> have actually updated it to what is says above, not sure. The info above
> looks right. The serial number is correct and matches what is printed on
> the bottom.
>
> I may not have mentioned that the Linux version of J-Link Commander
> always says after starting:
> "Can not connect to J-Link via USB"
> while windows version above issues no such complaint.
I forgot that I have to run "./start" as root or sudo or you get this error.
>
> Appears to probably be a USB comm problem. But I have no problem with
> other USB devices on same linux box (mem sticks, SD cards, eth adapters,
> etc.)
Well, I was wrong. Running this in Windows (XP) does seem to do
something to the jlink device. When I put it back on linux version of
J-Link Cmdr it now works better (have to run as root).
[gene@localhost jlink-segger]$ sudo ./start
Password:
SEGGER J-Link Commander V4.03a ('?' for help)
Compiled Feb 2 2009 11:34:21
DLL version V4.03a, compiled Feb 2 2009 11:34:13
Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
Hardware: V4.30
S/N : 10001576
OEM : IAR
VTarget = 3.250V
Info: TotalIRLen = 4, IRPrint = 0x01
WARNING: Identified core does not match configuration. (Found: ARM7,
Configured: None)
Found 1 JTAG device, Total IRLen = 4:
Id of device #0: 0x3F0F0F0F
Found ARM with core Id 0x3F0F0F0F (ARM7)
JTAG speed: 5 kHz
J-Link>f
Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
Hardware: V4.30
Also, now when I run openocd it seem better now:
[gene@localhost src]$ sudo ./openocd -f target/interface/jlink.cfg -f
target/board/iar_str712_sk1.cfg
Password:
Open On-Chip Debugger 0.2.0-in-development (2009-05-19-10:03) svn:1833M
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: svn://localhost:36903/openocd/trunk/src/openocd.c $
10 kHz
Info : J-Link compiled Feb 20 2006 18:20:20 -- Update --
Info : JLink caps 0x3
Info : Vref = 3.251 TCK = 1 TDI = 1 TDO = 0 TMS = 1 SRST = 1 TRST = 1
Info : J-Link JTAG Interface ready
Error: usb_bulk_read failed (requested=1, result=-110)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive
packet not sent! (3217). Workaround: increase "set remotetimeout" in GDB
Error: usb_bulk_read failed (requested=1, result=-110)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Error: usb_bulk_read failed (requested=1, result=-110)
Error: jlink_tap_execute, wrong result -107 (expected 1)
Warn : no telnet port specified, using default port 4444
Warn : no gdb port specified, using default port 3333
Warn : no tcl port specified, using default port 6666
However, when telnet'ing, I still get usb_bulk_read failed errors when I
do anything such as jlink_info, halt or reg.
A few more observations: When I plug the linux usb to the jlink the
blinking time is now only about a second (before it was 30-45 seconds).
Also, lsusb -vvv now shows the segger device like Xiaofan posted. So
running the windows J-Link Cmdr did something to the jlink.
I am using the jlink.c patch from Magnus he posted this morning.
-gene
|
|
From: Gene S. <gd...@ch...> - 2009-05-19 18:53:48
|
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 firmware version as well...
>>> Linux segger tool did nothing at all...
>>> But when I hooked it up to the windows version of these segger tools, it asked
>>> me whether to update the device or not. (Wine did not do the job, had to use a
>>> native win xp setup for that)
>>>
>>> After that I could use the linux tool as well
>>>
>>> Maybe you could try that first
>>>
>>> Benjamin
>> Just loaded the windows tools and ran J-Link Commander. Can't seem to
>> copy/paste from its terminal so I will type in what it says:
>>
>> SEGGER J-Link Commander V4.05i ('?' for help)
>> Compiled May 18 2009 19:21:08
>> DLL version V4.05i, compiled May 18 2009 19:20:52
>> Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
>> Hardware: V4.30
>> S/N : 10001576
>> OEM: IAR
>> VTarget = 3.250V
>> Info: TotalIRLen = 4, IRPrint = 0x01
>> Found 1 JTAG device, Total IRLen = 4:
>> Id of device #0: 0x3f0f0f0f
>> Found ARM with cord Id 0x3f0f0f0f (ARM7)
>> JTAG speed: 5 kHz
>>
>> This did not ask me to update f/w. I think yesterday linux version may
>> have actually updated it to what is says above, not sure. The info above
>> looks right. The serial number is correct and matches what is printed on
>> the bottom.
>>
>> I may not have mentioned that the Linux version of J-Link Commander
>> always says after starting:
>> "Can not connect to J-Link via USB"
>> while windows version above issues no such complaint.
>
> I forgot that I have to run "./start" as root or sudo or you get this error.
>
>> Appears to probably be a USB comm problem. But I have no problem with
>> other USB devices on same linux box (mem sticks, SD cards, eth adapters,
>> etc.)
>
> Well, I was wrong. Running this in Windows (XP) does seem to do
> something to the jlink device. When I put it back on linux version of
> J-Link Cmdr it now works better (have to run as root).
>
> [gene@localhost jlink-segger]$ sudo ./start
> Password:
> SEGGER J-Link Commander V4.03a ('?' for help)
> Compiled Feb 2 2009 11:34:21
> DLL version V4.03a, compiled Feb 2 2009 11:34:13
> Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
> Hardware: V4.30
> S/N : 10001576
> OEM : IAR
> VTarget = 3.250V
> Info: TotalIRLen = 4, IRPrint = 0x01
>
> WARNING: Identified core does not match configuration. (Found: ARM7,
> Configured: None)
> Found 1 JTAG device, Total IRLen = 4:
> Id of device #0: 0x3F0F0F0F
> Found ARM with core Id 0x3F0F0F0F (ARM7)
> JTAG speed: 5 kHz
> J-Link>f
> Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
> Hardware: V4.30
>
> Also, now when I run openocd it seem better now:
>
>
> [gene@localhost src]$ sudo ./openocd -f target/interface/jlink.cfg -f
> target/board/iar_str712_sk1.cfg
> Password:
> Open On-Chip Debugger 0.2.0-in-development (2009-05-19-10:03) svn:1833M
>
>
> BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
>
>
> $URL: svn://localhost:36903/openocd/trunk/src/openocd.c $
> 10 kHz
> Info : J-Link compiled Feb 20 2006 18:20:20 -- Update --
> Info : JLink caps 0x3
> Info : Vref = 3.251 TCK = 1 TDI = 1 TDO = 0 TMS = 1 SRST = 1 TRST = 1
>
> Info : J-Link JTAG Interface ready
> Error: usb_bulk_read failed (requested=1, result=-110)
> Error: jlink_tap_execute, wrong result -107 (expected 1)
> Warn : keep_alive() was not invoked in the 1000ms timelimit. GDB alive
> packet not sent! (3217). Workaround: increase "set remotetimeout" in GDB
> Error: usb_bulk_read failed (requested=1, result=-110)
> Error: jlink_tap_execute, wrong result -107 (expected 1)
> Error: usb_bulk_read failed (requested=1, result=-110)
> Error: jlink_tap_execute, wrong result -107 (expected 1)
> Warn : no telnet port specified, using default port 4444
> Warn : no gdb port specified, using default port 3333
> Warn : no tcl port specified, using default port 6666
>
> However, when telnet'ing, I still get usb_bulk_read failed errors when I
> do anything such as jlink_info, halt or reg.
>
> A few more observations: When I plug the linux usb to the jlink the
> blinking time is now only about a second (before it was 30-45 seconds).
> Also, lsusb -vvv now shows the segger device like Xiaofan posted. So
> running the windows J-Link Cmdr did something to the jlink.
>
> I am using the jlink.c patch from Magnus he posted this morning.
>
> -gene
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 restart oocd, I again get
the 3 failed retries on get caps and "don't worry" like before. If I
revert to Benjamin's patch, it comes up clean with no errors. Now I can
do telnet commands with no problem (such as jlink_info, mdb, reg, etc).
Possibly the intention was to combine these patches, I am not sure. But
anyhow, for what its worth, it is now seems to be working for me with
Ben's patch. (I have not tried to do anything with gdb yet.)
-gene
|
|
From: Xiaofan C. <xia...@gm...> - 2009-05-20 01:49:13
|
On Wed, May 20, 2009 at 12:53 AM, Gene Smith <gd...@ch...> 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 failed retries on get caps and "don't worry" like before. This is in line with my testing of V3. You have a V4. > If I revert to Benjamin's patch, it comes up clean with no errors. Now I can > do telnet commands with no problem (such as jlink_info, mdb, reg, etc). Glad to know that. I will try Ben's patch. > Possibly the intention was to combine these patches, I am not sure. But > anyhow, for what its worth, it is now seems to be working for me with > Ben's patch. (I have not tried to do anything with gdb yet.) -- Xiaofan http://mcuee.blogspot.com |
|
From: Xiaofan C. <xia...@gm...> - 2009-05-20 04:48:37
|
On Wed, May 20, 2009 at 12:53 AM, Gene Smith <gd...@ch...> 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 restart oocd, I again get > the 3 failed retries on get caps and "don't worry" like before. If I > revert to Benjamin's patch, it comes up clean with no errors. Now I can > do telnet commands with no problem (such as jlink_info, mdb, reg, etc). > > Possibly the intention was to combine these patches, I am not sure. But > anyhow, for what its worth, it is now seems to be working for me with > Ben's patch. (I have not tried to do anything with gdb yet.) I can see two big differences between the patches. In Ben's patch, -#define EMU_CMD_HW_JTAG3 0xcf +#define EMU_CMD_HW_JTAG3 0xce (maybe this is EMU_CMD_HW_JTAG2 according to Ben's Mach 16 patch). /* max speed 12MHz v5.0 jlink */ -#define JLINK_MAX_SPEED 12000 (this is only for V5/6/7/Pro) +#define JLINK_MAX_SPEED 4000 (this is for V1/2/3/4 according to Segger) The common thing is to correct the endpoint and remove the EMU_CMD_GET_MAX_MEM_BLOCK command. Ben's patch remove more things. I will give it a try after work. -- Xiaofan http://mcuee.blogspot.com |
|
From: Magnus L. <lu...@ml...> - 2009-05-20 06:46:15
Attachments:
jlink_090519_2.patch
|
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 > jlink_hw_jtag 3 or > jlink_hw_jtag 2 Autodetection can be done when we know which versions JLink can use what setting, (-d3 logs of setup messages ) Have a nice day Magnus Xiaofan Chen wrote: > On Wed, May 20, 2009 at 12:53 AM, Gene Smith <gd...@ch...> 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 restart oocd, I again get >> the 3 failed retries on get caps and "don't worry" like before. If I >> revert to Benjamin's patch, it comes up clean with no errors. Now I can >> do telnet commands with no problem (such as jlink_info, mdb, reg, etc). >> >> Possibly the intention was to combine these patches, I am not sure. But >> anyhow, for what its worth, it is now seems to be working for me with >> Ben's patch. (I have not tried to do anything with gdb yet.) >> > > I can see two big differences between the patches. In Ben's patch, > -#define EMU_CMD_HW_JTAG3 0xcf > +#define EMU_CMD_HW_JTAG3 0xce (maybe this is > EMU_CMD_HW_JTAG2 according to Ben's Mach 16 patch). > > /* max speed 12MHz v5.0 jlink */ > -#define JLINK_MAX_SPEED 12000 (this is only for V5/6/7/Pro) > +#define JLINK_MAX_SPEED 4000 (this is for V1/2/3/4 according to Segger) > > The common thing is to correct the endpoint and remove the > EMU_CMD_GET_MAX_MEM_BLOCK command. > > Ben's patch remove more things. I will give it a try after work. > > |