找回密码
 注册

QQ登录

只需一步,快速开始

楼主: hugebird

Broadcom路由DSL猫用的JTAG工具最新版

    [复制链接]
 楼主| 发表于 2011-2-8 19:21:26 | 显示全部楼层

2.0.1

增加BCM Chipc spi控制器支持,理论可以支持大部分wifi路由spi flash读写。



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2011-2-8 19:37:03 | 显示全部楼层
春节这一周都用在这上面了,只有长假期间可以投入一下,平时实在找不到合适的时间。
wifi系列的spi flash估计基本都可以支持了,63x8的spi控制器有好几种,要再等等再说。
如果spi flash cfe出错,jtag无法进入debug模式,还需要按照短接的方法修正。
读写spi flash,建议用并口线,usbasp,stm32 这3个版本的硬件。ft2232和jlink由于不能进行实时轮询,不能进行批量读写,速度可能很慢,提醒大家注意下。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2011-2-8 19:40:29 | 显示全部楼层
sycy 发表于 2011-1-30 00:13
你好,老大,有个问题想请教一下:
WRT350N V1 的路由.用的是J-link.j-link 版本4.08

注意下是否提示“NOT enter Debug mode”,如果无法进入调试模式,可能是flash cfe代码写入有问题,采用OE接地方式加电,再进行jtag读写操作
发表于 2011-2-9 07:09:35 | 显示全部楼层
本帖最后由 uzer222 于 2011-2-9 07:11 编辑

hi! i have some errors

brjtag -flash:cfe /cable:3

<code>

HID-Brjtag MCU ROM version: 1.04 on USBASP hardware!

Probing bus ... Done
Detected IR Length is 5
CPU assumed running under BIG endian
CPU Chip ID: 00000110001101001000000101111111 (0634817F)
*** Found a Broadcom manufactured BCM6348 REV 01 CPU ***

    - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
    - EJTAG Version ....... : 1 or 2.0
    - EJTAG DMA Support ... : Yes
    - EJTAG Implementation flags: R4k MIPS32

Issuing Processor / Peripheral Reset ... Done
Enabling Memory Writes ... Done
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Clearing Watchdog ... Done
Loading CPU Configuration Code ... Skipped
Detecting Flash Base Address...0x1FC00000

Probing Flash at Address: 0x1FC00000 ...
Detected pFlash Chip ID (VenID:DevID = 00C2 : 22A8)
*** Found a (4MB) CFI Compatiable Flash Chip from Macronix

    - Flash Chip Window Start .... : 1FC00000
    - Flash Chip Window Length ... : 00400000
    - Selected Area Start ........ : 1FC00000
    - Selected Area Length ....... : 00040000

*** You Selected to Flash the CFE.BIN ***

=========================
Flashing Routine Started
=========================
Total Blocks to Erase: 11

Erasing block: 1 (addr = 1FC00000)...Done
Erasing block: 2 (addr = 1FC02000)...Done
....
Erasing block: 8 (addr = 1FC0E000)...Done
Erasing block: 9 (addr = 1FC10000)...Done
Erasing block: 10 (addr = 1FC20000)...Done
Erasing block: 11 (addr = 1FC30000)...Done

Loading CFE.BIN to Flash Memory...
   3%   bytes = 8448
dma write not correctly !!
3809CCFD - FFFFCCFD
dma write not correctly !!
3E4F9D36 - 3E4FFFFF
   3%   bytes = 9248
dma write not correctly !!
777BED35 - FFFFED35
   4%   bytes = 12576
dma write not correctly !!
3F62309F - 3F62304F
   5%   bytes = 14304
dma write not correctly !!
2ADD073A - FFFF073A
   5%   bytes = 14688
dma write not correctly !!
1BA18939 - FFFF8939
   5%   bytes = 15008
dma write not correctly !!
EA50D8A4 - E6125EE0
   6%   bytes = 16128
dma write not correctly !!
C5A8B269 - C5A8FFFF
   6%   bytes = 16672
dma write not correctly !!
1C6D4CDF - 1C6D4C6F
   6%   bytes = 17184
dma write not correctly !!
B2CAB9DF - B2CAB96F
   7%   bytes = 20032
Done  (CFE.BIN loaded into Flash Memory OK)

=========================
Flashing Routine Complete
=========================
elapsed time: 101 seconds

*** REQUESTED OPERATION IS COMPLETE ***
</code>
 楼主| 发表于 2011-2-9 09:57:57 | 显示全部楼层
回复 uzer222 的帖子

The error info show partial write failure. May caused by not enough polling time delay for older MXIC flash chip. try add /L4:128 switch let polling time delay to 128us
>brjtag -flash:cfe /cable:3 /L4:128 /L1:5
or
> brjtag -flash:cfe /cable:3 /L9:1
or
> brjtag -flash:cfe /cable:3 /safemode
发表于 2011-2-10 07:05:43 | 显示全部楼层
本帖最后由 uzer222 于 2011-2-10 07:15 编辑

回复 hugebird 的帖子

> brjtag -flash:cfe /cable:3 /L4:128 /L1:5     - this command makes much errors
> brjtag -flash:cfe /cable:3 /L9:1  - this -many
> brjtag -flash:cfe /cable:3 /safemode  - this ok

thanks!

maybe you know about this error? this error appears sometimes

> brjtag -probeonly /erasechip /port:e000

  1.          Broadcom EJTAG Debrick Utility v2.0.1-hugebird
  2. Probing bus ... Done
  3. Detected IR Length is 5
  4. CPU assumed running under BIG endian

  5. CPU Chip ID: 00000110001101001000000101111111 (0634817F)
  6. *** Found a Broadcom manufactured BCM6348 REV 01 CPU ***

  7.     - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
  8.     - EJTAG Version ....... : 1 or 2.0
  9.     - EJTAG DMA Support ... : Yes
  10.     - EJTAG Implementation flags: R4k MIPS32

  11. Issuing Processor / Peripheral Reset ... Done
  12. Enabling Memory Writes ... Done
  13. Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done
  14. Clearing Watchdog ... Done
  15. Loading CPU Configuration Code ... Skipped
  16. [b]Detecting Flash Base Address...Address invalid!, Skipped.[/b]

  17. Probing Flash at Address: 0x1FC00000 ...
  18. [b]Detected pFlash Chip ID (VenID:DevID = 0000 : 0000)[/b]
  19. *** Unknown or NO Flash Chip Detected ***
  20. *** REQUESTED OPERATION IS COMPLETE ***
复制代码

 楼主| 发表于 2011-2-10 10:13:17 | 显示全部楼层
本帖最后由 hugebird 于 2011-2-10 10:15 编辑

回复 uzer222 的帖子

Halting Processor ... <Processor did NOT enter Debug Mode!> ... Done

very common error,  avoid this error by optimizting the delay between power-on device and running brjtag command.
*) When using this utility, usually it is best to type the command line
            out, then power up the router, about 0.5 second delay, hit <ENTER>
             quickly to avoid bad CFE code lead to <CPU NOT enter Debug mode>
             or the CPUs watchdog interfering with the EJTAG operations.

If always not enter debug mode, Maybe the currupt CFE lead cpu reject jtag debugging. could short flash oe# pin to GND (shall OE# to vcc with a resistance, but oe# to gnd also works) before power-on device, prevent from boot code loading, then running brjtag. follow the pic show.



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2011-2-12 21:22:50 | 显示全部楼层
用 dma 写 wrt54gs 不工作:


  1. c:\brjtag.exe -flash:cfe /noemw /cable:1

  2.         ===============================================
  3.          Broadcom EJTAG Debrick Utility v1.9o-hugebird
  4.         ===============================================


  5. Set I/O speed to 6000 KHz

  6. USB TAP device has been initialized. Please confirm VREF signal connected!
  7. Press any key to continue... ONCE target board is powered on!

  8. Probing bus ... Done

  9. Detected IR Length is 8

  10. CPU assumed running under LITTLE endian

  11. CPU Chip ID: 00010100011100010010000101111111 (1471217F)
  12. *** Found a Broadcom manufactured BCM4712 REV 01 CPU ***

  13.     - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
  14.     - EJTAG Version ....... : 1 or 2.0
  15.     - EJTAG DMA Support ... : Yes
  16.     - EJTAG Implementation flags: R4k MIPS32

  17. Issuing Processor / Peripheral Reset ... Done
  18. Enabling Memory Writes ... Skipped
  19. Halting Processor ... <Processor Entered Debug Mode!> ... Done
  20. Clearing Watchdog ... Done
  21. Loading CPU Configuration Code ... Skipped

  22. Probing Flash at Address: 0x1FC00000 ...
  23. Detected Chip ID (VenID:DevID = 0089 : 0017)
  24. *** Found a Intel 28F640J3 4Mx16       (8MB) Flash Chip from Intel

  25.     - Flash Chip Window Start .... : 1C000000
  26.     - Flash Chip Window Length ... : 00800000
  27.     - Selected Area Start ........ : 1C000000
  28.     - Selected Area Length ....... : 00040000

  29. *** You Selected to Flash the CFE.BIN ***

  30. =========================
  31. Flashing Routine Started
  32. =========================
  33. Total Blocks to Erase: 2

  34. Erasing block: 1 (addr = 1C000000)...Done
  35. Erasing block: 2 (addr = 1C020000)...Done

  36. Loading CFE.BIN to Flash Memory...

  37. dma write not correctly !!
  38. 10000817 - 00800080

  39. dma write not correctly !!
  40. 00000000 - 00800080

  41. dma write not correctly !!
  42. 00000000 - 00800080

  43. dma write not correctly !!
  44. 00000000 - 00800080

  45. dma write not correctly !!
  46. 00000000 - 00800080

  47. dma write not correctly !!
  48. 00000000 - 00800080

  49. dma write not correctly !!
  50. 00000000 - 00800080
复制代码

不用 dma, 写到 89% 就停了:

  1. c:\brjtag.exe -flash:cfe /noemw /nodma /cable:1

  2.         ===============================================
  3.          Broadcom EJTAG Debrick Utility v1.9o-hugebird
  4.         ===============================================


  5. Set I/O speed to 6000 KHz

  6. USB TAP device has been initialized. Please confirm VREF signal connected!
  7. Press any key to continue... ONCE target board is powered on!

  8. Probing bus ... Done

  9. Detected IR Length is 8

  10. CPU assumed running under LITTLE endian

  11. CPU Chip ID: 00010100011100010010000101111111 (1471217F)
  12. *** Found a Broadcom manufactured BCM4712 REV 01 CPU ***

  13.     - EJTAG IMPCODE ....... : 00000000100000000000100100000100 (00800904)
  14.     - EJTAG Version ....... : 1 or 2.0
  15.     - EJTAG DMA Support ... : Yes
  16.     - EJTAG Implementation flags: R4k MIPS32
  17.     *** DMA Mode Forced Off ***

  18. Issuing Processor / Peripheral Reset ... Done
  19. Enabling Memory Writes ... Skipped
  20. Halting Processor ... <Processor Entered Debug Mode!> ... Done
  21. Clearing Watchdog ... Done
  22. Loading CPU Configuration Code ... Skipped

  23. Probing Flash at Address: 0x1FC00000 ...
  24. Detected Chip ID (VenID:DevID = 0089 : 0017)
  25. *** Found a CFI Compatiable Flash Chip from Intel

  26.     - Flash Chip Window Start .... : 1C000000
  27.     - Flash Chip Window Length ... : 00800000
  28.     - Selected Area Start ........ : 1C000000
  29.     - Selected Area Length ....... : 00040000

  30. *** You Selected to Flash the CFE.BIN ***

  31. =========================
  32. Flashing Routine Started
  33. =========================
  34. Total Blocks to Erase: 2

  35. Erasing block: 1 (addr = 1C000000)...Done
  36. Erasing block: 2 (addr = 1C020000)...Done

  37. Loading CFE.BIN to Flash Memory...
  38. ^C89%   bytes = 234060
  39. c:\>
复制代码

用 2.01 也是一样的结果。

有人试过吗?
谢谢!

 楼主| 发表于 2011-2-13 01:12:04 | 显示全部楼层
回复 hugebird 的帖子

2.02

- 修正2.01 引入的一个读取错误
-为hidbrjtag rom增加并行flash写入状态查询。一直以来并行flash写入是以精确延时来保证写入正确,在对较老设备进行写入时延时不好调整,2.02配合hidbrjtag rom可以查询flash的写入状态标志,从而可以有更好的兼容性。效率可能会比精确延时差。
通过/L4:128激活。



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 发表于 2011-2-13 01:18:16 | 显示全部楼层
回复 thethree 的帖子

手里没有intel芯片的设备,这部分从没测试过。
看你写入用6MHz,这个速度很难成功的。用/L1:xxx参数将速度降到2MHz一下为好。
ft2232, 可以用/L1:5 降到1MHz
或者用/L9:1选择安全写入脚本。

还有就是是否部分写入成功还是根本无法写入,给的信息太少,无法进行判断
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-5-6 01:52 , Processed in 0.026049 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表