现在的位置: 首页 > 综合 > 正文

openocd0.6.0的安装与配置

2013年07月01日 ⁄ 综合 ⁄ 共 1479字 ⁄ 字号 评论关闭

1. openocd0.6.0安装

1.1. 源码下载

    下载代码主要有两种方式:
    1.从openocd的官网(http://openocd.berlios.de/web/) 上下载官方发布的最新版本(0.5.0),下载网址(http://developer.berlios.de/projects/openocd/) ,openocd的使用文档的下载地址为http://openocd.berlios.de/web/documentation/online-docs/
    这种代码获取方式下,解压后里面直接就有配置器脚本configure
    2.获取官方正在维护的最新代码(http://repo.or.cz/w/openocd.git) ,openocd采用的是git进行代码维护。使用git工具将代码clone下来,git工具安装方法 

sudo apt-get install git

    获取openocd代码的命令:
    首先cd定位到你需要git代码的位置然后执行如下命令
    

git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd

1.2. 源码编译安装

    git完以后,定位到openocd代码的目录下执行如下命令 

sudo apt-get install autoconf
 $ ./bootstrap   //这个命令主要是用于生成configure文件的,同时git出一些相关的代码

1.2.1.安装驱动

在源码编译的过程中需要使用到一些电脑上没有的库文件,另外还需要OpenJtag的驱动,所以需要事先安装:

sudo  apt-get  install  libftdi-dev  libftdi1  libtool  git-core  asciidoc

1.2.2. configure

    关于配置器的使用方法 可以直接运行如下命令
   

 ./configure --help
    ./configure --enable-maintainer-mode \
                --enable-ft2232_libftdi
                --enable-maintainer-mode     //enable make rules and dependencies not useful  (and sometimes confusing) to the casual installer 采用最舒适的配置方式
                --enable-ft2232_libftdi      //Enable building support for FT2232 based devices using the libftdi driver, opensource alternate of FTD2XX 采用FTD2XX开源

1.2.3. make

    执行如下命令:

make

        在编译过程中会提示缺少"makeinfo"文件,可以通过安装texinfo解决:

sudo apt-get install texinfo

1.2.4. make install

    编译完毕后,在源码目录下的src目录下可以找到最后生成的执行文件openocd,将openocd安装到系统目录的方式的命令如下:

sudo make install

    安装完成后就可以使用一下命令查看版本:

 openocd -v

    显示如下:

Open On-Chip Debugger 0.6.0-dev-00278-gb7ce3b5 (2011-12-09-14:22)
	Licensed under GNU GPL v2
	For bug reports, read

http://openocd.sourceforge.net/doc/doxygen/bugs.html
【上篇】
【下篇】

抱歉!评论已关闭.