- 下载openocd
http://openocd.org/
2.解压
unzip openocd-0.10.0.zip
-
配置
./configure --enable-ftdi --enable-openjtag
报错,提示需要安装libftdi -
安装libftdi
略 -
继续配置
./configure --enable-ftdi --enable-openjtag
报错,提示找不到libusb-1
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices
安装libftdi的时候已经安装过libusb-1.0了,应该是路径问题
我的libusb-1.0安装在/usr/local/lib下
控制台执行如下命令
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH
再次执行./configure --enable-ftdi --enable-openjtag,通过
- 编译安装
make
make install