openOCD在ubuntu16.04上的安装

前端之家收集整理的这篇文章主要介绍了openOCD在ubuntu16.04上的安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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 v2
For bug reports,read
	http://openocd.org/doc/doxygen/bugs.html


一些错误

错误1:./bootstrap 报错:

+ automake --gnu --add-missing --copy
src/Makefile.am:4: error: bad characters in variable name '%C%_openocd_SOURCES'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:7: error: bad characters in variable name '%C%_libopenocd_la_SOURCES'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:11: error: bad characters in variable name '%C%_openocd_LDADD'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:13: error: bad characters in variable name '%C%_openocd_LDADD'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:16: error: bad characters in variable name '%C%_openocd_LDADD'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:18: error: bad characters in variable name '%C%_openocd_LDADD'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:21: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:26: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:27: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'
Makefile.am:143:   'src/Makefile.am' included from here
src/Makefile.am:29: error: bad characters in variable name '%C%_libopenocd_la_CPPFLAGS'
Makefile.am:143:   'src/Makefile.am' included from here
src/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
+ autoconf
configure.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_SHARED
configure.ac:37: error: possibly undefined macro: AC_PROG_LIBTOOL
configure.ac:204: error: possibly undefined macro: AC_DEFINE
configure.ac:608: error: possibly undefined macro: AC_MSG_NOTICE

缺少libtool和libsysfs-dev

安装:

sudo apt-get install libtool  
libsysfs-dev
原文链接:https://www.f2er.com/ubuntu/350576.html

猜你在找的Ubuntu相关文章