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







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值