linux:ubuntu:openocd
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
| linux:ubuntu:openocd [2025/07/14 09:00] – user01 | linux:ubuntu:openocd [2026/10/14 06:19] (当前版本) – 外部编辑 127.0.0.1 | ||
|---|---|---|---|
| 行 2: | 行 2: | ||
| - | openocd使用 | + | # - feature |
| + | * 目前在FPGA上已经测出来,已能支持32个tap, | ||
| + | * autotap 推定可以到16个,再多的话,需要把工具自己推出来的写成定义tap | ||
| - | < | + | # - openocd使用 |
| + | |||
| + | ``` | ||
| jtag_rest 1 0 -- 复位,tck和TMS组合而成,如果有trstn的话,则产生trstn | jtag_rest 1 0 -- 复位,tck和TMS组合而成,如果有trstn的话,则产生trstn | ||
| - | irscan zynq.dap 0x5 | + | irscan zynq.dap 0x5 |
| drscan zynq.dap 16 0x4321 | drscan zynq.dap 16 0x4321 | ||
| - | </ | + | ``` |
| - | --- 注意,一定要先指定TAP IR, 然后才可以向 DR进行输入数据,不然openocd会报错退出。 | + | * 注意,一定要先指定TAP IR, 然后才可以向 DR进行输入数据,不然openocd会报错退出。 |
| - | --- openocd使用tcl语法进行配置,可以使用telnet进行连接 | + | |
| + | |||
| + | # - config file | ||
| + | ## - ft2232h.cfg | ||
| + | |||
| + | ~~~tcl ft2232h.cfg | ||
| + | ##################################### | ||
| + | # | ||
| + | # Layout: | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| - | ft2232h.cfg | ||
| - | < | ||
| interface ftdi | interface ftdi | ||
| ftdi_vid_pid 0x0403 0x6010 | ftdi_vid_pid 0x0403 0x6010 | ||
| ftdi_channel 0 | ftdi_channel 0 | ||
| - | ftdi_layout_init 0x08 0x0b | ||
| - | </ | ||
| - | target.cfg | + | ###### interface config 0 |
| - | < | + | # just TCK TDI TDO TMS |
| + | # ftdi_layout_init 0x0008 0x000b | ||
| + | |||
| + | ###### interface config 1 | ||
| + | # ADBUS6 no used | ||
| + | ftdi_layout_init 0x0098 0x00bb; # initial data, port direction (1-out, 0-in) | ||
| + | ftdi_layout_signal nTRST -data 0x0010 -input 0x0010 | ||
| + | ftdi_layout_signal nSRST -data 0x0020 -input 0x0020 | ||
| + | ftdi_layout_signal DBGREQ_L -data 0x0080 -input 0x0080 | ||
| + | |||
| + | |||
| + | # -data can drive to 1 & 0 | ||
| + | # -oe can only drive to 0 / high-z, can't drive 1 | ||
| + | # -input | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## - target.cfg | ||
| + | |||
| + | ~~~tcl target.cfg | ||
| set _CHIPNAME zynq | set _CHIPNAME zynq | ||
| - | jtag newtap $_CHIPNAME dap -irlen 8 -ircapture 0x01 -irmask 0x03 | + | jtag newtap $_CHIPNAME |
| adapter_khz 5000 | adapter_khz 5000 | ||
| - | </ | ||
| - | 启动openocd服务: | + | # gdb_port |
| + | # tcl_port | ||
| + | # telnet_port 4444 | ||
| + | ~~~ | ||
| - | ====== | + | # - 启动服务 |
| - | < | + | ``` |
| + | sudo openocd | ||
| + | ``` | ||
| + | |||
| + | |||
| + | |||
| + | # - 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 | ||
| 行 47: | 行 92: | ||
| results back. Sometimes you might also need the capture command. | results back. Sometimes you might also need the capture command. | ||
| See contrib/ | See contrib/ | ||
| - | </ | + | ``` |
| 可以参考openocd包目录contrib/ | 可以参考openocd包目录contrib/ | ||
linux/ubuntu/openocd.1752454859.txt.gz · 最后更改: (外部编辑)
