基于JTAG标准的通用交叉调试代理的设计和实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
交叉调试代理是嵌入式交叉调试系统的重要组成部分,也是使用最为普遍的一种调试方式。但无论是调试桩程序、调试服务器还是ROM Monitor、Rom Emulator这样一些交叉调试代理,它们最大的缺点是占用目标系统的资源,消耗处理器时间,造成应用程序的最终运行环境和调试环境有差异;且影响被调试程序的运行。ICE通过替代目标机处理器的方式来调试程序,能消除这一影响;但针对专门的处理器定制的ICE价格非常昂贵,使得开发成本非常高。基于片上调试技术的在线仿真器大大降低了成本,但通用性仍然不够强。因此,对基于片上调试技术的通用在线仿真器的研究仍然是一种较前沿的工作。国外的通用在线仿真器产品虽然技术较为成熟,并且稳定可靠,但价格仍然相当昂贵,而限于资金投入和市场的原因,国内很少有通用在线仿真器的研究成果。
     本文在分析调试代理技术、片上调试技术和基于片上调试技术的通用在线仿真器产品的基础上,借鉴通用在线仿真器的仿真调试方法,利用片上调试技术,将调试代理从目标系统中独立出来,以弥补调试代理本身的缺陷。方案中选择了目前大多数嵌入式处理器芯片都支持的JTAG标准,采用具有良好发展趋势的SOPC技术,设计了一种通用调试代理结构模型。该模型已以ARM7TDMI为目标处理器完成了验证实现过程。
     文中所研制的调试代理具有设置断点、单步运行、连续运行、读写寄存器、读写内存等基本仿真功能。对不同的目标处理器,只需要更改目标处理器相关部分的程序代码,而保持硬件本身以及JTAG标准实现部分代码不变,理论上可以调试任意的支持JTAG标准的目标处理器。
     本文所设计的调试代理具有两大特色,特色一:调试代理利用片上调试技术从目标系统中独立出来,具有独立性,避免了对目标机的影响;特色二:调试代理的通用性。它体现在两点上:一是利用SOPC技术,软硬件设计相结合来实现整个系统,使得本设计模型具有通用性;二是此调试代理可以调试所有支持JTAG标准的处理器。
Cross Debugging Agent,including debugging stub, debugging server, ROM Monitor and Rom Emulator, is an important component for the embedded cross debugging system. It is also the most widely-used method. Its biggest weakness is that the resources of target system and the time of processor are occupied. It influents the executing result of target procedures because of the difference between the ultimate target environment and the debugging environment. In Circuit Emulator can eliminate this effect by replacing the target processor, but a specific ICE is needed for each target processor and the price is high. Debugging technique based on On-Chip-Debugging makes up for the weakness, while it’s not generic enough.Research of generic ICE based on OCD is still a front work. Although foreign generic ICE products are mature and stable, costs of them are still high. As the factors of fund and market, there have been very few domestic research on ICE.
     Based on the analysis of debugging agent, OCD technique and generic ICE products based on OCD technique, a generic debugging agent solution is proposed.It can make up for the shortage of debugging agent by separating the cross debugging agent from the target system using OCD technique. JTAG is selected as it is currently supported by the majority of embedded processor chips. By the solution, a generic debugging agent model is designed by using SOPC technology. The model is realized taking ARM7TDMI as the target processor.
     This generic debugging agent has the following basic functions: setting up breakpoints, single-step operation, continuous operation, reading and writing registers and memory, etc. Applying to different embedded processors, the only thing is to change the code relating to target processor in debugging agent. In the result, the debugging agent is capable to debug different kinds of target processors supporting JTAG.
     There are two important characteristics for this debugging agent. One is the independence. Influences are eliminated by separating the debugging agent from the target system. The other is the universality, which refers to that the model is generic and it can debug all the processors supporting JTAG.
引文
[1]. 何希顺,张跃,何荣森,嵌入式系统中的 JTAG 接口编程技术,电子技术应用
    [2]. 桑楠,嵌入式系统原理及应用开发技术,北京航空航天大学出版社,2002.4
    [3]. Stan Shebs, GDB Internals, http://sourceware.cygnus.com/gdb/gdbint_toc.html
    [4]. Beijing Microtec Research Tech Corp,嵌入式系统设计工具和平台
    [5]. Seungwoo Son, Chaedeok Lim, Debugging Protocol for Remote Cross Development Environment, IEEE, 2000
    [6]. 陈文智等,嵌入式系统开发原理与实践 2005.8,清华大学出版社
    [7]. YoungJoon Byun, Young-Sik, High-Level CHILL Debugging System Cross-Development Environments, 1998, IEEE
    [8]. Richard Stallman, Stan Shebs, Debugging With GDB, The GNU Source-Level Debugger.
    [9]. 尹立孟,嵌入式应用交叉调试器的设计与实现[硕士学位论文],电子科技大学,2001
    [10]. 李伯成,单片机及嵌入式系统,清华大学出版社,2005.2
    [11]. 陈渝,李明,杨晔等著,源码开放的嵌入式系统软件分析与实践——基于 SkyEye 和 ARM 开发平台,北京航空航天大学出版社,2004.09
    [12]. Jack Ganssle, Introduction to In-Circuit Emulators. http://www.embedded.com/story
    [13]. 张雁,马中,一种嵌入式系统调试环境的设计与实现,武汉数字工程研究所
    [14]. Introduction to On-Chip Debug, Arnold berger, Michael Barr,http://www.embedded.com/story
    [15]. Gregory Eakman. Strategies for Debugging Embedded Systems http://www.embedded.com/papers/Embedded ystems Programming
    [16]. 魏洪兴,基于 ARM 的嵌入式系统教学与科研应用,北京航空航天大学,2004
    [17]. Jonathan B.Rosenberg . How debuggers work: Algorithms, data structures and architecture.Willey computing Publishing, ISBN 0-471-14966-7.1996
    [18]. 罗蕾,嵌入式实时操作系统及应用开发,北京航空航天大学出版社,2005.1
    [19]. Tornado Debugger User’s Guide and Reference,WindRiver System Inc
    [20]. Jack Ganssle, The State of the Art of Debuggers, http://www.embedded.com
    [21]. 杨峰,张根宝,田泽,万永波,基于 JTAG 的 ARM 芯片系统调试,《微计算机信息》2005 年第 21 卷第 11-2 期
    [22]. Jack Ganssle,Trends In Debugging, http://www.embedded.com/1999
    [23]. 李剑,赵鹏,程汤等,32 位 ARM 嵌入式处理器的调试技术,电子技术应用,2003.3
    [24]. IEEE Standard Test Access Port and Boundary-Scan Architecure, IEEE Std 1149-2001
    [25]. 简敬元,龙占超,针对 Motorola 微处理器的 BDM 调试系统的设计,现代电子技术,2004年,第 6 期
    [26]. 宋睿宁,杨家玮,王炫.使用 BDM 对 MPC860 进行调试.电子科技,2004 年,第 5 期
    [27]. [美]Arnold Berger 著,吕骏译.嵌入式系统设计(Embedded Systems Design).电子工业出版社,2002.9
    [28]. Michael Keating 著,片上系统---可重用设计方法学(第三版).电子工业出版社出版,2004
    [29]. Cadence Design Systems, Prakash Rhushka,System-on-a-chip verifacation ---methodolgy and Technology,Kuluwer Academic Publisher
    [30]. 魏少军,清华大学微电子所,SOC 设计方法学,电子产品世界
    [31]. 任晓东,文博.CPLD/FPGA 高级应用开发指南.电子工业出版社,2003
    [32]. 黄忠涛,基于 NIOS 软核处理器的嵌入式系统设计,硕士学位论文,西南石油学院,2004.4
    [33]. Wayne H. Wolf "Hardware-Software Co-Design of Embedded Systems",IEEE. Vol.82_ No.7. nn.967-988, Julv 1994
    [34]. 陈秀玲,周欣,陈黎平,新的片上可编程系统(SOPC)解决方案 NIOS,今日电子,2003
    [35]. 陈英梅,王东,赵明君.基于 NIOS 软核的 SOPC 系统设计.西安通信学院学报,2004 年 04期
    [36]. 杨恒,ARM 嵌入式系统设计及实践(Design and PractICE of Embedded System on ARM),西安电子科技大学出版社,2005.10
    [37]. 周立功等,ARM 与嵌入式系统实验教程(1),北京航空航天大学出版社,2004
    [38]. 李驹光,聂雪媛,江泽明,王兆卫,ARM 应用系统开发详解――基于 S3C4510B 的系统设计,清华大学出版社,2003
    [39]. ARM7TDMI_technical reference manual, ARM Corp, 2001
    [40]. OPEN-JTAG 开发小组,ARM JTAG 调试原理,http://twentyone.blogchina.com, 2004.10
    [41]. 傅丰林主编,NIOSⅡ 软核心嵌入式处理器设计大赛优秀作品精选,西安电子科技大学出版社,2005.3
    [42]. Alters Corporation. NIOS Embedded Processor 32-bit Programmer's Reference Manual Http://www.ALTERA.com/literature/manual 2003.
    [43]. 周博,邱卫东等,挑战 SOC—基于 NIOS 的 SOPC 设计与实践,清华大学出版社,2005.5
    [44]. 郭书军,王玉花,葛纫秋编著,嵌入式处理器原理及应用――NIOS 系统设计和 C 语言编程,清华大学出版社,2004.10,
    [45]. 方茁等,基于 NIOS 的 SOPC 设计,计算机科学与工程,2004.4
    [46]. 任爱峰,初秀琴,常存等著,基于 FPGA 的嵌入式系统设计,西安电子科技大学出版社,2005.2
    [47]. [美]Jean J.Labrosse 著,邵贝贝等译,嵌入式实时操作系统 μC/OS-Ⅱ(第二版),北京航空航天大学出版社,2003
    [48]. 单片机嵌入式应用的在线开发方法,邵贝贝著,清华大学出版社,2004.10
    [49]. 杨刚,肖宇彪,陈江等编著,32 位嵌入式系统与 SOC 设计导论,电子工业出版社,2004
    [50]. 罗军宏 谢余强 舒辉 张有为,LWIP 在 μC/OS-Ⅱ操作系统中的实现,《微计算机信息》(嵌入式与 SOC)2005 年第 21 卷第 7-2 期
    [51]. 潘松,黄继业,曾毓,SOPC 技术实用教程,北京,清华大学出版社,2005
    [52]. 王田苗,嵌入式系统设计与实例开发――基于 ARM 微处理器与 μC/OS-Ⅱ实时操作系统(第二版),清华大学出版社,2003

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700