Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1920277
  • 博文数量: 261
  • 博客积分: 8073
  • 博客等级: 中将
  • 技术积分: 2363
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-10 15:23
文章分类

全部博文(261)

文章存档

2013年(1)

2012年(1)

2011年(50)

2010年(34)

2009年(4)

2008年(17)

2007年(55)

2006年(99)

分类:

2007-11-30 21:20:38

1 环境概述
  1.1 硬件环境
  1.2 软件环境
2 GDB的建立
3 调试
====================================================================================
1 环境概述
  1.1 硬件环境
      主机:Vmare 5.5.1(映射两个主机串口和一个主机并口)
      目标机:Xilinx公司Spartan-3系列FPGA芯片XC3S400-PQ208
     附件:电源、JTAG线、串口对接线、USB连接线
  1.2 软件环境
     主机操作系统:Fedora Core 6
     工具软件:
minicom
2 GDB的建立
  由于使用GCC4.×的编译器(FC6提供的gcc4.1.1)编译gdb-5.3会产生一些列的问题,见OR1K GNU TOOLCHAIN的建立,所以需要打上FC6提供的gcc3的包:compat-gcc-32???.rpm
  # rpm -ivh compat-gcc-32???.rpm
  # tar zxvf gdb-5.3.tar.gz
  # cd gdb-5.3
  # bzcat gdb-5.3.patch.bz2 | patch -p1
  # cd ..
  # mkdir b-gdb
  # cd b-gdb
  # ../gdb-5.3/configure --target=or32-elf
  # vi Makefile
修改 GCC=gcc34
  # make all
  # cp gdb/gdb /opt/or32-elf/bin/or32-elf-gdb
3 调试
  首先设置minicom,详见minicom使用的一些问题。打开minicom:
  终端1:
    # minicom
  终端2:
    # jp xpc3 9999
  终端3:
    # or32-elf-gdb hello.or32
    #(gdb) target jtag jtag://localhost:9999
    #(gdb) load
    #(gdb) set $PC=0x100
    #(gdb) c
    continuing
注:在#(gdb) target jtag jtag://localhost:9999一步时,曾经出现了
Unable to read hostname: Resource temporily Unavailable
Can not Jtag Proxy...

   这是由于在/etc/hosts文件种没有将localhost与127.0.0.1映射。只要在该文件添加
127.0.0.1  localhost.domain  localhost

   即可
阅读(1797) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-11-07 11:35:14

我说的target jtag jtag://localhost:9999 的问题已经自己解决了 呵呵

chinaunix网友2008-11-06 16:36:03

target jtag jtag://localhost:9999 有问题 我用的是altera公司的ep2c35系列FPGA 在做hello world中,在将文件编译后,然后 cd jtag , ./jp1 abb2 9999 后,出现了期望的端口378的链接通信,我使用的并口的abb2,然后进行下载hello world 程序,在运行target jtag jtag://localhost:9999 时,第一次出现了“unkown host”,解决是在./etc/hosts下添加了192.168.58.111 localhost.domain localhost,在运行了又出现了“jtag_connect_to_server:connect failed erron=101 network is unreachable" 现在无法解决问题,请教你