Somehow I got segmental fault with the find_all_pp example under Mac OS X 10.7.5. This is with the latest git.
Not so sure if this is a libusb Darwin problem or libftdi issue. mymacmini:examples xiaofanc$ pwd /Users/xiaofanc/work/libftdi/libftdi/build/examples mymacmini:examples xiaofanc$ ./find_all_pp -v 0403 -p cff8 Found devices ( VID: 0x403, PID: 0xcff8 ) ------------------------------------------------ Segmentation fault: 11 mymacmini:examples xiaofanc$ gdb --args ./find_all_pp -v 0403 -p cff8 GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug 5 03:00:42 UTC 2012) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ...... done (gdb) run Starting program: /Users/xiaofanc/work/libftdi/libftdi/build/examples/find_all_pp -v 0403 -p cff8 Reading symbols for shared libraries +++++.................................. done Found devices ( VID: 0x403, PID: 0xcff8 ) ------------------------------------------------ Reading symbols for shared libraries . done libusb: 0.000000 info [darwin_open] device open for access Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 0x000000010003821e in libusb_open () (gdb) bt #0 0x000000010003821e in libusb_open () #1 0x0000000100022470 in ftdi_usb_get_strings (ftdi=0x100600120, dev=0x100603c60, manufacturer=0x7fff5fbff540 "\004", mnf_len=512, description=0x7fff5fbff340 "\001", desc_len=512, serial=0x7fff5fbff140 "", serial_len=512) at ftdi.c:416 #2 0x00000001000079fe in Ftdi::Context::get_strings (this=0x7fff5fbff7b0) at /Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:306 #3 0x0000000100007fcf in Ftdi::List::List (this=0x100600610, devlist=0x100600820) at /Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:465 #4 0x0000000100007f1d in Ftdi::List::List (this=0x100600610, devlist=0x100600820) at /Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:469 #5 0x00000001000085c2 in Ftdi::List::find_all (vendor=1027, product=53240) at /Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:629 #6 0x00000001000024fc in main (argc=5, argv=0x7fff5fbff9b8) at /Users/xiaofanc/work/libftdi/libftdi/examples/find_all_pp.cpp:48 (gdb) quit The program is running. Exit anyway? (y or n) y The eeprom example works fine. mymacmini:examples xiaofanc$ ./eeprom -v 0x0403 -p 0xcff8 Chip type 4 ftdi_eeprom_size: 256 0x000: 01 00 03 04 f8 cf 00 02 80 32 08 00 01 00 9a 10 ........ .2...... 0x010: aa 24 ce 12 00 00 00 00 56 00 00 00 00 00 00 00 .$...... V....... 0x020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x090: 00 00 00 00 00 00 00 00 00 00 10 03 41 00 6d 00 ........ ....A.m. 0x0a0: 6f 00 6e 00 74 00 65 00 63 00 24 03 41 00 6d 00 o.n.t.e. c.$.A.m. 0x0b0: 6f 00 6e 00 74 00 65 00 63 00 20 00 4a 00 54 00 o.n.t.e. c. .J.T. 0x0c0: 41 00 47 00 6b 00 65 00 79 00 2d 00 32 00 12 03 A.G.k.e. y.-.2... 0x0d0: 35 00 33 00 54 00 39 00 58 00 44 00 52 00 34 00 5.3.T.9. X.D.R.4. 0x0e0: 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ 0x0f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0e ea ........ ........ VID: 0x0403 PID: 0xcff8 Release: 0x0200 Bus Powered: 100 mA Manufacturer: Amontec Product: Amontec JTAGkey-2 Serial: 53T9XDR4 Checksum : ea0e Attached EEPROM: 93x56 PNP: 1 Channel A has Mode FIFO Channel B has Mode UART AL has 8 mA drive AH has 4 mA drive BL has 4 mA drive BH has 4 mA drive The legacy 0.x branch also works fine. mymacmini:examples xiaofanc$ pwd /Users/xiaofanc/work/libftdi/legacy/libftdi/build/examples mymacmini:examples xiaofanc$ ./find_all_pp -v 0403 -p cff8 Found devices ( VID: 0x403, PID: 0xcff8 ) ------------------------------------------------ FTDI (0x7f923bc0bd70): Amontec, Amontec JTAGkey-2, 53T9XDR4 (Open OK) -- Xiaofan -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
