我买了一辆巴士海盗作为一种便宜的方式开始调查几个芯片上的Jtag。我认为树莓派会有一个很好的测试用例,因为它有很好的文档记录,并且有一个庞大的支持社区。我通过几个网站阅读后了解到,这两端的设置都不是很好,因为总线盗版的Jtag功能非常有限,而Pi默认没有打开Jtag。但是,这是我必须要处理的,所以如果可能的话,我希望看到它。
我安装了最新版本的OpenOCD(0.9.0),我将我的总线盗版V4硬件升级到固件v6.1 r1676和Bootloader v4.4。我在/ dev / ttyUSB0上有我的总线盗版并且已经确认它正在接收命令。我创建了一个openocd.cfg文件来选择我的界面和目标。它包含
source [find tcl/interface/buspirate.cfg]
source [find tcl/target/raspberry.cfg]
我修改了我的buspirate.cfg,因此它包含以下内容
#
# Buspirate with OpenOCD support
#
# http://dangerousprototypes.com/bus-pirate-manual/
#
interface buspirate
# you need to specify port on which BP lives (I have a udev rule for this)
buspirate_port /dev/ttyUSB0
# communication speed setting
buspirate_speed normal ;# or fast
# voltage regulator Enabled = 1 Disabled = 0
#buspirate_vreg 0
# pin mode normal or open-drain
#buspirate_mode normal
# pullup state Enabled = 1 Disabled = 0
#buspirate_pullup 0
# this depends on the cable, you are safe with this option
reset_config srst_only
我根据我发现here的教程创建了一个raspberry.cfg。我还使用了这个站点的脚本来打开Pi的Jtag引脚。
adapter_khz 1000
adapter_nsrst_delay 400
reset_config none
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME rspi
}
if { [info exists CPU_TAPID ] } {
set _CPU_TAPID $CPU_TAPID
} else {
set _CPU_TAPID 0x07b7617F
}
jtag newtap $_CHIPNAME arm -irlen 5 -expected-id $_CPU_TAPID
set _TARGETNAME $_CHIPNAME.arm
target create $_TARGETNAME arm11 -chain-position $_TARGETNAME
rspi.arm configure -event gdb-attach { halt }
当我去运行OpenOCD时,输出表明找到了文件并且它正在与总线盗版者连接,但是,它没有正确地与Pi通信。以下是长格式调试,如果您有任何想法,请告诉我
Open On-Chip Debugger 0.9.0-dev-00424-g2e00235 (2015-04-24-08:50)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 4 command.c:546 command_print(): debug_level: 3
Debug: 14 4 options.c:98 add_default_dirs(): bindir=/usr/local/bin
Debug: 15 4 options.c:99 add_default_dirs(): pkgdatadir=/usr/local/share/openocd
Debug: 16 4 options.c:100 add_default_dirs(): run_prefix=
Debug: 17 5 configuration.c:44 add_script_search_dir(): adding /home/user/.openocd
Debug: 18 5 configuration.c:44 add_script_search_dir(): adding /usr/local/share/openocd/site
Debug: 19 5 configuration.c:44 add_script_search_dir(): adding /usr/local/share/openocd/scripts
Debug: 20 5 configuration.c:84 find_file(): found openocd.cfg
Debug: 21 5 configuration.c:84 find_file(): found tcl/interface/buspirate.cfg
Debug: 22 6 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_interface buspirate
Debug: 23 6 command.c:145 script_debug(): command - interface ocd_interface buspirate
Debug: 25 6 command.c:325 command_new(): BUG: command 'buspirate_adc' does not have the '.usage' field filled out
Debug: 26 6 command.c:366 register_command_handler(): registering 'ocd_buspirate_adc'...
Debug: 27 6 command.c:366 register_command_handler(): registering 'ocd_buspirate_vreg'...
Debug: 28 6 command.c:366 register_command_handler(): registering 'ocd_buspirate_pullup'...
Debug: 29 7 command.c:366 register_command_handler(): registering 'ocd_buspirate_led'...
Debug: 30 7 command.c:366 register_command_handler(): registering 'ocd_buspirate_speed'...
Debug: 31 7 command.c:366 register_command_handler(): registering 'ocd_buspirate_mode'...
Debug: 32 7 command.c:366 register_command_handler(): registering 'ocd_buspirate_port'...
Warn : 33 7 adapter.c:161 handle_interface_command(): Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : 34 7 transport.c:118 allow_transports(): only one transport option; autoselect 'jtag'
Debug: 35 8 command.c:366 register_command_handler(): registering 'ocd_jtag_flush_queue_sleep'...
Debug: 36 8 command.c:366 register_command_handler(): registering 'ocd_jtag_rclk'...
Debug: 37 8 command.c:366 register_command_handler(): registering 'ocd_jtag_ntrst_delay'...
Debug: 38 8 command.c:366 register_command_handler(): registering 'ocd_jtag_ntrst_assert_width'...
Debug: 39 8 command.c:366 register_command_handler(): registering 'ocd_scan_chain'...
Debug: 40 8 command.c:366 register_command_handler(): registering 'ocd_jtag_reset'...
Debug: 41 8 command.c:366 register_command_handler(): registering 'ocd_runtest'...
Debug: 42 8 command.c:366 register_command_handler(): registering 'ocd_irscan'...
Debug: 43 8 command.c:366 register_command_handler(): registering 'ocd_verify_ircapture'...
Debug: 44 8 command.c:366 register_command_handler(): registering 'ocd_verify_jtag'...
Debug: 45 9 command.c:366 register_command_handler(): registering 'ocd_tms_sequence'...
Debug: 46 9 command.c:366 register_command_handler(): registering 'ocd_wait_srst_deassert'...
Debug: 47 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 48 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 49 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 50 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 51 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 52 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 53 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 54 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 55 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 56 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 57 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 58 9 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 59 10 command.c:366 register_command_handler(): registering 'ocd_jtag'...
Debug: 60 10 command.c:366 register_command_handler(): registering 'ocd_svf'...
Debug: 61 10 command.c:366 register_command_handler(): registering 'ocd_xsvf'...
Debug: 62 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_buspirate_port /dev/ttyUSB0
Debug: 63 10 command.c:145 script_debug(): command - buspirate_port ocd_buspirate_port /dev/ttyUSB0
Debug: 65 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_buspirate_speed normal
Debug: 66 10 command.c:145 script_debug(): command - buspirate_speed ocd_buspirate_speed normal
Debug: 68 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config srst_only
Debug: 69 10 command.c:145 script_debug(): command - reset_config ocd_reset_config srst_only
User : 71 10 command.c:546 command_print(): srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Debug: 72 10 configuration.c:84 find_file(): found tcl/target/raspberry.cfg
Debug: 73 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_khz 1000
Debug: 74 10 command.c:145 script_debug(): command - adapter_khz ocd_adapter_khz 1000
Debug: 76 10 core.c:1629 jtag_config_khz(): handle jtag khz
Debug: 77 10 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 78 10 core.c:1596 adapter_khz_to_speed(): convert khz to interface specific speed value
User : 79 10 command.c:546 command_print(): adapter speed: 1000 kHz
Debug: 80 10 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_adapter_nsrst_delay 400
Debug: 81 10 command.c:145 script_debug(): command - adapter_nsrst_delay ocd_adapter_nsrst_delay 400
User : 83 10 command.c:546 command_print(): adapter_nsrst_delay: 400
Debug: 84 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_reset_config none
Debug: 85 11 command.c:145 script_debug(): command - reset_config ocd_reset_config none
User : 87 11 command.c:546 command_print(): none separate
Debug: 88 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag newtap rspi arm -irlen 5 -expected-id 0x07b7617F
Debug: 89 11 command.c:145 script_debug(): command - ocd_jtag ocd_jtag newtap rspi arm -irlen 5 -expected-id 0x07b7617F
Debug: 90 11 tcl.c:549 jim_newtap_cmd(): Creating New Tap, Chip: rspi, Tap: arm, Dotted: rspi.arm, 4 params
Debug: 91 11 tcl.c:573 jim_newtap_cmd(): Processing option: -irlen
Debug: 92 11 tcl.c:573 jim_newtap_cmd(): Processing option: -expected-id
Debug: 93 11 core.c:1302 jtag_tap_init(): Created Tap: rspi.arm @ abs position 0, irlen 5, capture: 0x1 mask: 0x3
Debug: 94 11 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target create rspi.arm arm11 -chain-position rspi.arm
Debug: 95 11 command.c:145 script_debug(): command - ocd_target ocd_target create rspi.arm arm11 -chain-position rspi.arm
Debug: 96 11 target.c:1837 target_free_all_working_areas_restore(): freeing all working areas
Debug: 97 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 98 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 99 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 100 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 101 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 102 11 command.c:366 register_command_handler(): registering 'ocd_arm'...
Debug: 103 11 command.c:366 register_command_handler(): registering 'ocd_etm'...
Debug: 104 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 105 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 106 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 107 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 108 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 109 11 command.c:366 register_command_handler(): registering 'ocd_arm11'...
Debug: 110 11 armv4_5.c:422 arm_set_cpsr(): set CPSR 0x00000010: User mode, ARM state
Debug: 111 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 112 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 113 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 114 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 115 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 116 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 117 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 118 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 119 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 120 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 121 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 122 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 123 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 124 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 125 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 126 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 127 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 128 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 129 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 130 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 131 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 132 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 133 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 134 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 135 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 136 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 137 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 138 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 139 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 140 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 141 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 142 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 143 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 144 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 145 12 command.c:366 register_command_handler(): registering 'ocd_rspi.arm'...
Debug: 146 12 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_rspi.arm configure -event gdb-attach halt
Debug: 147 12 command.c:145 script_debug(): command - ocd_rspi.arm ocd_rspi.arm configure -event gdb-attach halt
Debug: 148 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 149 13 command.c:145 script_debug(): command - init ocd_init
Debug: 151 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target init
Debug: 152 13 command.c:145 script_debug(): command - ocd_target ocd_target init
Debug: 154 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_target names
Debug: 155 13 command.c:145 script_debug(): command - ocd_target ocd_target names
Debug: 156 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_rspi.arm cget -event gdb-flash-erase-start
Debug: 157 13 command.c:145 script_debug(): command - ocd_rspi.arm ocd_rspi.arm cget -event gdb-flash-erase-start
Debug: 158 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_rspi.arm configure -event gdb-flash-erase-start reset init
Debug: 159 13 command.c:145 script_debug(): command - ocd_rspi.arm ocd_rspi.arm configure -event gdb-flash-erase-start reset init
Debug: 160 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_rspi.arm cget -event gdb-flash-write-end
Debug: 161 13 command.c:145 script_debug(): command - ocd_rspi.arm ocd_rspi.arm cget -event gdb-flash-write-end
Debug: 162 13 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_rspi.arm configure -event gdb-flash-write-end reset halt
Debug: 163 13 command.c:145 script_debug(): command - ocd_rspi.arm ocd_rspi.arm configure -event gdb-flash-write-end reset halt
Debug: 164 13 target.c:1313 handle_target_init_command(): Initializing targets...
Debug: 165 13 command.c:366 register_command_handler(): registering 'ocd_target_request'...
Debug: 166 13 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 167 13 command.c:366 register_command_handler(): registering 'ocd_trace'...
Debug: 168 13 command.c:366 register_command_handler(): registering 'ocd_fast_load_image'...
Debug: 169 13 command.c:366 register_command_handler(): registering 'ocd_fast_load'...
Debug: 170 13 command.c:366 register_command_handler(): registering 'ocd_profile'...
Debug: 171 13 command.c:366 register_command_handler(): registering 'ocd_virt2phys'...
Debug: 172 14 command.c:366 register_command_handler(): registering 'ocd_reg'...
Debug: 173 14 command.c:366 register_command_handler(): registering 'ocd_poll'...
Debug: 174 14 command.c:366 register_command_handler(): registering 'ocd_wait_halt'...
Debug: 175 14 command.c:366 register_command_handler(): registering 'ocd_halt'...
Debug: 176 14 command.c:366 register_command_handler(): registering 'ocd_resume'...
Debug: 177 14 command.c:366 register_command_handler(): registering 'ocd_reset'...
Debug: 178 14 command.c:366 register_command_handler(): registering 'ocd_soft_reset_halt'...
Debug: 179 14 command.c:366 register_command_handler(): registering 'ocd_step'...
Debug: 180 14 command.c:366 register_command_handler(): registering 'ocd_mdw'...
Debug: 181 14 command.c:366 register_command_handler(): registering 'ocd_mdh'...
Debug: 182 14 command.c:366 register_command_handler(): registering 'ocd_mdb'...
Debug: 183 14 command.c:366 register_command_handler(): registering 'ocd_mww'...
Debug: 184 14 command.c:366 register_command_handler(): registering 'ocd_mwh'...
Debug: 185 14 command.c:366 register_command_handler(): registering 'ocd_mwb'...
Debug: 186 14 command.c:366 register_command_handler(): registering 'ocd_bp'...
Debug: 187 14 command.c:366 register_command_handler(): registering 'ocd_rbp'...
Debug: 188 14 command.c:366 register_command_handler(): registering 'ocd_wp'...
Debug: 189 14 command.c:366 register_command_handler(): registering 'ocd_rwp'...
Debug: 190 14 command.c:366 register_command_handler(): registering 'ocd_load_image'...
Debug: 191 14 command.c:366 register_command_handler(): registering 'ocd_dump_image'...
Debug: 192 14 command.c:366 register_command_handler(): registering 'ocd_verify_image'...
Debug: 193 14 command.c:366 register_command_handler(): registering 'ocd_test_image'...
Debug: 194 14 command.c:366 register_command_handler(): registering 'ocd_reset_nag'...
Debug: 195 14 command.c:366 register_command_handler(): registering 'ocd_ps'...
Debug: 196 14 command.c:366 register_command_handler(): registering 'ocd_test_mem_access'...
Info : 197 116 buspirate.c:232 read_and_discard_all_data(): Some stale data from a previous connection was discarded.
Debug: 198 218 buspirate.c:834 buspirate_jtag_enable(): Entering binary mode
Debug: 199 218 buspirate.c:1059 buspirate_serial_write(): size = 20 ret = 20
Debug: 200 218 buspirate.c:1121 buspirate_print_buffer(): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Debug: 201 218 buspirate.c:1127 buspirate_print_buffer(): 00 00 00 00
Debug: 202 229 buspirate.c:1091 buspirate_serial_read(): should have read = 4 actual size = 4
Debug: 203 229 buspirate.c:1127 buspirate_print_buffer(): 42 42 49 4f
Debug: 204 229 buspirate.c:1091 buspirate_serial_read(): should have read = 1 actual size = 1
Debug: 205 229 buspirate.c:1127 buspirate_print_buffer(): 31
Debug: 206 229 buspirate.c:1059 buspirate_serial_write(): size = 1 ret = 1
Debug: 207 229 buspirate.c:1127 buspirate_print_buffer(): 06
Debug: 208 233 buspirate.c:1091 buspirate_serial_read(): should have read = 4 actual size = 4
Debug: 209 233 buspirate.c:1127 buspirate_print_buffer(): 4f 43 44 31
Info : 210 233 buspirate.c:305 buspirate_init(): Buspirate Interface ready!
Debug: 211 233 buspirate.c:1059 buspirate_serial_write(): size = 2 ret = 2
Debug: 212 233 buspirate.c:1127 buspirate_print_buffer(): 01 02
Debug: 213 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 214 233 buspirate.c:1127 buspirate_print_buffer(): 02 02 00
Debug: 215 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 216 233 buspirate.c:1127 buspirate_print_buffer(): 02 10 00
Debug: 217 233 buspirate.c:809 buspirate_reset(): trst: 0, srst: 0
Debug: 218 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 219 233 buspirate.c:1127 buspirate_print_buffer(): 02 04 01
Debug: 220 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 221 233 buspirate.c:1127 buspirate_print_buffer(): 02 08 01
Info : 222 233 core.c:1355 adapter_init(): This adapter doesn't support configurable speed
Debug: 223 233 openocd.c:137 handle_init_command(): Debug Adapter init complete
Debug: 224 233 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_transport init
Debug: 225 233 command.c:145 script_debug(): command - ocd_transport ocd_transport init
Debug: 227 233 transport.c:240 handle_transport_init(): handle_transport_init
Debug: 228 233 buspirate.c:809 buspirate_reset(): trst: 0, srst: 0
Debug: 229 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 230 233 buspirate.c:1127 buspirate_print_buffer(): 02 04 01
Debug: 231 233 buspirate.c:1059 buspirate_serial_write(): size = 3 ret = 3
Debug: 232 233 buspirate.c:1127 buspirate_print_buffer(): 02 08 01
Debug: 233 233 core.c:730 jtag_add_reset(): SRST line released
Debug: 234 233 core.c:754 jtag_add_reset(): TRST line released
Debug: 235 233 core.c:328 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 237 656 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init
Debug: 238 656 command.c:145 script_debug(): command - ocd_jtag ocd_jtag arp_init
Debug: 239 656 core.c:1397 jtag_init_inner(): Init JTAG chain
Debug: 240 656 core.c:328 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 241 656 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 7 scans = 0
Debug: 242 656 buspirate.c:1059 buspirate_serial_write(): size = 5 ret = 5
Debug: 243 656 buspirate.c:1127 buspirate_print_buffer(): 05 00 07 00 7f
Debug: 244 660 buspirate.c:1091 buspirate_serial_read(): should have read = 4 actual size = 4
Debug: 245 660 buspirate.c:1127 buspirate_print_buffer(): 05 00 07 7f
Debug: 246 660 core.c:1058 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 247 660 core.c:328 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 248 660 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 687 scans = 1
Debug: 249 660 buspirate.c:1059 buspirate_serial_write(): size = 175 ret = 175
Debug: 250 660 buspirate.c:1121 buspirate_print_buffer(): 05 02 af 80 17 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 251 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 252 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 253 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 254 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 255 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 256 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 257 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 258 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 259 660 buspirate.c:1121 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff 00 ff
Debug: 260 660 buspirate.c:1127 buspirate_print_buffer(): 00 ff 00 ff 00 ff 00 ff 00 ff 00 7f 40 00 7f
Debug: 261 686 buspirate.c:1091 buspirate_serial_read(): should have read = 89 actual size = 89
Debug: 262 686 buspirate.c:1121 buspirate_print_buffer(): 05 02 af ff ff ff ff ff ff ff ff ff ff ff ff ff
Debug: 263 686 buspirate.c:1121 buspirate_print_buffer(): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Debug: 264 686 buspirate.c:1121 buspirate_print_buffer(): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Debug: 265 686 buspirate.c:1121 buspirate_print_buffer(): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Debug: 266 686 buspirate.c:1121 buspirate_print_buffer(): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Debug: 267 686 buspirate.c:1127 buspirate_print_buffer(): ff ff ff ff ff ff ff ff 7f
Error: 268 686 core.c:948 jtag_examine_chain_check(): JTAG scan chain interrogation failed: all ones
Error: 269 686 core.c:949 jtag_examine_chain_check(): Check JTAG interface, timings, target power, etc.
Error: 270 686 core.c:1442 jtag_init_inner(): Trying to use configured scan chain anyway...
Debug: 271 686 core.c:1188 jtag_validate_ircapture(): IR capture validation scan
Debug: 272 686 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 18 scans = 1
Debug: 273 686 buspirate.c:1059 buspirate_serial_write(): size = 9 ret = 9
Debug: 274 686 buspirate.c:1127 buspirate_print_buffer(): 05 00 12 80 1b 3f a0 00 01
Debug: 275 690 buspirate.c:1091 buspirate_serial_read(): should have read = 6 actual size = 6
Debug: 276 690 buspirate.c:1127 buspirate_print_buffer(): 05 00 12 ff ff 03
Error: 277 690 core.c:1240 jtag_validate_ircapture(): rspi.arm: IR capture error; saw 0x1f not 0x01
Debug: 278 690 core.c:328 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 279 690 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 7 scans = 0
Debug: 280 690 buspirate.c:1059 buspirate_serial_write(): size = 5 ret = 5
Debug: 281 690 buspirate.c:1127 buspirate_print_buffer(): 05 00 07 00 7f
Debug: 282 694 buspirate.c:1091 buspirate_serial_read(): should have read = 4 actual size = 4
Debug: 283 694 buspirate.c:1127 buspirate_print_buffer(): 05 00 07 7f
Warn : 284 694 core.c:1465 jtag_init_inner(): Bypassing JTAG setup events due to errors
Debug: 285 694 openocd.c:150 handle_init_command(): Examining targets...
Debug: 286 694 target.c:1465 target_call_event_callbacks(): target event 21 (examine-start)
Debug: 287 694 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 74 scans = 4
Debug: 288 694 buspirate.c:1059 buspirate_serial_write(): size = 23 ret = 23
Debug: 289 694 buspirate.c:1121 buspirate_print_buffer(): 05 00 4a 00 1b 0f e8 00 00 00 00 00 00 00 00 00
Debug: 290 694 buspirate.c:1127 buspirate_print_buffer(): 7a 04 a0 00 03 00 01
Debug: 291 700 buspirate.c:1091 buspirate_serial_read(): should have read = 13 actual size = 13
Debug: 292 700 buspirate.c:1127 buspirate_print_buffer(): 05 00 4a ff ff ff ff ff ff ff ff ff 03
Error: 293 700 arm11_dbgtap.c:164 arm11_in_handler_SCAN_N(): 'arm11 target' JTAG error SCREG OUT 0x1f
Debug: 294 700 buspirate.c:675 buspirate_tap_execute(): executing tap num bits = 61 scans = 2
Debug: 295 700 buspirate.c:1059 buspirate_serial_write(): size = 19 ret = 19
Debug: 296 700 buspirate.c:1121 buspirate_print_buffer(): 05 00 3d 00 0f 03 74 00 00 00 00 00 00 00 00 00
Debug: 297 700 buspirate.c:1127 buspirate_print_buffer(): 00 00 0d
Debug: 298 705 buspirate.c:1091 buspirate_serial_read(): should have read = 11 actual size = 11
Debug: 299 705 buspirate.c:1127 buspirate_print_buffer(): 05 00 3d ff ff ff ff ff ff ff 1f
Error: 300 705 arm11.c:1157 arm11_examine(): unexpected ARM11 ID code
Debug: 301 705 openocd.c:152 handle_init_command(): target examination failed
Debug: 302 705 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_flash init
Debug: 303 705 command.c:145 script_debug(): command - ocd_flash ocd_flash init
Debug: 305 705 tcl.c:890 handle_flash_init_command(): Initializing flash devices...
Debug: 306 705 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_mflash init
Debug: 307 705 command.c:145 script_debug(): command - ocd_mflash ocd_mflash init
Debug: 309 705 mflash.c:1379 handle_mflash_init_command(): Initializing mflash devices...
Debug: 310 705 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_nand init
Debug: 311 705 command.c:145 script_debug(): command - ocd_nand ocd_nand init
Debug: 313 705 tcl.c:497 handle_nand_init_command(): Initializing NAND devices...
Debug: 314 706 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_pld init
Debug: 315 706 command.c:145 script_debug(): command - ocd_pld ocd_pld init
Debug: 317 706 pld.c:207 handle_pld_init_command(): Initializing PLDs...
答案 0 :(得分:1)
我能够使用V3 sparkfun开发板工作。我有一个相当小的总线盗版配置文件:
source [find interface/buspirate.cfg]
interface buspirate
buspirate_port /dev/ttyUSB0
buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 1
buspirate_speed normal
我发布了所有详细信息on my github PiOCD wiki
简而言之,我浪费时间的最大问题是,我错误地猜到了我的实验设备(LinksSys BEFSR41路由器)上的jtag引脚。我没有看到您尝试连接到Bus Pirate jtag连接器的设备。
我像这样启动OpenOCD:
sudo openocd -s /usr/share/openocd -f board/buspirate.cfg
这就是我所看到的:
Open On-Chip Debugger 0.10.0-dev-00040-gd52070c (2015-10-09-16:51)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Warn : Interface already configured, ignoring
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
Info : JTAG tap: auto0.tap tap/device found: 0x1f0f0f0f (mfg: 0x787, part: 0xf0f0, ver: 0x1)
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -irlen 4 -expected-id 0x1f0f0f0f"
Warn : gdb services need one or more targets defined
发布后的几个月,希望这仍然有用:)
答案 1 :(得分:1)
我认为你会发现最大的问题是Raspberry Pi正在使用Broadcom BCM28XX芯片。
这些用于机顶盒,获取数据表或模型(BSDL)需要与Broadcom签订NDA。
我希望Pi在工厂中使用JTAG进行测试,但BCM芯片可能具有安全保险丝,一旦编程序列号,就会在生产过程结束时烧断。
随着熔断器熔断,JTAG链将被破坏。
如果数据表和BSDL文件在一般发布时比任何人都可以"修改"他们的机顶盒和盒子的供应商可能会有点不高兴
我认为你会遇到的另一个问题是BCM芯片在标准JTAG兼容设备中可能会有很多其他问题。
我猜测BCM是ASIC的一部分,有一些内部闪存,可能还有PLA(FPGA或CPLD)。
他们也有一个ARM核心处理器。
祝你好运,但Pi不是我用作JTAG训练平台的电路板。