openOCD在ubuntu16.04上的安装

来源:互联网 发布:android网络访问404 编辑:程序博客网 时间:2024/05/03 04:25

OPENOCD适用于微处理器的debug和烧写。


1.下载相关库:

sudo apt-get install build-essential pkg-config autoconf automake libtool libusb-dev libusb-1.0-0
-dev libhidapi-dev
sudo apt-get install libtool  libsysfs-dev


2.下载openocd源码:


git clone git://git.code.sf.net/p/openocd/code openocd

3.编译并安装openocd:

cd openocd
sudo ./bootstrap
sudo ./configure
make
sudo make install

4.测试是否安装成功:

openocd --version

测试如下:

Open On-Chip Debugger 0.10.0+dev-00207-g4109263 (2017-11-14-20:14)Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.html


一些错误:


错误1:./bootstrap 报错:

+ automake --gnu --add-missing --copysrc/Makefile.am:4: error: bad characters in variable name '%C%_openocd_SOURCES'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:7: error: bad characters in variable name '%C%_libopenocd_la_SOURCES'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:11: error: bad characters in variable name '%C%_openocd_LDADD'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:13: error: bad characters in variable name '%C%_openocd_LDADD'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:16: error: bad characters in variable name '%C%_openocd_LDADD'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:18: error: bad characters in variable name '%C%_openocd_LDADD'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:21: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:26: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:27: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:29: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'Makefile.am:143:   'src/Makefile.am' included from heresrc/Makefile.am:30: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'Makefile.am:143:   'src/Makefile.am' include


缺少超级用户权限:


sudo ./bootstrap



错误2:

+ aclocal+ libtoolize --automake --copy+ autoconfconfigure.ac:12: error: possibly undefined macro: AC_MSG_WARN      If this token and others are legitimate, please use m4_pattern_allow.      See the Autoconf documentation.configure.ac:36: error: possibly undefined macro: AC_DISABLE_SHAREDconfigure.ac:37: error: possibly undefined macro: AC_PROG_LIBTOOLconfigure.ac:204: error: possibly undefined macro: AC_DEFINEconfigure.ac:608: error: possibly undefined macro: AC_MSG_NOTICE

缺少libtool和libsysfs-dev

安装:

sudo apt-get install libtool  libsysfs-dev







原创粉丝点击