Open JTAG Project

Open JTAG Project is an open source hardware and software for a high speed USB JTAG tool. 

In this site, you can find and download all necesary files to make your JTAG device.

The electric schematics, the PCB design including Gerber files, the VHDL project in Altera Quartus II format,

and the C++ examples in Microsoft Visual Studio 2005, are free to be downloaded.

If you like to collaborate, please click on our Opencores.org Open JTAG project page.

We encourage JTAG lovers to collaborate with this project:

We need:

  • Patch the OpenOCD to support Open JTAG commands.
  • Optimize the VHDL code (I am not the best VHDL programmer, of course!)
  • Test hardware and software

Note:

The full project could be emulated in the Altera MAX II Development Kit. Click here to viiew Altera page

The hardware project is mainly composed of:

  • 1 two-layer PCB
  • 1 FTDIChip FT245BL USB to Parallel converter
  • 1 Altera EPM570T100 TQFP100 CPLD
  • 1 generic 93C46 serial EEPROM
  • 1 IQD SPXO018043 48 MHZ oscillator
  • 1 generic HC49 6MHZ quartz
  • 1 ST Microelectronics LK112M33TR 3.3V LDO regulator
  • 2 Texas TXS0104 bidirectional level converter

The circuitry is simple and easy to understand. The FT245 is the USB front end, c

onverting USB serial data to parallel bus to interface with the EPM570 CPLD.

The CPLD latch the parallel data and execute macro-instruction commands,

driving the main five JTAG signals: TCK, TMS, TDI, TDO and TRST.

Inside the CPLD there is a synthesized clock divisor to work with slow target devices.

The higher TCK frequency is 24 MHZ (main clock / 2) and the lower frequency is 187.5 KHZ.

The board have 8 input/output pins (J4 connector) to be used as general purpose I/O.

The PCB size is 57.2mm x 43.3mm (2.26" x 1.7") and fits inside the Altera USB Blaster plastic box,

and it is pin-to-pin compatible. The same JTAG flat cable can be used.

There is another projetc from Kolja Waschk (http://www.ixo.de) to create an Altera USB Blaster compatible JTAG.

The Kolja project could be implemented in our hardware.

We have tested the project using Quartus II 9.0 and seems to work fine.

Please click here to download the Quartus II Kolja project, ready to be used in our hardware.

 

 

The latest files:

Please read the License Document before download files.

USB-Blaster compatibility:

To get USB-Blaster compatibility with our hardware, download and program the CPLD with the Kolja Waschk VHDL project.

This option make OpenJTAG full USB-Blaster compatible. Was tested using an EPM1270 CPLD as target and, of course, with the EPM570 CPLD, both from Altera Corporation. Please note that the OpenJTAG project and the Kolja Waschk project areDIFFERENT.

Remember to change the EEPROM USB VID/PID, product description and manufacturer name using the FTProg utility from FTDI site at (http://ftdichip.com).

__________________________________________________________________

Older files (for reference only)

 

Click the links to download Open JTAG project files.

Please read the License Document before download files.

Software version 1.1 (the current version).

Hardware board version 1.1 (the current board).

Changes:

  1. Add R22 (10K) to oscillator enable pin as pull-up
  2. Change 2 MAX3378E by 2 Texas TXB0104 to improve speed
  3. Change LED power from +5V to +VCCIO

Hardware board version 1.0:

VHDL version 1.0:

Software version 1.0:

 

什么是Open JTAG。Open JTAG是一个开源项目,

她的目标是使嵌入式开发者能够通过JTAG接口,

用开放的硬件和软件系统进行烧写、校验和调试。

作为Open JTAG的官方网站,http://www.openjtag.net 

上详述了Open JATG可以实现的硬件解决方式。

然而,他们的重点确实放在详述花费 $200 的高速JATG解决方案上,

令我辈山寨开发者十分不满。

还好,USB接口的解放方案提供了一种相对低廉的解决方式,

20M的速率也不算低,这就是给予FTDI的FT2232系列的JTAG调试器。

当然,Open JTAG的硬件成本就不可能做到比Jlink的价格还低了。

不过令人振奋的是,Open JTAG以他特殊的开源优势,特别适合嵌入式开发者的使用,

特别是在Lunix下的使用... ...   我是做硬件的...具体的优势有待查明再讨论。


搭配的软件常用的是OpenOCD,它是一个开源的JTAG上位机程序,主页在

http://openocd.berlios.de/web/,论坛在

http://forum.sparkfun.com/viewforum.php?f=18

目前支持多种芯片。可以简单查看

src/target/target.c中的target_types的定义就可以了解支持哪些处理器了:


target_type_t *target_types[] =
{
&arm7tdmi_target,
&arm9tdmi_target,
&arm920t_target,
&arm720t_target,
&arm966e_target,
&arm926ejs_target,
&feroceon_target,
&xscale_target,
&cortexm3_target,
&arm11_target,
&mips_m4k_target,
... ...
所以也就是说,凡是以上列出的,Open JTAG都可用。

而且随着Open OCD的功能晚上,支持的芯片还会越来越多。

可以配饰Open JTAG使用的开源软件还有 Eclipse 等,非专业人士,就不做介绍啦。

多种烧写方法:


① 类似sjf2410/sjf2440的oflash工具,支持s3c2410,s3c2440,s3c6410的直接烧写 
② 直接使用openocd的命令行烧写
③ 从JTAG口下载u-boot到内存中,使用u-boot来烧写
 
 多种调试手段:


① 使用openocd的命令直接调试
② 使用gdb命令行调试
③ 使用Eclipse图形化工具调试 
支持多种调试工具:
① 支持IAR
② 支持Eclipse
③ 可以调试ADS编译出来的axf文件 
它是一款集三大功能(USB转JTAG、USB转串口、在线调试)于一体的调试器。
无论是台式机,还是缺乏串口、并口的笔记本,都可以使用。
可以用来调试ARM7, ARM9, Cortex-M3, XSCALE系列CPU的裸板程序、u-boot、内核。 
    
硬件特点:


USB:
  USB2.0全速接口
  使用USB电源
  即插即用


JTAG:
    IEEE 1149.1标准
    最大速率6Mbits/sec
    是并口JTAG的150倍
    Multi-ICE 10-pin插座
    Multi-ICE 20-pin插座
    目标系统1.5~5V自适应


串口:
    RS232标准
    支持7或8位数据位
    1或2位停止位
    奇校验/偶校验/标志位/空位/无校验
    最大波特率1Mbps


在线仿真功能:


   支持的多种CPU系列:ARM7, ARM9, Cortex-M3/M8/A8, XSCALE 

 
软件特点:
·Eclipse集成开发环境的安装程序及教程(Linux/Windows版)
·可调试ADS、KEIL编译出来的axf文件
·源码级别调试器OpenOCD的安装程序及教程(Linux/Windows版)
·实时调试功能:单步、全速运行、复位、软/硬件断点、跳转等
·CPU寄存器、存储器、变量观察窗口:动态变化,实时察看
·支持ARM内置的Cache和MMU功能
·在线烧写多种NOR Flash和NAND Flash
·驱动程序:支持Linux 2.4或更高版本, Windows ME, 2000, Server 2003, XP, win 7

 

J-Link、J-Trace、Open JTAG都是用来调试程序的(当然还有其他工具可以进行调试,比如ICE),

J-Link和J-Trace是SEGGER公司的(http://www.segger.com)。

Open JTAG(http://www.openjtag.org/)是一个开源项目,

其目标是使嵌入式开发者能够通过JTAG接口,用开放的硬件和软件系统进行烧写、校验和调试[1]。

他们都基于JTAG调试接口协议。

 

工作原理

调试arm,总要遵循arm的调试接口协议吧,jtag就是其中的一种吧。

当仿真时,iar,keil,ads等等都有一个公共的调试接口,RDI(RDI接口是ARM公司提出的调试接口标准,主要用于ARM芯片的JTAG仿真。)

就是其中的一咱吧, 那么我们如何完成RDI-->arm调试协议(JTAG)的转换呢? 如是乎就有两种做法:

 

(1) 在电脑上写一个服务程序,把keil,ads,iar中的RDI命令解析成相关的JTAG协议,然后通后一个物理转换接口(

注意,这个转换只是电气物理层 上的转换,就像RS232那样的作用)发送你的的目标板。

h-jtag就是这样的。 h-jtag的硬件就仅是一个物理电平的转换接口,所以很简单。

而电脑中装的h-jtag软件就是前面说到的服务程序,负责协议转换的。


(2)另一种做法,就是做一个板,用此板直接接收来自keil,ads,iar等软件的调试命令,

由此板做rdi->jtag协议的转换。然后与目标板通信,这就是jlink的工作原理。(这也就实现了USB转JTAG协议。)

 

一回贴说:“大佬,两者都是软件完成的,只不过软件放的地方不一样(一个放计算机,一个放仿真器里面了).

真正的硬件,就象是JTRACE一样,用FPGA来实现.实质上,还是软件到硬件的过程.”。

 

J-Link与Open JTAG区别

正如上文所述,这两者都是用来调试程序的,都实现了USB转JTAG协议功能,即用USB连接主机,用JTAG线连接板子的JTAG口,

而这之间的转换通过J-Link或者Open JTAG转换。

另J-Link一般是独立的组件,而Open JTAG一般集成到板子上。

 

 
posted @ 2015-08-25 02:26  IAmAProgrammer  阅读(6426)  评论(0编辑  收藏  举报