On Sun, 2009-06-28 at 12:50 +0200, Freddie Chopin wrote: > Dominic pisze: > > It isn't possible with the current ft2232.c code because it uses > > conditional compilation to compile either with libftdi or FTD2XX. While > > offering basically the same functionality there are not only syntactical > > but also semantical differences. If ft2232.c was to support both > > libraries in one binary there would be some rework required. I'm not > > sure if that effort is worth it since ftd2xx might eventually go away in > > the not too distant future. > > I never said that supporting both "drivers" at once is just a matter of > removing these: > > #if (BUILD_FT2232_FTD2XX == 1 && BUILD_FT2232_LIBFTDI == 1) > #error "BUILD_FT2232_FTD2XX && BUILD_FT2232_LIBFTDI are mutually exclusive" > #elif (BUILD_FT2232_FTD2XX != 1 && BUILD_FT2232_LIBFTDI != 1) > #error "BUILD_FT2232_FTD2XX || BUILD_FT2232_LIBFTDI must be chosen" > #endif > > I know that the code would need reworking, but if the maintainers of the > project don't want such changes that's fine for me. Maybe I didn't dig > into the code enough, but I think that such reworking is not impossible, > and not extremely hard.
Building both is actually a build system problem. I believe the automake documentation shows how to build a single source file using different configuration options.... So, symbols similar to those you show above would be defined as extra -D in the automake rules for the targets. I really think that this kind of rework should be fairly easy, if time consuming to get exactly right. Modular driver support _has_ been discussed in the past, to the extent that it was put on the TODO list long ago. :) Cheers, Zach _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development