Chinaunix首页 | 论坛 | 博客
  • 博客访问: 76148
  • 博文数量: 44
  • 博客积分: 2021
  • 博客等级: 大尉
  • 技术积分: 500
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-03 10:12
文章分类
文章存档

2011年(1)

2010年(9)

2009年(34)

我的朋友

分类: 嵌入式

2010-08-23 00:02:52

工作需要,时常要通过JTAG 做flash program, 一般的ICE软件也可以做,但是我们手上的几个不同类型的总是不是那么完美,要么因为software license的问题,软件没法用在某些新的芯片上;要么只能支持某一类型的芯片;还有时候莫名其妙就是不能写flash,所以觉得有必要研究一下JTAG的工作原理。
  网上有很多这样的小工具和软件,在dd-wrt/open-wrt上面也有很多人在用,调查一下来看,UrJtag: 可以满足我的需求: 支持的CPU类型比较多,支持快速的 USB-JTAG cable,更重要的是这个项目目前还在维护。
  自己先做了一个并口转JTAG的线, 跟Wiggler 大多相同,但也有几个脚定义不同,所以需要修改软件代码。 公司里还有一个USB-JTAG cable,也可以用,programm速度比wiggler要快10倍。选cable类型的命令
      cable wiggler ppdev /dev/parport0           --- wiggler
      cable OOCDLink-s vid=0403 pid=6010 driver=ftdi-mpsse   --- USB cable,类型是试出来的
下面是我在不同平台上的试验结果
  1. Intel xScale IXP42x platform     
detect
detectflash 0
readmem 0 0x10000 test.bin
flashmem 0 test.bin
  2. Admtek 5120 board
     detect到的chip ID 是0,所以需要指定config file
detect
include admtek/adm5120/adm5120
detectflash 0x3fc00000
readmem 0x3fc00000 0x10000 test.bin
  3. Brecis MSP2000/MSP2006/MSP2010
     detect到的chip ID 是0,所以需要指定config file
detect
include brecis/msp2006/msp2006
detectflash 0x3fc00000
readmem 0x3fc00000 0x10000 test.bin
  4. Atheros AR2312/AR2313/AR5312
     detect到的chip ID 是0,所以需要指定config file。ar2312需要设置一下才能对flash读写,也可以把poke这句加到atheros/ar2312/ar2312里去
detect
include atheros/ar2312/ar2312
poke 0x58400000 0x100e3ce1 /*Enable flash access*/
detectflash 0x3fc00000 /*Only work for pararrel flash*/
  5. TI TNETV1060
     detect 可以工作
detect
detectflash 0x30000000
readmem 0x30000000 0x10000 test.bin
flashmem 0x30000000 test.bin
  6. Broadcom BCM6358
     detect可以检测到ID,但只有power on后的第一次可以检测到。detectflash不工作.
  7. Atheros AR2316 AR7100
     如果是parallel flash,可以一样使用detectflash/flashmem
     如果是serial flash, 目前的版本中还没有支持。不过我已经做好此部分支持。
阅读(3531) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~