On Wed, Feb 20, 2013 at 10:09 AM, Xiaofan Chen <[email protected]> wrote: > For Python 2.7, the answer is not to mess with the def file like the > Stackoverflow link, rather the right answer is to add -DMS_WIN64 > to the CMake flags. > > Ref: http://permalink.gmane.org/gmane.comp.gnu.mingw.w64.general/6858 > ++++++++++++++++ > From Ruben. > " add -DMS_WIN64 > to your module compilation. This will fix all of your problems (it fixed > mine when building gdb with Python support). > > Note that no manual editing of def files should be done" > ++++++++++++++++ > > After that,the module can be loaded. I need to carry out some > tests with real device to see if that works. > >> Then I tried Python 3.3 and it seems to go fine when building the >> Python bindings. But then it failed to load the module and says >> that "Python.exe has stopped working". > > I will try again as well using -DMS_WIN64.
Yes both works fine. Take note for WinUSB driver, you need to use the latest libusbx.git. libusbk.sys driver is also okay, but not libusb0.sys driver. C:\work\libftdi\libftdi\examples\python>c:\Python27\python.exe Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() C:\work\libftdi\libftdi\examples\python>c:\Python33\python.exe Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() C:\work\libftdi\libftdi\examples\python>set path=c:\Python33;%path C:\work\libftdi\libftdi\examples\python>c:\Python33\python.exe simple.py C:\work\libftdi\libftdi\examples\python>c:\Python33\python.exe simple.py [FTDI version] major: 1, minor: 0, micro: 0, version_str: 1.0, snapshot_str: v1. 0-6-gafb9082 ftdi.usb_open(): 0 ftdi.set_baudrate(): 0 C:\work\libftdi\libftdi\examples\python>c:\Python33\python.exe complete.py version: 1.0 devices: 1 #0: manufacturer="FTDI" description="FT232R USB UART" serial="A8007Ub5" turning everything on turning everything off enabling bit #0 (0x01) enabling bit #1 (0x02) enabling bit #2 (0x04) enabling bit #3 (0x08) enabling bit #4 (0x10) enabling bit #5 (0x20) enabling bit #6 (0x40) enabling bit #7 (0x80) pins: 0xff chip id: 30b7ef1 eeprom @ 1: 0x0403 eeprom: 00 40 03 04 01 60 00 00 a0 2d 08 00 00 00 98 0a a2 20 c2 12 23 10 05 00 0a 03 46 00 54 00 44 00 49 00 20 03 46 00 54 00 32 00 33 00 32 00 52 00 20 00 55 00 53 00 42 00 20 00 55 00 41 00 52 00 54 00 12 03 41 00 38 00 30 00 30 00 37 00 55 00 62 00 35 00 c9 bf 1c 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 23 device closed C:\work\libftdi\libftdi\examples\python>set path=c:\Python27;%path C:\work\libftdi\libftdi\examples\python>c:\Python27\python.exe simple.py [FTDI version] major: 1, minor: 0, micro: 0, version_str: 1.0, snapshot_str: v1. 0-6-gafb9082 ftdi.usb_open(): 0 ftdi.set_baudrate(): 0 C:\work\libftdi\libftdi\examples\python>c:\Python27\python.exe complete.py version: 1.0 devices: 1 #0: manufacturer="FTDI" description="FT232R USB UART" serial="A8007Ub5" turning everything on turning everything off enabling bit #0 (0x01) enabling bit #1 (0x02) enabling bit #2 (0x04) enabling bit #3 (0x08) enabling bit #4 (0x10) enabling bit #5 (0x20) enabling bit #6 (0x40) enabling bit #7 (0x80) pins: 0xff chip id: 30b7ef1 eeprom @ 1: 0x0403 eeprom: 00 40 03 04 01 60 00 00 a0 2d 08 00 00 00 98 0a a2 20 c2 12 23 10 05 00 0a 03 46 00 54 00 44 00 49 00 20 03 46 00 54 00 32 00 33 00 32 00 52 00 20 00 55 00 53 00 42 00 20 00 55 00 41 00 52 00 54 00 12 03 41 00 38 00 30 00 30 00 37 00 55 00 62 00 35 00 c9 bf 1c 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f 23 device closed -- Xiaofan -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
