Подключение контролера FTDI к RPI
-
Вообщем то проблема в сабже…
При подключении устройства через USB оно определяется так:
pi@raspberrypi:~$ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 005: ID 0bda:8179 Realtek Semiconductor Corp.в системе появляется устройство /dev/ttyUSB0
pi@raspberrypi:~$ dmesg | grep tty
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0xd0d5ffa6 smsc95xx.macaddr=B8:27:EB:D5:FF:A6 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.000000] console [tty1] enabled
[ 0.533151] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev3
[ 0.896559] console [ttyAMA0] enabled
[ 7.300387] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0Устройство доступно и работает корректно.
Но необходимо установить драйвера D2xx для работы с контроллером. Вот ЭТИ!
Вроде бы всё очевидно. Даже мануал есть вот ТУТ!Проделав все операции на своём Raspberry Pi B всё стало и работало как по инструкции. НО! При попытке повторить тоже самое на Raspberry Pi B+ ничего не вышло. И на моменте компиляции примеров программ для контроллера получил следующие ошибки:
for n in BitMode EEPROM/erase EEPROM/read EEPROM/write EEPROM/user/read EEPROM/user/size EEPROM/user/write Events LargeRead MultiThread SetVIDPID Simple Timeouts ; do make -C $n || exit 1; done
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/BitMode'
gcc main.c -o bitmode -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/BitMode'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/erase'
gcc main.c -o erase -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/erase'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/read'
gcc main.c -o read -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/read'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/write'
gcc main.c -o write -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/write'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/user/read'
gcc main.c -o readua -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/user/read'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/user/size'
gcc main.c -o sizeua -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/user/size'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/EEPROM/user/write'
gcc main.c -o writeua -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/EEPROM/user/write'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/Events'
gcc main.c -o events -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/Events'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/LargeRead'
gcc main.c -o largeread -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/LargeRead'
make[1]: Entering directory '/var/www/ftdid2xx/release/examples/MultiThread'
gcc main.c -o multi -Wall -Wextra -L. -lftd2xx -Wl,-rpath /usr/local/lib
/usr/bin/ld: /tmp/ccs8zbJi.o: undefined reference to symbol 'pthread_join@@GLIBC_2.4'
//lib/arm-linux-gnueabihf/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: ld returned 1 exit status
Makefile:9: recipe for target 'multi' failed
make[1]: *** [multi] Error 1
make[1]: Leaving directory '/var/www/ftdid2xx/release/examples/MultiThread'
Makefile:11: recipe for target 'subdirs' failed
make: *** [subdirs] Error 1Может кто-нибудь сталкивался с данной проблемой?
RPI B+
kernel 3.12.28+