On 27/06/2009, Freddie Chopin <freddie_cho...@op.pl> wrote:
>  1. (this one) enable dynamic loading of ftd2xx.dll in ft2232.c
>  2. enable dynamic loading of libusb0.dll in ft2232.c

So why loading libusb rather than libftdi? Is it because libftdi is
only built (or linked to) as a static library on Windows but still
needs the libusb DLL?

>  3. make it possible to have support for both libftdi and ftd2xx at the same
> time in ft2232.c
>
>  n. enable dynamic loading for some other modules - jlink, rlink, presto
>
>  n+1. make it possible to have support for both libftdi and ftd2xx at the
> same time in presto.c
>
>  I can do the same for linux, but as I have no means for testing I'd rather
> pass that to someone else. With help in testing I can try to do that myself.

Maybe it's worth trying something like GNU Libtool's libltdl which is
a wrapper around dlopen (Linux), LoadLibrary (Windows) and apparently
stranger things on other platforms as well. I guess you'd still have
to hard code platform specific file names (ftd2xx.dll vs libftd2xx.so
or similar) but it would get rid of most of the platform specific
code. A disadvantage is the added complexity of yet another library to
link to.

There's a precompiled Windows libltdl3.dll, static library, ltdl.h etc
available from gnu win32:
http://gnuwin32.sourceforge.net/packages/libtool.htm
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to