Discussion:
[UrJTAG-dev] urjtag and libusb1
antonio bergnoli
2010-06-21 11:56:22 UTC
Permalink
Is it possible to link urjtag with libusb1? If so, how can i configure it
and which is the advantage?
Xiaofan Chen
2010-06-21 12:21:26 UTC
Permalink
Post by antonio bergnoli
Is it possible to link urjtag with libusb1? If so, how can i configure it
and which is the advantage?
I think the default is still libusb-0.1 and there is no option
to use libusb-1.0 as of now.

But if you are using libftdi-1.0 to replace libftdi, then you are
indirectly using libusb-1.0.

You get better performance with libusb-1.0 and libftdi-1.0
if the code is re-written to take advantage of the
asynchronous API provided by libusb-1.0 and libftdi-1.0.

Commit:
http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=commit;h=ad53771377357e1f10206b2916069373fda01122
Explanation:
http://developer.intra2net.com/mailarchive/html/libftdi/2010/msg00065.html
--
Xiaofan http://mcuee.blogspot.com
Mike Frysinger
2010-06-21 17:35:14 UTC
Permalink
Post by Xiaofan Chen
Post by antonio bergnoli
Is it possible to link urjtag with libusb1? If so, how can i configure it
and which is the advantage?
I think the default is still libusb-0.1 and there is no option
to use libusb-1.0 as of now.
incorrect; use --with-libusb=1.0
-mike
Xiaofan Chen
2010-06-21 22:47:57 UTC
Permalink
Post by Mike Frysinger
Post by Xiaofan Chen
Post by antonio bergnoli
Is it possible to link urjtag with libusb1? If so, how can i configure it
and which is the advantage?
I think the default is still libusb-0.1 and there is no option
to use libusb-1.0 as of now.
incorrect; use --with-libusb=1.0
Great. I will add urjtag to the libusb.org wiki here (projects using
libusb-1.0).
http://www.libusb.org/wiki/Libusb1.0
--
Xiaofan http://mcuee.blogspot.com
antonio bergnoli
2010-06-22 06:58:23 UTC
Permalink
and what about libftdi ? ./configure --with-libusb=1.0 failed because
libftdi wants to link to libusb-0.1
Post by antonio bergnoli
Post by Mike Frysinger
Post by Xiaofan Chen
Post by antonio bergnoli
Is it possible to link urjtag with libusb1? If so, how can i
configure it
Post by Mike Frysinger
Post by Xiaofan Chen
Post by antonio bergnoli
and which is the advantage?
I think the default is still libusb-0.1 and there is no option
to use libusb-1.0 as of now.
incorrect; use --with-libusb=1.0
Great. I will add urjtag to the libusb.org wiki here (projects using
libusb-1.0).
http://www.libusb.org/wiki/Libusb1.0
--
Xiaofan http://mcuee.blogspot.com
Tomek CEDRO
2010-06-22 10:12:38 UTC
Permalink
Hello Antonio!
and what about libftdi ?  ./configure --with-libusb=1.0 failed because
libftdi wants to link to libusb-0.1
libftdi depends either on libusb-0.1 or libusb-1.0 (depending on the
libftdi version) and this is internal libftdi dependency. Libusb is
another method in UrJTAG to access the USB devices not using the
libftdi.

On FreeBSD libusb is rewritten to match BSD license, it is a part of
the system and it use the 0.1 libusb API. Yesterday on Fedora 12 I
have built UrJTAG and as dependency I need to install libftdi that was
already 1.0 using libusb 1.0. On my BSD I have checked if the
libftdi-0.17 program requires linking with the libusb anyway and it
turned true, so it can be difficult to maintain platform independece
and use libftdi-0.x/libusb-0.x and libusb-1.0 at the same time (also
libusb and libusb-win32 have other API???)...

%pkg-config --cflags --libs libftdi
-I/usr/local/include -L/usr/local/lib -lftdi -lusb

Maybe it is possible to use -lusb for libusb-0.x and -lusb1 for
libusb-1.x? Maybe the libftdi programs should link only with -lftdi
and no -lusb for clear separation from libusb?
Im not sure of that, but with my projects Im leaving UBS in favor of
Ethernet because of this inconsistency.

Best regatds,
Tomek
--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Mike Frysinger
2010-06-23 02:23:04 UTC
Permalink
Post by Tomek CEDRO
On FreeBSD libusb is rewritten to match BSD license, it is a part of
the system and it use the 0.1 libusb API. Yesterday on Fedora 12 I
have built UrJTAG and as dependency I need to install libftdi that was
already 1.0 using libusb 1.0. On my BSD I have checked if the
libftdi-0.17 program requires linking with the libusb anyway and it
turned true, so it can be difficult to maintain platform independece
and use libftdi-0.x/libusb-0.x and libusb-1.0 at the same time
if you want to keep libusb-0.x support, then use libusb-compat. this provides
a wrapper for the 0.x API on top of libusb-1.x.

urjtag is sticking to the "real" libusb package (i.e. libusb.org), so the *bsd
replacement might need to catch up. or simply use the real libusb package and
there isnt a problem.
Post by Tomek CEDRO
(also libusb and libusb-win32 have other API???)...
no, they really dont
Post by Tomek CEDRO
Maybe it is possible to use -lusb for libusb-0.x and -lusb1 for
libusb-1.x? Maybe the libftdi programs should link only with -lftdi
and no -lusb for clear separation from libusb?
it wouldnt make a difference because both libraries would be loaded at runtime
due to how shared libraries work
-mike
Xiaofan Chen
2010-06-22 14:14:32 UTC
Permalink
and what about libftdi ?  ./configure --with-libusb=1.0 failed because
libftdi wants to link to libusb-0.1
Firstly since many people here do not use Top Posting style, please
try not using top posting. Thanks.

Indeed if you have libftdi (not libftdi-1.0),
"./configure --with-libusb=1.0 --with-libftdi" will generate an error.
(tested under Ubuntu Linux 9.10 32bit).

checking for LIBUSB1... yes
checking for libusb_get_device_list... yes
checking for LIBFTDI... yes
checking for ftdi_usb_open... yes
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed

But even if I remove libftdi and install libftdi-1.0, it still produce this
error. Strange.

checking for LIBUSB1... yes
checking for libusb_get_device_list... yes
checking for LIBFTDI... yes
checking for ftdi_usb_open... yes
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed

***@ubuntu:~/Desktop/build/urjtag/svn/urjtag/urjtag$ grep
ftdi_read_data_submit /usr/include/libftdi/ftdi.h
struct ftdi_transfer_control *ftdi_read_data_submit(struct
ftdi_context *ftdi, unsigned char *buf, int size);

config.log:

configure:14254: checking for LIBUSB1
configure:14262: $PKG_CONFIG --exists --print-errors "libusb-1.0"
configure:14265: $? = 0
configure:14280: $PKG_CONFIG --exists --print-errors "libusb-1.0"
configure:14283: $? = 0
configure:14319: result: yes
configure:14331: checking for libusb_get_device_list
configure:14331: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 conftest.c -lrt -lreadline
-L/usr/local/lib -lusb-1.0 >&5
configure:14331: $? = 0
configure:14331: result: yes
configure:14385: checking for LIBFTDI
configure:14393: $PKG_CONFIG --exists --print-errors "libftdi"
configure:14396: $? = 0
configure:14411: $PKG_CONFIG --exists --print-errors "libftdi"
configure:14414: $? = 0
configure:14676: result: yes
configure:14682: checking for ftdi_usb_open
configure:14682: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 -I/usr/include/libftdi conftest.c
-lftdi -lrt -lreadline -L/usr/local/lib -lusb-1.0 >&5
configure:14682: $? = 0
configure:14682: result: yes
configure:14699: checking for ftdi_read_data_submit
configure:14699: gcc -std=gnu99 -o conftest -g -O2
-I/usr/local/include/libusb-1.0 -I/usr/include/libftdi conftest.c
-lftdi -lrt -lreadline -L/usr/local/lib -lusb-1.0 >&5
/tmp/cccyfIRk.o: In function `main':
/home/mcuee/Desktop/build/urjtag/svn/urjtag/urjtag/conftest.c:84:
undefined reference to `ftdi_read_data_submit'
collect2: ld returned 1 exit status
configure:14699: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "UrJTAG"
| #define PACKAGE_TARNAME "urjtag"
| #define PACKAGE_VERSION "0.10"
| #define PACKAGE_STRING "UrJTAG 0.10"
| #define PACKAGE_BUGREPORT "http://urjtag.org"
| #define PACKAGE_URL ""
| #define SVN_REVISION "1794"
| #define PACKAGE "urjtag"
| #define VERSION "0.10"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define ENABLE_NLS 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_IOPERM 1
| #define HAVE_GETEUID 1
| #define HAVE_GETUID 1
| #define HAVE_NANOSLEEP 1
| #define HAVE_SWPRINTF 1
| #define HAVE_USLEEP 1
| #define HAVE_LIBRT 1
| #define HAVE_SIGACTION_SA_ONESHOT 1
| #define HAVE_LINUX_PPDEV_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_LIBREADLINE 1
| #define HAVE_READLINE_READLINE_H 1
| #define HAVE_READLINE_HISTORY 1
| #define HAVE_READLINE_HISTORY_H 1
| #define HAVE_READLINE_COMPLETION 1
| #define HAVE_LIBUSB1 1
| #define HAVE_LIBFTDI 1
| /* end confdefs.h. */
| /* Define ftdi_read_data_submit to an innocuous variant, in case
<limits.h> declares ftdi_read_data_submit.
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
| #define ftdi_read_data_submit innocuous_ftdi_read_data_submit
|
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char ftdi_read_data_submit (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef ftdi_read_data_submit
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char ftdi_read_data_submit ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined __stub_ftdi_read_data_submit || defined
__stub___ftdi_read_data_submit
| choke me
| #endif
|
| int
| main ()
| {
| return ftdi_read_data_submit ();
| ;
| return 0;
| }
configure:14699: result: no
configure:14716: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
--
Xiaofan http://mcuee.blogspot.com
Mike Frysinger
2010-06-23 02:16:24 UTC
Permalink
Post by Xiaofan Chen
Indeed if you have libftdi (not libftdi-1.0),
"./configure --with-libusb=1.0 --with-libftdi" will generate an error.
(tested under Ubuntu Linux 9.10 32bit).
as it should
Post by Xiaofan Chen
But even if I remove libftdi and install libftdi-1.0, it still produce this
error. Strange.
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
your libftdi-1.0 is misconfigured then. you most likely forget --with-async-
mode. urjtag is operating correctly.
-mike
Xiaofan Chen
2010-06-23 14:09:15 UTC
Permalink
Post by Xiaofan Chen
But even if I remove libftdi and install libftdi-1.0, it still produce this
error. Strange.
checking for ftdi_read_data_submit... no
configure: error: this libftdi cannot be used with libusb-1.0,
libusb-0.1 is needed
your libftdi-1.0 is misconfigured then.  you most likely forget --with-async-
mode.  urjtag is operating correctly.
You are right. The problem is solved in this case.

The problem is that I am interested in both J-Link and
FT2232 based driver. I could not find a way to enable both.

***@ubuntu64-laptop:~/Desktop/build/urjtag/urjtag/urjtag$
./configure --enable-maintainer-mode --with-libusb=1.0
...

Detected libusb : 1.0
Detected libftdi : yes (have async mode)
Detected libftd2xx : no
Detected inpout32 : no
Build SVF player : yes
Build BSDL subsystem : yes
Bus drivers : arm9tdmi au1500 avr32 bcm1250 bf518f_ezbrd
bf51x bf526_ezkit bf527_ezkit bf52x bf533_stamp bf533_ezkit
bf537_stamp bf537_ezkit bf538f_ezkit bf53x bf548_ezkit bf561_ezkit
bscoach ejtag ejtag_dma fjmem ixp425 ixp435 ixp465 jopcyc h7202
lh7a400 mpc5200 mpc824x mpc837x ppc405ep ppc440gx_ebc8 prototype
pxa2x0 pxa27x s3c4510 sa1110 sh7727 sh7750r sh7751r sharc_21065L
sharc_21369_ezkit slsup3 tx4925 zefant_xs3
Cable drivers : arcom byteblaster dlc5 ea253 ei012 ft2232
igloo keithkoep lattice mpcbdm triton usbblaster wiggler
Lowlevel drivers : direct ftdi ppdev


***@ubuntu64-laptop:~/Desktop/build/urjtag/urjtag/urjtag$
./configure --enable-maintainer-mode --with-libusb --with-libftdi=no
...

jtag is now configured for

Detected libusb : 0.1
Detected libftdi : no (no async mode)
Detected libftd2xx : no
Detected inpout32 : no
Build SVF player : yes
Build BSDL subsystem : yes
Bus drivers : arm9tdmi au1500 avr32 bcm1250 bf518f_ezbrd
bf51x bf526_ezkit bf527_ezkit bf52x bf533_stamp bf533_ezkit
bf537_stamp bf537_ezkit bf538f_ezkit bf53x bf548_ezkit bf561_ezkit
bscoach ejtag ejtag_dma fjmem ixp425 ixp435 ixp465 jopcyc h7202
lh7a400 mpc5200 mpc824x mpc837x ppc405ep ppc440gx_ebc8 prototype
pxa2x0 pxa27x s3c4510 sa1110 sh7727 sh7750r sh7751r sharc_21065L
sharc_21369_ezkit slsup3 tx4925 zefant_xs3
Cable drivers : arcom byteblaster dlc5 ea253 ei012 igloo
jlink keithkoep lattice mpcbdm triton wiggler xpc
Lowlevel drivers : direct ppdev
--
Xiaofan http://mcuee.blogspot.com
Mike Frysinger
2010-06-23 17:00:25 UTC
Permalink
Post by Xiaofan Chen
The problem is that I am interested in both J-Link and
FT2232 based driver. I could not find a way to enable both.
dont use libusb-1.0 then. both work fine with lbusb-0.x. jlink needs fixing
as it only works with libusb-0.x. so someone will have to port it to
libusb-1.x in order to make it work.
-mike
Mike Frysinger
2010-06-23 22:46:40 UTC
Permalink
Post by Mike Frysinger
Post by Xiaofan Chen
The problem is that I am interested in both J-Link and
FT2232 based driver. I could not find a way to enable both.
dont use libusb-1.0 then. both work fine with lbusb-0.x. jlink needs
fixing as it only works with libusb-0.x. so someone will have to port it
to libusb-1.x in order to make it work.
weeeeell i might have misunderstood the libusb-1.0 support in urjtag. which
is to say there isnt any.

support for urjtag on top of libftdi-1.0 on top of libusb-1.0 is there, but
urjtag itself doesnt care about the libusb layer in this configuration.

since i have a new cable driver locally that is directly affected, i'm in the
process of porting urjtag to libusb-1.0 right now. should have it done
soonish. for the other cable drivers (like the jlink), i have no way of
testing them so someone will have to give them a sanity spin.
-mike
Mike Frysinger
2010-06-24 00:38:49 UTC
Permalink
Post by Mike Frysinger
Post by Mike Frysinger
Post by Xiaofan Chen
The problem is that I am interested in both J-Link and
FT2232 based driver. I could not find a way to enable both.
dont use libusb-1.0 then. both work fine with lbusb-0.x. jlink needs
fixing as it only works with libusb-0.x. so someone will have to port it
to libusb-1.x in order to make it work.
weeeeell i might have misunderstood the libusb-1.0 support in urjtag.
which is to say there isnt any.
support for urjtag on top of libftdi-1.0 on top of libusb-1.0 is there, but
urjtag itself doesnt care about the libusb layer in this configuration.
since i have a new cable driver locally that is directly affected, i'm in
the process of porting urjtag to libusb-1.0 right now. should have it
done soonish. for the other cable drivers (like the jlink), i have no way
of testing them so someone will have to give them a sanity spin.
patch is attached that ports urjtag to libusb-1.x. please verify jlink works
before i commit it.
-mike
Xiaofan Chen
2010-06-24 12:49:12 UTC
Permalink
Post by Mike Frysinger
weeeeell i might have misunderstood the libusb-1.0 support in urjtag.
which is to say there isnt any.
support for urjtag on top of libftdi-1.0 on top of libusb-1.0 is there, but
urjtag itself doesnt care about the libusb layer in this configuration.
since i have a new cable driver locally that is directly affected, i'm in
the process of porting urjtag to libusb-1.0 right now.  should have it
done soonish.  for the other cable drivers (like the jlink), i have no way
of testing them so someone will have to give them a sanity spin.
patch is attached that ports urjtag to libusb-1.x.  please verify jlink works
before i commit it.
Thanks. I apply the patch to the latest svn tree and build it with the
following option.

./configure --enable-maintainer-mode --with-libusb=1.0


Now J-Link is listed.

jtag is now configured for

Detected libusb : 1.0
Detected libftdi : yes (have async mode)
Detected libftd2xx : no
Detected inpout32 : no
Build SVF player : yes
Build BSDL subsystem : yes
Bus drivers : arm9tdmi au1500 avr32 bcm1250 bf518f_ezbrd
bf51x bf526_ezkit bf527_ezkit bf52x bf533_stamp bf533_ezkit
bf537_stamp bf537_ezkit bf538f_ezkit bf53x bf548_ezkit bf561_ezkit
bscoach ejtag ejtag_dma fjmem ixp425 ixp435 ixp465 jopcyc h7202
lh7a400 mpc5200 mpc824x mpc837x ppc405ep ppc440gx_ebc8 prototype
pxa2x0 pxa27x s3c4510 sa1110 sh7727 sh7750r sh7751r sharc_21065L
sharc_21369_ezkit slsup3 tx4925 zefant_xs3
Cable drivers : arcom byteblaster dlc5 ea253 ei012 ft2232
ice100 igloo jlink keithkoep lattice mpcbdm triton usbblaster wiggler
xpc
Lowlevel drivers : direct ftdi ppdev

I am totally new to urjtag so firstly I tried to see if ft2232 works.
Somehow it does not seem to work. It seems to me urjtag does
not detach the kernel ftdi_sio driver. I have to manually do it myself.
Still it does not seem to find the cable. Strange.

Newer V7 J-Link seems to work. I do not have a supported target right now.
I only have ARM7 and Cortex M3 boards. So my tests are limited.

Older V3 J-Link does not work. UrJtag may take some codes from
the OpenOCD project to support older J-Link models (V3/V4).

***@ubuntu64-laptop:/sys/bus/usb/drivers/ftdi_sio$ lsusb
...
Bus 003 Device 003: ID 0403:bcd9 Future Technology Devices
International, Ltd Stellaris Evaluation Board
...

***@ubuntu64-laptop:/sys/bus/usb/drivers/ftdi_sio$ ls -la
total 0
drwxr-xr-x 2 root root 0 2010-06-24 20:24 .
drwxr-xr-x 12 root root 0 2010-06-24 20:24 ..
lrwxrwxrwx 1 root root 0 2010-06-24 20:30 3-3:1.1 ->
../../../../devices/pci0000:00/0000:00:04.0/usb3/3-3/3-3:1.1
--w------- 1 root root 4096 2010-06-24 20:30 bind
lrwxrwxrwx 1 root root 0 2010-06-24 20:30 module ->
../../../../module/ftdi_sio
--w------- 1 root root 4096 2010-06-24 20:30 uevent
--w------- 1 root root 4096 2010-06-24 20:30 unbind

***@ubuntu64-laptop:/sys/bus/usb/drivers/ftdi_sio$ echo -n 3-3:1.1 |
sudo tee -a unbind
3-3:1.1

jtag> cable ft2232 vid=0x0403 pid=0xbcd9
Couldn't connect to suitable USB device.
Error: usbconn/libftdi.c:372 usbconn_ftdi_common_open() ftdi/ftd2xx
error: ftdi_usb_open_desc() failed: device not found

jtag> cable jlink (a V7 J-link, ADI OEM)
J-Link initial read failed, don't worry (result=0)
Vref = 3.196 TCK=1 TDI=0 TDO=1 TMS=0 TRES=1 TRST=1
J-Link JTAG Interface ready
jtag> detect
IR length: 4
Chain length: 1
Device Id: 00111011101000000000010001110111 (0x3BA00477)
Unknown manufacturer! (01000111011)

jtag> cable jlink (an old v3 IAR J-Link)
J-Link initial read failed, don't worry (result=0)
J-Link command 0x07 failed (0)
Resetting J-Link. Please retry the cable command.
Error: cable/jlink.c:200 jlink_get_status() libusb error: J-Link
command 0x07 (get status) failed (0)
--
Xiaofan http://mcuee.blogspot.com
Mike Frysinger
2010-06-24 16:30:52 UTC
Permalink
Post by Xiaofan Chen
I am totally new to urjtag so firstly I tried to see if ft2232 works.
Somehow it does not seem to work. It seems to me urjtag does
not detach the kernel ftdi_sio driver. I have to manually do it myself.
Still it does not seem to find the cable. Strange.
urjtag doesnt touch kernel drivers in any way, nor should it matter. FTDI
devices provide two endpoints -- typically only one is needed for the JTAG
device. in which case, the kernel maintains a blacklist of USB VID:PID's so
it only attaches the serial driver to the serial end point and leaves the JTAG
one alone.

ignoring all that, urjtag cant touch drivers since it doesnt run as root (and
if you are running it as root, you're doing it wrong).
Post by Xiaofan Chen
Older V3 J-Link does not work. UrJtag may take some codes from
the OpenOCD project to support older J-Link models (V3/V4).
more importantly, does the cable work *without* my patch and using libusb-0.x
API ? if so, then my changes are irrelevant to this issue and i'll go ahead
and commit them.
Post by Xiaofan Chen
...
Bus 003 Device 003: ID 0403:bcd9 Future Technology Devices
International, Ltd Stellaris Evaluation Board
urjtag only attaches to USB VID:PID's it knows about. certainly the default
USB VID:PID from the FTDI default eeprom will not work, so this is currently
expected behavior. the kernel also cannot know to blacklist either of the
endpoints for the eval board, so you'll need to remove the driver yourself.
Post by Xiaofan Chen
jtag> detect
IR length: 4
Chain length: 1
Device Id: 00111011101000000000010001110111 (0x3BA00477)
Unknown manufacturer! (01000111011)
looks like you should add this part to the urjtag database
-mike
Xiaofan Chen
2010-06-24 23:12:51 UTC
Permalink
Post by Mike Frysinger
ignoring all that, urjtag cant touch drivers since it doesnt run as root (and
if you are running it as root, you're doing it wrong).
Typically I use udev rules to set the permission.
Post by Mike Frysinger
Post by Xiaofan Chen
Older V3 J-Link does not work. UrJtag may take some codes from
the OpenOCD project to support older J-Link models (V3/V4).
more importantly, does the cable work *without* my patch and using libusb-0.x
API ?  if so, then my changes are irrelevant to this issue and i'll go ahead
and commit them.
You can commit the patch. The V3 does not work before your patch
with libusb-0.1.
Post by Mike Frysinger
Post by Xiaofan Chen
...
Bus 003 Device 003: ID 0403:bcd9 Future Technology Devices
International, Ltd Stellaris Evaluation Board
urjtag only attaches to USB VID:PID's it knows about.  certainly the default
USB VID:PID from the FTDI default eeprom will not work, so this is currently
expected behavior.  the kernel also cannot know to blacklist either of the
endpoints for the eval board, so you'll need to remove the driver yourself.
I see. This is the TI/Luminary EK-LM3s1968 demo board.
Post by Mike Frysinger
Post by Xiaofan Chen
jtag> detect
IR length: 4
Chain length: 1
Device Id: 00111011101000000000010001110111 (0x3BA00477)
  Unknown manufacturer! (01000111011)
looks like you should add this part to the urjtag database
It is TI/Luminary Cortex M3 part: LM3S1968. I have the
Olimex LPC-P2148 for NXP LPC-2148 ARM7) board as well.
I do not see the support of these chips in UrJTAG. Maybe
I will try to get some boards supported.
--
Xiaofan http://mcuee.blogspot.com
Mike Frysinger
2010-06-25 02:23:39 UTC
Permalink
Post by Xiaofan Chen
Post by Mike Frysinger
ignoring all that, urjtag cant touch drivers since it doesnt run as root
(and if you are running it as root, you're doing it wrong).
Typically I use udev rules to set the permission.
good man
Post by Xiaofan Chen
Post by Mike Frysinger
Post by Xiaofan Chen
Older V3 J-Link does not work. UrJtag may take some codes from
the OpenOCD project to support older J-Link models (V3/V4).
more importantly, does the cable work *without* my patch and using
libusb-0.x API ? if so, then my changes are irrelevant to this issue
and i'll go ahead and commit them.
You can commit the patch. The V3 does not work before your patch
with libusb-0.1.
thanks, ive done that then
-mike

Loading...