用户工具

站点工具


linux:ubuntu:openocd

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
linux:ubuntu:openocd [2025/07/14 16:47] – [1. openocd使用] user01linux:ubuntu:openocd [2026/10/14 06:19] (当前版本) – 外部编辑 127.0.0.1
行 2: 行 2:
  
  
-====== - feature ====== +# - feature
   * 目前在FPGA上已经测出来,已能支持32个tap,   * 目前在FPGA上已经测出来,已能支持32个tap,
   * autotap 推定可以到16个,再多的话,需要把工具自己推出来的写成定义tap   * autotap 推定可以到16个,再多的话,需要把工具自己推出来的写成定义tap
  
-====== - openocd使用 ====== +# - openocd使用
  
-<code>+```
 jtag_rest 1 0               -- 复位,tck和TMS组合而成,如果有trstn的话,则产生trstn jtag_rest 1 0               -- 复位,tck和TMS组合而成,如果有trstn的话,则产生trstn
 irscan zynq.dap 0x5         -- 往tap寄存器写IR指令为0x5,   TAP在target.cfg文件中进行定义(jtag newtap) irscan zynq.dap 0x5         -- 往tap寄存器写IR指令为0x5,   TAP在target.cfg文件中进行定义(jtag newtap)
 drscan zynq.dap 16 0x4321   -- 向指定TAP输入DR数据,长度为16,数据为0x4321 drscan zynq.dap 16 0x4321   -- 向指定TAP输入DR数据,长度为16,数据为0x4321
-</code>+``` 
  
   * 注意,一定要先指定TAP IR, 然后才可以向 DR进行输入数据,不然openocd会报错退出。   * 注意,一定要先指定TAP IR, 然后才可以向 DR进行输入数据,不然openocd会报错退出。
   * openocd使用tcl语法进行配置,可以使用telnet进行连接   * openocd使用tcl语法进行配置,可以使用telnet进行连接
  
-====== - config file ====== +# - config file 
 +## - ft2232h.cfg
  
-===== - ft2232h.cfg ===== +~~~tcl ft2232h.cfg
-<file tcl ft2232h.cfg>+
 ##################################### #####################################
 # #
行 56: 行 54:
 # -oe     can only drive to 0 / high-z, can't drive 1 # -oe     can only drive to 0 / high-z, can't drive 1
 # -input  can use cmd ftdi_get_signal to get signal value # -input  can use cmd ftdi_get_signal to get signal value
 +~~~
  
-</file> 
  
-===== - target.cfg =====+## - target.cfg
  
-<file tcl target.cfg>+~~~tcl target.cfg
 set _CHIPNAME zynq set _CHIPNAME zynq
 jtag newtap $_CHIPNAME  dap -irlen 8 -ircapture 0x01 -irmask 0x03 jtag newtap $_CHIPNAME  dap -irlen 8 -ircapture 0x01 -irmask 0x03
行 70: 行 68:
 # tcl_port    6666 # tcl_port    6666
 # telnet_port 4444 # telnet_port 4444
 +~~~
  
-</file> 
  
-====== - 启动服务 ======+# - 启动服务
  
-<code>+```
 sudo openocd  -f ft2232h.cfg  -f target.cfg sudo openocd  -f ft2232h.cfg  -f target.cfg
-</code>+```
  
  
-====== - RPC server ====== 
  
-<code>+# - RPC server 
 + 
 +```
  
 OpenOCD provides a simple RPC server that allows to run arbitrary Tcl commands and OpenOCD provides a simple RPC server that allows to run arbitrary Tcl commands and
行 93: 行 92:
 results back. Sometimes you might also need the capture command. results back. Sometimes you might also need the capture command.
 See contrib/rpc_examples/ for specific client implementations. See contrib/rpc_examples/ for specific client implementations.
-</code>+``` 
  
 可以参考openocd包目录contrib/rpc_examples/下的例子。 可以参考openocd包目录contrib/rpc_examples/下的例子。
  
linux/ubuntu/openocd.1752482820.txt.gz · 最后更改: (外部编辑)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki