EmbeddedRelated.com
Forums

Segger J-Link under Linux

Started by Xiaofan Chen October 8, 2008
Xiaofan Chen wrote:
> On Thu, Oct 9, 2008 at 12:01 AM, Tyson Harding > > wrote:
>>
>> OpenOCD supports the J-Link in linux without the Segger software.
> OpenOCD has
>> gone through some major changes recently but I am using svn version
> 717 on linux
>> and windows and it works fine. OpenOCD uses libusb instead to access
> the J-Link.
>> Thanks for the information. I will try it.
>
> Under Windows, do you use Libusb-win32 device driver or the filter driver?
> The filter driver is known not to work under Windows Vista and will not
> be supported in the future. If you use the device driver instead of the
> Segger driver, then you can not use the Segger utility. But that is
> not a problem if OpenOCD works fine.
>
In Windows I use the filter driver, and also install the Segger drivers. It
should also work fine using the libusb-win32 device drivers but I haven't tried it.

An Engineer's Guide to the LPC2100 Series

On Thu, Oct 9, 2008 at 6:54 AM, Xiaofan Chen wrote:
> On Thu, Oct 9, 2008 at 12:01 AM, Tyson Harding wrote:
>>
>> OpenOCD supports the J-Link in linux without the Segger software. OpenOCD has
>> gone through some major changes recently but I am using svn version 717 on linux
>> and windows and it works fine. OpenOCD uses libusb instead to access the J-Link.
>> Thanks for the information. I will try it.

With an old black color IAR J-Link, it does not see to work. The target is the
Olimex LPC-P2148 board.

mcuee@Ubuntu804:~/Desktop/arm/JLink-Linux$ ./start
SEGGER J-Link Commander V3.75t ('?' for help)
Compiled Dec 10 2007 10:27:50
DLL version V3.75t, compiled Dec 10 2007 10:27:45
Firmware: J-Link compiled Feb 20 2006 18:20:20 -- Update --
Hardware: V3.00
S/N : 3330
OEM : IAR
VTarget = 3.268V
Info: TotalIRLen = 4, IRPrint = 0x01
JTAG speed: 29 kHz
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
J-Link>exit

mcuee@Ubuntu804:~/Desktop/arm/JLink-Linux$ openocd
Open On-Chip Debugger 1.0 (2008-10-11-16:44) svn:1039

BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS

$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
jtag_speed: 4800
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)
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: J-Link command 0xdd failed (-2)
Error: J-Link command 0xde failed (-2)
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, expected 1
Error: J-Link command 0xdc failed (-2)
Error: J-Link command 0xde failed (-2)
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, 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 -1, expected 1
Error: usb_bulk_write failed (requested=6, result=-2)
Error: jlink_tap_execute, wrong result -1, expected 1
Warning:no tcl port specified, using default port 6666

With a relative new IAR J-Link, the connection seem to work.

mcuee@Ubuntu804:~/Desktop/arm/JLink-Linux$ ./start
SEGGER J-Link Commander V3.75t ('?' for help)
Compiled Dec 10 2007 10:27:50
DLL version V3.75t, compiled Dec 10 2007 10:27:45
Firmware: J-Link ARM V6 compiled Jul 10 2008 18:11:14
Hardware: V6.00
S/N : 156001623
OEM : IAR
VTarget = 3.261V
Info: TotalIRLen = 4, IRPrint = 0x01
JTAG speed: 30 kHz
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
J-Link>exit

mcuee@Ubuntu804:~/Desktop/arm/JLink-Linux$ openocd
Open On-Chip Debugger 1.0 (2008-10-11-16:44) svn:1039
BUGS? Read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
$URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
jtag_speed: 4800
Error: J-Link command EMU_CMD_VERSION failed (-110)

Error: J-Link command EMU_CMD_VERSION failed (112)

Info: J-Link ARM V6 compiled Jul 10 2008 18:11:14
Info: Vref = 3.261 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1

Info: J-Link JTAG Interface ready
Info: JTAG device found: 0x4f1f0f0f (Manufacturer: 0x787, Part:
0xf1f0, Version: 0x4)
Warning:no tcl port specified, using default port 6666
I will try more tests.

Regards,
Xiaofan