openic Posted September 19, 2013 Report Share Posted September 19, 2013 Hello, Jack.thanks for your good project for Papilio.I am working on Windows, and I want to build Papilio Loaderby mingw32.I install cygwin for the unix-like environment and i686-pc-mingw32 for the building utils. I don't like cygwin-gcc becase itdepends on cygwin1.dll. so come to the source I enter the command on the shell:./configure --host=i686-pc-mingw32 (May be cygwin and mingw32 also are cross-compile?).Everythings go well except the linking of ftdi2 library.I found that the configure execute the script of PKG_CHECK_MODULESbut I want to execute the upper branch.I don't known what is the result of 'test -n "$host_alias"', and can anybody tell me what is the build option of cygwin?That is how to ensure ./configure --build=?? I have adjust the LIBS varirant to "$LIBS -L. -lftd2xx" and the exe generated:#if test -n "$host_alias" ; then # I see the terminal that host_alias = i686-pc-mingw32, but.. AC_DEFINE([WINDOWS], 1, [Cross-compiling for windows])LIBS="$LIBS -L. -lftd2xx"#else# PKG_CHECK_MODULES([libftdi1], [libftdi >= 0.19],# [CPPFLAGS=$CPPFLAGS $libftdi1_CFLAGS";# LIBS="$LIBS $libftdi1_LIBS])#fi You should add CXXFLAGS="-static-libgcc -static-libstdc++" in the configure.ac, if not the papilio-prog.exe still need the libgcc and libstdc++ dll for mingw32. I have found a project to configure the eeprom of ftdi devices whichis called ftdi-eeprom. I want to add to Papilio Loader. And the FTDI port can be configure to be a fifo, which can be used to connect the resource of the FPGA and the pc.Just like the DigilentAdept or Terasic Control Panel. Link to comment Share on other sites More sharing options...
Jack Gassett Posted September 19, 2013 Report Share Posted September 19, 2013 Hello openic, I've always built the windows binaries under linux, the project is setup to create linux binaries and to cross compile to create windows binaries from the linux command line... There have been times that I've compiled under windows and here are the old notes I have, I can't guarantee they will work though: From windows command prompt with mingw:mingw32-g++ -DWINDOWS *.cpp -o butterfly_prog.exe -L. -lftd2xx -static-libgcc -static-libstdc++ Under cygwin with g++:g++ *.cpp -o butterfly_prog.exe -L. -lftd2xx Jack Link to comment Share on other sites More sharing options...
mkarlsson Posted September 19, 2013 Report Share Posted September 19, 2013 I am working on Windows, and I want to build Papilio Loaderby mingw32.I install cygwin for the unix-like environment and i686-pc-mingw32 for the building utils. I don't like cygwin-gcc becase itdepends on cygwin1.dll. so come to the source I enter the command on the shell:./configure --host=i686-pc-mingw32 (May be cygwin and mingw32 also are cross-compile?).Everythings go well except the linking of ftdi2 library.I found that the configure execute the script of PKG_CHECK_MODULESbut I want to execute the upper branch.I don't known what is the result of 'test -n "$host_alias"', and can anybody tell me what is the build option of cygwin?That is how to ensure ./configure --build=?? I have adjust the LIBS varirant to "$LIBS -L. -lftd2xx" and the exe generated:#if test -n "$host_alias" ; then # I see the terminal that host_alias = i686-pc-mingw32, but.. AC_DEFINE([WINDOWS], 1, [Cross-compiling for windows])LIBS="$LIBS -L. -lftd2xx"#else# PKG_CHECK_MODULES([libftdi1], [libftdi >= 0.19],# [CPPFLAGS=$CPPFLAGS $libftdi1_CFLAGS";# LIBS="$LIBS $libftdi1_LIBS])#fi You should add CXXFLAGS="-static-libgcc -static-libstdc++" in the configure.ac, if not the papilio-prog.exe still need the libgcc and libstdc++ dll for mingw32. Hi openic, You can compile it directly in msys using a simple gcc make file. No need for cygwin, autogen, automake, autoconfig, perl, aclocal, etc, etc, etc,, you just compile the individual pieces and then link it together with the ftd2xx lib. I have attached a zip file with everything needed to compile it on msys. The Make file I use looks like this:GCC = g++ -I.DEFINES =CPPFLAGS = -g -Wall -O2INCPATH = LINK = g++ -staticLFLAGS = -g -O2LIBS = -L. -lftd2xxpapilio-prog: butterfly.o jtag.o iobase.o ioftdi.o bitfile.o tools.o devicedb.o progalgspi.o progalgxc3s.o $(LINK) $^ -o $@ $(LIBS)butterfly.o: butterfly.cpp io_exception.h jtag.h ioftdi.h devicedb.h progalgxc3s.h progalgspi.h bitfile.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o butterfly.o butterfly.cpp bitfile.o: bitfile.cpp bitfile.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o bitfile.o bitfile.cppioftdi.o: ioftdi.cpp ioftdi.h io_exception.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o ioftdi.o ioftdi.cppjtag.o: jtag.cpp jtag.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o jtag.o jtag.cppiobase.o: iobase.cpp iobase.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o iobase.o iobase.cppdevicedb.o: devicedb.cpp devicedb.h devlist.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o devicedb.o devicedb.cpptools.o: tools.cpp tools.h config.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o tools.o tools.cppprogalgxc3s.o: progalgxc3s.cpp progalgxc3s.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o progalgxc3s.o progalgxc3s.cppprogalgspi.o: progalgspi.cpp progalgspi.h config.h $(GCC) -c $(CPPFLAGS) $(INCPATH) -o progalgspi.o progalgspi.cppclean: rm -rf *.o *.exeAs for configuring the FTDI eeprom, you can also use FT_PROG which is the eeprom management program from FTDI. The FIFO mode is pretty cool but not available on Papilio-One or Papilio-Pro boards since the wires needed for that is not connected from the FTDI chip to the FPGA, only serial RX and TX wires are are hooked up. Magnuspapilio-prog-win.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.