libftdi Archives

Subject: Re: libftdi 1.x getting closer

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 2 Sep 2012 21:54:41 +0800
On Sun, Sep 2, 2012 at 9:39 PM, Xiaofan Chen <xiaofanc@xxxxxxxxx> wrote:
> On Sun, Jul 29, 2012 at 12:19 AM, Thomas Jarosch
> <thomas.jarosch@xxxxxxxxxxxxx> wrote:
>> Hey there,
>>
>> I've finally merged the "renames-for-release" branch into master.
>> This was the largest TODO entry left before we can do
>> an official libftdi 1.x release.
>>
>> You will probably need to adapt your configuration scripts / cmake files
>> to pick up "libftdi1" instead of "libftdi".
>>
>> "libftdi-config" is now called "libftdi1-config",
>> same goes for the pkconfig files.
>>
>> Please give the "master" branch some testing.
>
> The python wrapper seems to fail to be built under Mac OS X
> here (10.7.4 Lion, Homebrew).

The example eeprom runs well.

Somehow find_all_pp causes segmentation for my machine.
Strange.

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


mymacmini:examples xiaofanc$ ./find_all_pp -v 0x0403 -p 0xcff8
Found devices ( VID: 0x403, PID: 0xcff8 )
------------------------------------------------
Segmentation fault: 11

mymacmini:examples xiaofanc$ ./find_all_pp -v 0x0403 -p 0xcff8
Found devices ( VID: 0x403, PID: 0xcff8 )
------------------------------------------------
Segmentation fault: 11
mymacmini:examples xiaofanc$ gdb --args ./find_all_pp -v 0x0403 -p 0xcff8
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 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
0x0403 -p 0xcff8
Reading symbols for shared libraries
+++++.................................. done
Found devices ( VID: 0x403, PID: 0xcff8 )
------------------------------------------------
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
0x000000010003acb0 in usbi_add_pollfd ()
(gdb) bt
#0  0x000000010003acb0 in usbi_add_pollfd ()
#1  0x0000000100040e78 in darwin_open ()
#2  0x0000000100038a3e in libusb_open ()
#3  0x0000000100022470 in ftdi_usb_get_strings (ftdi=0x10010a230,
dev=0x102103ae0, manufacturer=0x7fff5fbff4d0 "?", mnf_len=512,
description=0x7fff5fbff2d0 "\001", desc_len=512, serial=0x7fff5fbff0d0
"\001", serial_len=512) at ftdi.c:416
#4  0x00000001000079fe in Ftdi::Context::get_strings
(this=0x7fff5fbff740) at
/Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:306
#5  0x0000000100007fcf in Ftdi::List::List (this=0x10010a170,
devlist=0x100109fa0) at
/Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:465
#6  0x0000000100007f1d in Ftdi::List::List (this=0x10010a170,
devlist=0x100109fa0) at
/Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:469
#7  0x00000001000085c2 in Ftdi::List::find_all (vendor=1027,
product=53240) at
/Users/xiaofanc/work/libftdi/libftdi/ftdipp/ftdi.cpp:629
#8  0x00000001000024fc in main (argc=5, argv=0x7fff5fbff948) at
/Users/xiaofanc/work/libftdi/libftdi/examples/find_all_pp.cpp:48
(gdb) quit
The program is running.  Exit anyway? (y or n) y

-- 
Xiaofan

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread