0

I download jlink soft for Linux from www.segger.com, install it under FreeBSD 9.0 with linux compat.

./JLinkExe could run, but couldn't connect my Jlink device.

Anyone help how to install jlkink soft that can connect jlink via usb. Trouble info as below.

www# ./JLinkExe
SEGGER J-Link Commander V4.50i ('?' for help)
Compiled Jun 22 2012 19:00:38
Can not connect to J-Link via USB.
J-Link>exit
www# cat JLink.log

T2882C6C0 000:000 SEGGER J-Link V4.50i Log File (0000ms, 0000ms total)
T2882C6C0 000:000 DLL Compiled: Jun 22 2012 19:00:36 (0001ms, 0001ms total)
T2882C6C0 000:000 Logging started @ 2012-08-12 10:57 (0001ms, 0001ms total)
T2882C6C0 000:001 JLINK_SetWarnOutHandler(...) (0001ms, 0002ms total)
T2882C6C0 000:002 JLINK_OpenEx(...)
  ***** Error: Can not connect to J-Link via USB.  returns "Can not connect to J-Link via USB." (0005ms, 0007ms total)
T2882C6C0 002:721 JLINK_ClrError() (0000ms, 0007ms total)
T2882C6C0 002:721 JLINK_Close() (0000ms, 0007ms total)
www# 
Frant
  • 3,769
  • 1
  • 11
  • 20
harvis
  • 136
  • 1
  • 6
  • The USB implementations on linux and FreeBSD are not the same. Unless J-Link uses libusb (which is available on both) it is unlikely to work, I think. – Roland Smith Aug 15 '12 at 15:43
  • libusb is ok under FreeBSD. I install libusb here /usr/ports/devel/libusb. I think error comes from config, I don't know how to config. – harvis Aug 18 '12 at 04:22
  • Since FreeBSD 8, libusb has been part of the base system; you should not have to install this from ports. But I think you might need a linux version of libusb... Because I don't think you can load a FreeBSD shared library into a Linux application. – Roland Smith Aug 18 '12 at 19:13
  • Yes your are right. I also have a linux libusb under /compat/linux/lib/. Under JLink for linux install README, there is [- Place the rule file "45-jlink.rules" provided with this J-Link software package at /etc/udev/rules.d/], but FreeBSD without /etc/udev, maybe it doesn't support udev. – harvis Aug 25 '12 at 01:31
  • You are right, FreeBSD doesn't use udev. But it has `devd(8)`. Maybe you can use that... – Roland Smith Aug 25 '12 at 10:10

1 Answers1

0

Not sure if it would work on FreeBSD, but this worked on Ubuntu for me:

Create file 45-jlink.rules in /etc/udev/rules.d Contents are:

SUBSYSTEM=="usb", ATTRS{idVendor}=="1366", ATTRS{idProduct}=="010[1234]", MODE="664", GROUP="plugdev"   

See: http://forum.segger.com/index.php?page=Thread&threadID=1175

user1527227
  • 1,546
  • 3
  • 21
  • 31