espressif / openocd-esp32

OpenOCD branch with ESP32 JTAG support
Other
360 stars 132 forks source link

Error: Unsupported DTM version: 14 (OCD-342) #152

Closed MabezDev closed 3 years ago

MabezDev commented 3 years ago

Trying to interrogate the riscv core in the esp32c3 through a segger j-link, unfortunately I am running into the output in the issue title.

Full output:

Open On-Chip Debugger  v0.10.0-esp32-20210401 (2021-04-01-15:45)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
force hard breakpoints
none
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : J-Link V10 compiled Jul 23 2019 13:46:10
Info : Hardware version: 10.10
Info : VTarget = 3.270 V
Info : clock speed 1000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Error: Unsupported DTM version: 14
Info : Listening on port 3333 for gdb connections

Output with -d3:

Open On-Chip Debugger  v0.10.0-esp32-20210401 (2021-04-01-15:45)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
User : 13 1 options.c:57 configuration_output_handler(): debug_level: 3
User : 14 1 options.c:57 configuration_output_handler(): 
Debug: 15 1 options.c:181 add_default_dirs(): bindir=/builds/idf/openocd-esp32/_build/../openocd-esp32/bin
Debug: 16 1 options.c:182 add_default_dirs(): pkgdatadir=/builds/idf/openocd-esp32/_build/../openocd-esp32/share/openocd
Debug: 17 1 options.c:183 add_default_dirs(): exepath=/home/mabez/programs/openocd-esp32/bin
Debug: 18 1 options.c:184 add_default_dirs(): bin2data=../share/openocd
Debug: 19 1 configuration.c:42 add_script_search_dir(): adding /home/mabez/.openocd
Debug: 20 1 configuration.c:42 add_script_search_dir(): adding /home/mabez/programs/openocd-esp32/bin/../share/openocd/site
Debug: 21 1 configuration.c:42 add_script_search_dir(): adding /home/mabez/programs/openocd-esp32/bin/../share/openocd/scripts
Debug: 22 1 configuration.c:97 find_file(): found openocd.cfg
Debug: 23 1 command.c:143 script_debug(): command - adapter_khz adapter_khz 1000
Debug: 25 1 core.c:1704 jtag_config_khz(): handle jtag khz
Debug: 26 1 core.c:1667 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 27 1 core.c:1667 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 28 1 configuration.c:97 find_file(): found /home/mabez/programs/openocd-esp32/bin/../share/openocd/scripts/interface/jlink.cfg
Debug: 29 1 command.c:143 script_debug(): command - interface interface jlink
Debug: 31 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 32 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 33 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 34 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 35 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 36 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 37 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 38 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 39 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 40 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 41 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 42 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 43 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 44 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 45 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 46 1 command.c:355 register_command_handler(): registering 'jlink'...
Debug: 47 1 configuration.c:97 find_file(): found /home/mabez/programs/openocd-esp32/bin/../share/openocd/scripts/target/esp32c3.cfg
Debug: 48 1 command.c:143 script_debug(): command - transport transport select jtag
Debug: 49 1 command.c:355 register_command_handler(): registering 'jtag_flush_queue_sleep'...
Debug: 50 1 command.c:355 register_command_handler(): registering 'jtag_rclk'...
Debug: 51 1 command.c:355 register_command_handler(): registering 'jtag_ntrst_delay'...
Debug: 52 1 command.c:355 register_command_handler(): registering 'jtag_ntrst_assert_width'...
Debug: 53 1 command.c:355 register_command_handler(): registering 'scan_chain'...
Debug: 54 1 command.c:355 register_command_handler(): registering 'jtag_reset'...
Debug: 55 1 command.c:355 register_command_handler(): registering 'runtest'...
Debug: 56 1 command.c:355 register_command_handler(): registering 'irscan'...
Debug: 57 1 command.c:355 register_command_handler(): registering 'verify_ircapture'...
Debug: 58 1 command.c:355 register_command_handler(): registering 'verify_jtag'...
Debug: 59 1 command.c:355 register_command_handler(): registering 'tms_sequence'...
Debug: 60 1 command.c:355 register_command_handler(): registering 'wait_srst_deassert'...
Debug: 61 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 62 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 63 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 64 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 65 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 66 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 67 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 68 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 69 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 70 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 71 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 72 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 73 1 command.c:355 register_command_handler(): registering 'jtag'...
Debug: 74 1 command.c:355 register_command_handler(): registering 'svf'...
Debug: 75 1 command.c:355 register_command_handler(): registering 'xsvf'...
Debug: 76 1 configuration.c:97 find_file(): found /home/mabez/programs/openocd-esp32/bin/../share/openocd/scripts/target/esp_common.cfg
Debug: 77 1 command.c:143 script_debug(): command - add_help_text add_help_text program_esp write an image to flash, address is only required for binary images. verify, reset, exit, compress are optional
Debug: 79 1 command.c:1127 help_add_command(): added 'program_esp' help text
Debug: 80 1 command.c:143 script_debug(): command - add_usage_text add_usage_text program_esp <filename> [address] [verify] [reset] [exit] [compress]
Debug: 82 1 command.c:1153 help_add_command(): added 'program_esp' usage text
Debug: 83 1 command.c:143 script_debug(): command - add_help_text add_help_text program_esp_bins write all the images at address specified in flasher_args.json generated while building idf project
Debug: 85 1 command.c:1127 help_add_command(): added 'program_esp_bins' help text
Debug: 86 2 command.c:143 script_debug(): command - add_usage_text add_usage_text program_esp_bins <build_dir> flasher_args.json [verify] [reset] [exit] [compress]
Debug: 88 2 command.c:1153 help_add_command(): added 'program_esp_bins' usage text
Debug: 89 2 command.c:143 script_debug(): command - add_help_text add_help_text esp_get_mac Print MAC address of the chip from EFUSE_BLK0_RDATA1_REG and EFUSE_BLK0_RDATA2_REG. Use a `format` argument to return formatted MAC value
Debug: 91 2 command.c:1127 help_add_command(): added 'esp_get_mac' help text
Debug: 92 2 command.c:143 script_debug(): command - add_usage_text add_usage_text esp_get_mac [format]
Debug: 94 2 command.c:1153 help_add_command(): added 'esp_get_mac' usage text
Debug: 95 2 command.c:143 script_debug(): command - jtag jtag newtap esp32c3 cpu -irlen 5 -expected-id 0x00005c25
Debug: 96 2 tcl.c:567 jim_newtap_cmd(): Creating New Tap, Chip: esp32c3, Tap: cpu, Dotted: esp32c3.cpu, 4 params
Debug: 97 2 tcl.c:591 jim_newtap_cmd(): Processing option: -irlen
Debug: 98 2 tcl.c:591 jim_newtap_cmd(): Processing option: -expected-id
Debug: 99 2 core.c:1372 jtag_tap_init(): Created Tap: esp32c3.cpu @ abs position 0, irlen 5, capture: 0x1 mask: 0x3
Debug: 100 2 command.c:143 script_debug(): command - target target create esp32c3 riscv -chain-position esp32c3.cpu -rtos FreeRTOS
Debug: 101 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 102 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 103 2 FreeRTOS.c:1202 FreeRTOS_create(): FreeRTOS_create
Debug: 104 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 105 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 106 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 107 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 108 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 109 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 110 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 111 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 112 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 113 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 114 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 115 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 116 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 117 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 118 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 119 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 120 2 command.c:355 register_command_handler(): registering 'riscv'...
Debug: 121 2 command.c:355 register_command_handler(): registering 'arm'...
Debug: 122 2 command.c:355 register_command_handler(): registering 'arm'...
Debug: 123 2 command.c:355 register_command_handler(): registering 'arm'...
Debug: 124 2 command.c:355 register_command_handler(): registering 'arm'...
Debug: 125 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 126 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 127 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 128 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 129 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 130 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 131 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 132 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 133 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 134 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 135 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 136 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 137 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 138 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 139 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 140 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 141 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 142 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 143 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 144 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 145 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 146 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 147 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 148 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 149 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 150 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 151 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 152 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 153 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 154 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 155 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 156 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 157 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 158 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 159 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 160 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 161 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 162 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 163 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 164 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 165 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 166 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 167 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 168 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 169 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 170 2 command.c:355 register_command_handler(): registering 'esp32c3'...
Debug: 171 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -event reset-assert-post  esp32c3_soc_reset 
Debug: 172 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -event halted  esp32c3_wdt_disable 
Debug: 173 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -work-area-phys 0x4037C000 -work-area-virt 0x4037C000 -work-area-size 0x4000 -work-area-backup 1
Debug: 174 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 175 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 176 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 177 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 178 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -alt-work-area-phys 0x3FC80000 -alt-work-area-virt 0x3FC80000 -alt-work-area-size 0x6000 -alt-work-area-backup 1
Debug: 179 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 180 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 181 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 182 2 target.c:2010 target_free_all_working_areas_restore(): freeing all working areas
Debug: 183 2 command.c:143 script_debug(): command - gdb_breakpoint_override gdb_breakpoint_override hard
User : 185 2 gdb_server.c:3761 handle_gdb_breakpoint_override_command(): force hard breakpoints
Debug: 186 2 command.c:143 script_debug(): command - riscv riscv set_reset_timeout_sec 2
Debug: 188 2 command.c:143 script_debug(): command - riscv riscv set_command_timeout_sec 5
Debug: 190 2 command.c:143 script_debug(): command - riscv riscv set_prefer_sba on
User : 192 2 options.c:57 configuration_output_handler(): noneUser : 193 2 options.c:57 configuration_output_handler(): 
Info : 194 2 server.c:311 add_service(): Listening on port 6666 for tcl connections
Info : 195 2 server.c:311 add_service(): Listening on port 4444 for telnet connections
Debug: 196 2 command.c:143 script_debug(): command - init init
Debug: 198 2 command.c:143 script_debug(): command - target target init
Debug: 200 2 command.c:143 script_debug(): command - target target names
Debug: 201 2 command.c:143 script_debug(): command - esp32c3 esp32c3 cget -event gdb-flash-erase-start
Debug: 202 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -event gdb-flash-erase-start reset init
Debug: 203 2 command.c:143 script_debug(): command - esp32c3 esp32c3 cget -event gdb-flash-write-end
Debug: 204 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -event gdb-flash-write-end reset halt
Debug: 205 2 command.c:143 script_debug(): command - esp32c3 esp32c3 cget -event gdb-attach
Debug: 206 2 command.c:143 script_debug(): command - esp32c3 esp32c3 configure -event gdb-attach halt
Debug: 207 2 target.c:1448 handle_target_init_command(): Initializing targets...
Debug: 208 2 riscv.c:433 riscv_init_target(): riscv_init_target()
Debug: 209 2 semihosting_common.c:98 semihosting_common_init():  
Debug: 210 2 command.c:355 register_command_handler(): registering 'target_request'...
Debug: 211 2 command.c:355 register_command_handler(): registering 'trace'...
Debug: 212 2 command.c:355 register_command_handler(): registering 'trace'...
Debug: 213 2 command.c:355 register_command_handler(): registering 'fast_load_image'...
Debug: 214 2 command.c:355 register_command_handler(): registering 'fast_load'...
Debug: 215 2 command.c:355 register_command_handler(): registering 'profile'...
Debug: 216 2 command.c:355 register_command_handler(): registering 'virt2phys'...
Debug: 217 2 command.c:355 register_command_handler(): registering 'reg'...
Debug: 218 2 command.c:355 register_command_handler(): registering 'poll'...
Debug: 219 2 command.c:355 register_command_handler(): registering 'wait_halt'...
Debug: 220 2 command.c:355 register_command_handler(): registering 'halt'...
Debug: 221 2 command.c:355 register_command_handler(): registering 'resume'...
Debug: 222 3 command.c:355 register_command_handler(): registering 'reset'...
Debug: 223 3 command.c:355 register_command_handler(): registering 'soft_reset_halt'...
Debug: 224 3 command.c:355 register_command_handler(): registering 'step'...
Debug: 225 3 command.c:355 register_command_handler(): registering 'mdd'...
Debug: 226 3 command.c:355 register_command_handler(): registering 'mdw'...
Debug: 227 3 command.c:355 register_command_handler(): registering 'mdh'...
Debug: 228 3 command.c:355 register_command_handler(): registering 'mdb'...
Debug: 229 3 command.c:355 register_command_handler(): registering 'mwd'...
Debug: 230 3 command.c:355 register_command_handler(): registering 'mww'...
Debug: 231 3 command.c:355 register_command_handler(): registering 'mwh'...
Debug: 232 3 command.c:355 register_command_handler(): registering 'mwb'...
Debug: 233 3 command.c:355 register_command_handler(): registering 'bp'...
Debug: 234 3 command.c:355 register_command_handler(): registering 'rbp'...
Debug: 235 3 command.c:355 register_command_handler(): registering 'wp'...
Debug: 236 3 command.c:355 register_command_handler(): registering 'rwp'...
Debug: 237 3 command.c:355 register_command_handler(): registering 'load_image'...
Debug: 238 3 command.c:355 register_command_handler(): registering 'dump_image'...
Debug: 239 3 command.c:355 register_command_handler(): registering 'verify_image_checksum'...
Debug: 240 3 command.c:355 register_command_handler(): registering 'verify_image'...
Debug: 241 3 command.c:355 register_command_handler(): registering 'test_image'...
Debug: 242 3 command.c:355 register_command_handler(): registering 'reset_nag'...
Debug: 243 3 command.c:355 register_command_handler(): registering 'ps'...
Debug: 244 3 command.c:355 register_command_handler(): registering 'test_mem_access'...
Debug: 245 3 jlink.c:580 jlink_init(): Using libjaylink 0.2.0-git-f73ad5e (compiled with 0.2.0-git-f73ad5e).
Debug: 246 5 jlink.c:534 jaylink_log_handler(): Found device (VID:PID = 1366:0101, bus:address = 003:002).
Debug: 247 5 jlink.c:534 jaylink_log_handler(): Device: USB address = 0.
Debug: 248 5 jlink.c:534 jaylink_log_handler(): Device: Serial number = 260111976.
Debug: 249 5 jlink.c:534 jaylink_log_handler(): Allocating new device instance.
Debug: 250 5 jlink.c:534 jaylink_log_handler(): Found 1 USB device(s).
Debug: 251 5 jlink.c:534 jaylink_log_handler(): Trying to open device (bus:address = 003:002).
Debug: 252 5 jlink.c:534 jaylink_log_handler(): Using endpoint 81 (IN) and 01 (OUT).
Debug: 253 5 jlink.c:534 jaylink_log_handler(): Device opened successfully.
Info : 261 5 jlink.c:704 jlink_init(): J-Link V10 compiled Jul 23 2019 13:46:10
Info : 274 6 jlink.c:745 jlink_init(): Hardware version: 10.10
Info : 283 7 jlink.c:787 jlink_init(): VTarget = 3.270 V
Debug: 289 7 jlink.c:534 jaylink_log_handler(): Last read operation left 16 bytes in the buffer.
Debug: 299 8 jlink.c:939 jlink_reset(): TRST: 0, SRST: 0.
Debug: 319 11 core.c:1667 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 320 11 core.c:1671 adapter_khz_to_speed(): have interface set up
Debug: 327 12 core.c:1667 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 328 12 core.c:1671 adapter_khz_to_speed(): have interface set up
Info : 329 12 core.c:1449 adapter_init(): clock speed 1000 kHz
Debug: 330 12 openocd.c:141 handle_init_command(): Debug Adapter init complete
Debug: 331 12 command.c:143 script_debug(): command - transport transport init
Debug: 333 12 transport.c:239 handle_transport_init(): handle_transport_init
Debug: 334 12 jlink.c:939 jlink_reset(): TRST: 0, SRST: 0.
Debug: 339 12 core.c:729 jtag_add_reset(): SRST line released
Debug: 340 12 core.c:753 jtag_add_reset(): TRST line released
Debug: 341 12 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 342 12 command.c:143 script_debug(): command - jtag jtag arp_init
Debug: 343 12 core.c:1462 jtag_init_inner(): Init JTAG chain
Debug: 344 12 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 354 13 core.c:1128 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 355 13 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Info : 365 14 core.c:1027 jtag_examine_chain_display(): JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Debug: 366 14 core.c:1258 jtag_validate_ircapture(): IR capture validation scan
Debug: 376 14 core.c:1316 jtag_validate_ircapture(): esp32c3.cpu: IR capture 0x05
Debug: 377 14 command.c:143 script_debug(): command - dap dap init
Debug: 379 14 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 380 14 openocd.c:158 handle_init_command(): Examining targets...
Debug: 381 14 target.c:1636 target_call_event_callbacks(): target event 17 (examine-start) for core esp32c3
Debug: 382 14 riscv.c:975 riscv_examine(): riscv_examine()
Debug: 392 15 riscv.c:405 dtmcontrol_scan(): DTMCONTROL: 0x0 -> 0xfffffffe
Debug: 393 15 riscv.c:985 riscv_examine(): dtmcontrol=0xfffffffe
Debug: 394 15 riscv.c:987 riscv_examine():   version=0xe
Error: 395 15 riscv.c:425 get_target_type(): Unsupported DTM version: 14
Debug: 396 15 openocd.c:160 handle_init_command(): target examination failed
Debug: 397 15 command.c:143 script_debug(): command - flash flash init
Debug: 399 15 tcl.c:1222 handle_flash_init_command(): Initializing flash devices...
Debug: 400 15 command.c:143 script_debug(): command - nand nand init
Debug: 402 15 tcl.c:498 handle_nand_init_command(): Initializing NAND devices...
Debug: 403 15 command.c:143 script_debug(): command - pld pld init
Debug: 405 15 pld.c:206 handle_pld_init_command(): Initializing PLDs...
Debug: 406 15 gdb_server.c:3584 gdb_target_start(): starting gdb server for esp32c3 on 3333
Info : 407 15 server.c:311 add_service(): Listening on port 3333 for gdb connections

Setup

Using the latest release, 2021-04-01, my openocd file contains the following:


adapter_khz 1000

# jlink
source [find interface/jlink.cfg]

# Source the ESP32-C3 configuration file
source [find target/esp32c3.cfg]

set ESP32_RTOS none

I believe the wiring is correct as the JTAG tap is correctly connected to and printed to stdout before the core examine fails.

Let me know if any other information is required.

igrr commented 3 years ago

What application have you flashed into the ESP32-C3? The "blink" example used to toggle GPIO5, until this was changed recently. GPIO5 is one of the JTAG pins on ESP32-C3, and overriding its function from the app may cause such an issue.

Please try flashing the hello_world example and see if that changes the behavior.

MabezDev commented 3 years ago

Ah, that's almost definitely it. Just so happened I chose the blinky example to verify my jtag setup. Will verify tomorrow and close :)

MabezDev commented 3 years ago

That was exactly it, thanks!