Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-23 Thread Freddie Chopin
Duane Ellis pisze:
 I want to understand what you are working on.
 
 I believe there are 3 or 4 things needed to make OpenOCD work with a 
 universal inf file for LibUSB really work.
 
 I think of it this way:
 
 (a)   We have a simple text file - with 4 columns.
 
 Column 1 - Vendor ID
 Column 2 - Product ID
 Column 3 - Product Root Device Type, ie:  ft2232 - or - other
 Column 4 - Human Friendly Name.
 
 (b) Perhaps that text file supports # comments.
 
 (c)  Question:  Given the above, how hard would it be to create a 
 *SIMPLE* perl, shell, awk, whatever script to create a generic LibUSB 
 windows inf file - that *LIST* *ALL*  items listed in the simple text 
 file.
 
 (d) If the above is simple - and I believe it is - then packagers of 
 OpenOCD *could* - then package LibUSB0.sys with the INF file.. and the 
 more general problem would be solved.
 
 (d) In effect, a packager *could* only need to copy a pre-built 
 libusb0.sys file into the same directory as the generic 
 openocd-libusb.inf file above.
 
 *THEN* - a prebuilt cygwin user (or mingw user) *could* - re-install 
 the usb driver for their dongle - and specify the 'openocd-libusb.inf' 
 file instead of the default one that came with/from the dongle vendor.

I don't see any point in writing a script which parses some kind of 
table to do such simple task. Adding a new interface is just a matter of 
entering a few (2-4) lines to the inf file:

{name}=LIBUSB_DEV, USB\VID_{vid}PID_{pid}MI_00

Under 2 groups [Devices] and [Devices.NT]. The number of those lines 
will be clarified in the answer to your second post.

So I think a inf file should be included into the tree, not some kind of 
text table with scripts.

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-22 Thread Freddie Chopin
Gene Smith pisze:
 How do I add olimex-arm-usb-ocd device to this inf? And once I have 
 added it, how do you install the driver so it remains permanent (i.e., 
 survives a winXP reboot)?

Just copy the entries for Turtelizer of JTAGkey and change the 
description and VID/PID combinations. Add that to [Devices] and 
[Devices.NT] group

Amontec JTAGkey ( Channel A )=LIBUSB_DEV, USB\VID_0403PID_cff8MI_00
Amontec JTAGkey ( Channel B )=LIBUSB_DEV, USB\VID_0403PID_cff8MI_01

Change the name: Amontec JTAGkey ..., VID (here 0403) and PID (here cff8).

I have Windows 2003 Server Ent.Ed. so that info may not work for XP, but 
there is a way to force some drivers when Windows prefers some other. 
Gerenally the first question is Auto-install or manual install - of 
course manual. Than you can give some path for SEARCHING or select the 
other option (don't search, I'll select myself - or sth like that). 
Than a list of preferred (past) drivers will show up, you select From 
disk and seek the .inf file - this way I'm able to force any driver 
that matches the device.

Maybe this will help you. Don't care too much about the names of 
options / buttons I wrote above - I have Polish OS version, so I'm 
trying to translate that to English.

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-22 Thread Duane Ellis
Freddie,

I want to understand what you are working on.

I believe there are 3 or 4 things needed to make OpenOCD work with a 
universal inf file for LibUSB really work.

I think of it this way:

(a)   We have a simple text file - with 4 columns.

Column 1 - Vendor ID
Column 2 - Product ID
Column 3 - Product Root Device Type, ie:  ft2232 - or - other
Column 4 - Human Friendly Name.

(b) Perhaps that text file supports # comments.

(c)  Question:  Given the above, how hard would it be to create a 
*SIMPLE* perl, shell, awk, whatever script to create a generic LibUSB 
windows inf file - that *LIST* *ALL*  items listed in the simple text 
file.

(d) If the above is simple - and I believe it is - then packagers of 
OpenOCD *could* - then package LibUSB0.sys with the INF file.. and the 
more general problem would be solved.

(d) In effect, a packager *could* only need to copy a pre-built 
libusb0.sys file into the same directory as the generic 
openocd-libusb.inf file above.

*THEN* - a prebuilt cygwin user (or mingw user) *could* - re-install 
the usb driver for their dongle - and specify the 'openocd-libusb.inf' 
file instead of the default one that came with/from the dongle vendor.

-Duane.

___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-22 Thread Xiaofan Chen
On Tue, Jun 23, 2009 at 6:01 AM, Duane Ellisopen...@duaneellis.com wrote:
 Freddie,

 I want to understand what you are working on.

 I believe there are 3 or 4 things needed to make OpenOCD work with a
 universal inf file for LibUSB really work.

 I think of it this way:

 (a)   We have a simple text file - with 4 columns.

 Column 1 - Vendor ID
 Column 2 - Product ID
 Column 3 - Product Root Device Type, ie:  ft2232 - or - other
 Column 4 - Human Friendly Name.

 (b) Perhaps that text file supports # comments.

 (c)  Question:  Given the above, how hard would it be to create a
 *SIMPLE* perl, shell, awk, whatever script to create a generic LibUSB
 windows inf file - that *LIST* *ALL*  items listed in the simple text
 file.

I do not use perl. But I think the above is not that difficult for the
programmers here.

It is not that necessary though. The INF file generated by
libusb-win32 is very easy to understand and the modification
is not that bad even with Notepad. ;-)

 (d) If the above is simple - and I believe it is - then packagers of
 OpenOCD *could* - then package LibUSB0.sys with the INF file.. and the
 more general problem would be solved.

The libusb0.dll file is also necessary. I think the cat file is necessary
as well.

 (d) In effect, a packager *could* only need to copy a pre-built
 libusb0.sys file into the same directory as the generic
 openocd-libusb.inf file above.

 *THEN* - a prebuilt cygwin user (or mingw user) *could* - re-install
 the usb driver for their dongle - and specify the 'openocd-libusb.inf'
 file instead of the default one that came with/from the dongle vendor.


As experienced by Gene Smith and I, sometimes Windows will not
allow this INF file to be installed. In that case, I used the command
line installation method. But Gene Smith mentioned that it may
not survive the reboot. I had not such problem under XP and Vista
32bit.


-- 
Xiaofan http://mcuee.blogspot.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-21 Thread Freddie Chopin
Michael Fischer pisze:
 here is the driver which was build from the SVN r161 (libusb).
 Please test it, it should work with composite devices too.

Works here.

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Universal ft2232 .inf fileforwindows/libusb-win32

2009-06-21 Thread Xiaofan Chen
On Mon, Jun 22, 2009 at 12:19 AM, Freddie Chopinfreddie_cho...@op.pl wrote:
 Michael Fischer pisze:
 here is the driver which was build from the SVN r161 (libusb).
 Please test it, it should work with composite devices too.

 Works here.


Now it is clear to me. Thanks. The SVN 161 version works. The released
0.1.12.1 version does not. I will try to ask in the libusb-win32
mailing list to ask the author to release the current SVN version
as 0.1.12.2 or similar.


-- 
Xiaofan http://mcuee.blogspot.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development