Cannot flash via JTAG (VSC-849)
See original GitHub issuePre Bug Report Checklist
- Make sure you have searched for existing bugs and features request before you post an issue.
- This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
- I’ve read the docs and found no information that could have helped solving the issue.
Describe the bug I am working with a ESP32-WROVER-KIT which is configured with the JTAG interface as for the docs. I can successfully flash the firmware using the command line:
openocd -d3 -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover-kit-3.3v.cfg
Instead, flashing from VSCode fails.
To Reproduce
I have tried several settings.json
configurations. This one looks like the most reasonable:
{
"idf.adapterTargetName": "esp32",
"idf.openOcdDebugLevel": 3,
"idf.openOcdConfigs": [
"board/esp32-wrover-kit-3.3v.cfg"
],
"cmake.configureOnOpen": false,
}
From process explorer, I can see the command line launched from VSCode is the following:
openocd -d3 -f board/esp32-wrover-kit-3.3v.cfg
Anyway, the flashing process starts but it hangs.
The complete (level 3) log is the following:
Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 5 options.c:63 configuration_output_handler(): debug_level: 3
User : 14 5 options.c:63 configuration_output_handler():
Debug: 15 5 options.c:244 add_default_dirs(): bindir=/builds/idf/openocd-esp32/_build/../openocd-esp32/bin
Debug: 16 6 options.c:245 add_default_dirs(): pkgdatadir=/builds/idf/openocd-esp32/_build/../openocd-esp32/share/openocd
Debug: 17 6 options.c:246 add_default_dirs(): exepath=C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20211220/openocd-esp32/bin
Debug: 18 6 options.c:247 add_default_dirs(): bin2data=../share/openocd
Debug: 19 6 configuration.c:42 add_script_search_dir(): adding C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts
Debug: 20 7 configuration.c:42 add_script_search_dir(): adding C:/Users/raffaeler/AppData/Roaming/OpenOCD
Debug: 21 7 configuration.c:42 add_script_search_dir(): adding C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20211220/openocd-esp32/bin/../share/openocd/site
Debug: 22 8 configuration.c:42 add_script_search_dir(): adding C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20211220/openocd-esp32/bin/../share/openocd/scripts
Debug: 23 8 configuration.c:97 find_file(): found C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts/board/esp32-wrover-kit-3.3v.cfg
Debug: 24 11 configuration.c:97 find_file(): found C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts/interface/ftdi/esp32_devkitj_v1.cfg
Debug: 25 11 command.c:146 script_debug(): command - adapter driver ftdi
Debug: 27 11 command.c:146 script_debug(): command - ftdi_vid_pid 0x0403 0x6010 0x0403 0x6014
Debug: 29 12 command.c:146 script_debug(): command - ftdi_channel 0
Debug: 31 12 command.c:146 script_debug(): command - ftdi_layout_init 0x0008 0xf00b
Debug: 33 12 command.c:146 script_debug(): command - ftdi_layout_signal LED -data 0x1000
Debug: 35 12 command.c:146 script_debug(): command - ftdi_layout_signal LED2 -data 0x2000
Debug: 37 12 command.c:146 script_debug(): command - ftdi_layout_signal LED3 -data 0x4000
Debug: 39 13 command.c:146 script_debug(): command - ftdi_layout_signal LED4 -data 0x8000
Debug: 41 13 command.c:146 script_debug(): command - reset_config none
Debug: 43 13 command.c:146 script_debug(): command - adapter speed 20000
Debug: 45 13 core.c:1822 jtag_config_khz(): handle jtag khz
Debug: 46 13 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 47 14 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 48 14 configuration.c:97 find_file(): found C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts/target/esp32.cfg
Debug: 49 14 command.c:146 script_debug(): command - transport select jtag
Debug: 50 15 configuration.c:97 find_file(): found C:\Espressif\tools\openocd-esp32\v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts/target/esp_common.cfg
Debug: 51 16 command.c:146 script_debug(): command - add_help_text program_esp write an image to flash, address is only required for binary images. verify, reset, exit, compress, restore_clock are optional
Debug: 53 16 command.c:1115 help_add_command(): added 'program_esp' help text
Debug: 54 16 command.c:146 script_debug(): command - add_usage_text program_esp <filename> [address] [verify] [reset] [exit] [compress] [restore_clock]
Debug: 56 17 command.c:1141 help_add_command(): added 'program_esp' usage text
Debug: 57 17 command.c:146 script_debug(): command - add_help_text program_esp_bins write all the images at address specified in flasher_args.json generated while building idf project
Debug: 59 17 command.c:1115 help_add_command(): added 'program_esp_bins' help text
Debug: 60 17 command.c:146 script_debug(): command - add_usage_text program_esp_bins <build_dir> flasher_args.json [verify] [reset] [exit] [compress] [restore_clock]
Debug: 62 18 command.c:1141 help_add_command(): added 'program_esp_bins' usage text
Debug: 63 18 command.c:146 script_debug(): command - add_help_text esp_get_mac Print MAC address of the chip. Use a `format` argument to return formatted MAC value
Debug: 65 18 command.c:1115 help_add_command(): added 'esp_get_mac' help text
Debug: 66 19 command.c:146 script_debug(): command - add_usage_text esp_get_mac [format]
Debug: 68 19 command.c:1141 help_add_command(): added 'esp_get_mac' usage text
Debug: 69 19 command.c:146 script_debug(): command - jtag newtap esp32 cpu0 -irlen 5 -expected-id 0x120034e5
Debug: 70 19 tcl.c:572 jim_newtap_cmd(): Creating New Tap, Chip: esp32, Tap: cpu0, Dotted: esp32.cpu0, 4 params
Debug: 71 20 tcl.c:596 jim_newtap_cmd(): Processing option: -irlen
Debug: 72 20 tcl.c:596 jim_newtap_cmd(): Processing option: -expected-id
Debug: 73 20 core.c:1488 jtag_tap_init(): Created Tap: esp32.cpu0 @ abs position 0, irlen 5, capture: 0x1 mask: 0x3
Debug: 74 20 command.c:146 script_debug(): command - jtag newtap esp32 cpu1 -irlen 5 -expected-id 0x120034e5
Debug: 75 21 tcl.c:572 jim_newtap_cmd(): Creating New Tap, Chip: esp32, Tap: cpu1, Dotted: esp32.cpu1, 4 params
Debug: 76 21 tcl.c:596 jim_newtap_cmd(): Processing option: -irlen
Debug: 77 21 tcl.c:596 jim_newtap_cmd(): Processing option: -expected-id
Debug: 78 21 core.c:1488 jtag_tap_init(): Created Tap: esp32.cpu1 @ abs position 1, irlen 5, capture: 0x1 mask: 0x3
Debug: 79 22 command.c:146 script_debug(): command - target create esp32.cpu0 esp32 -endian little -chain-position esp32.cpu0 -coreid 0 -rtos FreeRTOS
Debug: 80 22 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 81 22 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 82 23 FreeRTOS.c:1242 FreeRTOS_create(): FreeRTOS_create
Debug: 83 23 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 84 23 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 85 23 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 86 24 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 87 24 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 88 24 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 89 24 command.c:376 register_command(): command 'flashbootstrap' is already registered in 'esp32' context
Debug: 90 25 command.c:376 register_command(): command 'esp' is already registered in 'esp32.cpu0' context
Debug: 91 25 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu0' context
Debug: 92 25 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu0' context
Debug: 93 25 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu0' context
Debug: 94 26 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu0' context
Debug: 95 26 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu0' context
Debug: 96 26 command.c:376 register_command(): command 'flashbootstrap' is already registered in 'esp32' context
Debug: 97 26 command.c:146 script_debug(): command - esp32.cpu0 configure -work-area-phys 0x40090000 -work-area-virt 0x40090000 -work-area-size 0x4000 -work-area-backup 1
Debug: 98 27 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 99 27 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 100 27 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 101 28 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 102 28 command.c:146 script_debug(): command - esp32.cpu0 configure -alt-work-area-phys 0x3FFC0000 -alt-work-area-virt 0x3FFC0000 -alt-work-area-size 0x18000 -alt-work-area-backup 1
Debug: 103 28 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 104 28 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 105 29 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 106 29 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 107 29 command.c:146 script_debug(): command - flash bank esp32.cpu0.flash esp32 0x0 0 0 0 esp32.cpu0
Debug: 109 29 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 110 30 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 111 30 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 112 30 command.c:146 script_debug(): command - flash bank esp32.cpu0.irom esp32 0x0 0 0 0 esp32.cpu0
Debug: 114 30 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 115 31 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp' context
Debug: 116 31 command.c:376 register_command(): command 'compression' is already registered in 'esp' context
Debug: 117 31 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp' context
Debug: 118 31 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp' context
Debug: 119 31 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 120 32 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp32' context
Debug: 121 33 command.c:376 register_command(): command 'compression' is already registered in 'esp32' context
Debug: 122 33 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp32' context
Debug: 123 33 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp32' context
Debug: 124 34 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 125 34 command.c:146 script_debug(): command - flash bank esp32.cpu0.drom esp32 0x0 0 0 0 esp32.cpu0
Debug: 127 34 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 128 34 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp' context
Debug: 129 35 command.c:376 register_command(): command 'compression' is already registered in 'esp' context
Debug: 130 35 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp' context
Debug: 131 35 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp' context
Debug: 132 36 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 133 37 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp32' context
Debug: 134 39 command.c:376 register_command(): command 'compression' is already registered in 'esp32' context
Debug: 135 39 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp32' context
Debug: 136 40 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp32' context
Debug: 137 40 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 138 41 command.c:146 script_debug(): command - target create esp32.cpu1 esp32 -endian little -chain-position esp32.cpu1 -coreid 1 -rtos FreeRTOS
Debug: 139 41 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 140 41 target.c:2218 target_free_all_working_areas_restore(): freeing all working areas
Debug: 141 42 FreeRTOS.c:1242 FreeRTOS_create(): FreeRTOS_create
Debug: 142 42 command.c:376 register_command(): command 'xtensa' is already registered in '<global>' context
Debug: 143 42 command.c:376 register_command(): command 'set_permissive' is already registered in 'xtensa' context
Debug: 144 42 command.c:376 register_command(): command 'maskisr' is already registered in 'xtensa' context
Debug: 145 43 command.c:376 register_command(): command 'smpbreak' is already registered in 'xtensa' context
Debug: 146 43 command.c:376 register_command(): command 'perfmon_enable' is already registered in 'xtensa' context
Debug: 147 43 command.c:376 register_command(): command 'perfmon_dump' is already registered in 'xtensa' context
Debug: 148 44 command.c:376 register_command(): command 'tracestart' is already registered in 'xtensa' context
Debug: 149 44 command.c:376 register_command(): command 'tracestop' is already registered in 'xtensa' context
Debug: 150 44 command.c:376 register_command(): command 'tracedump' is already registered in 'xtensa' context
Debug: 151 45 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 152 45 command.c:376 register_command(): command 'semihost_basedir' is already registered in 'esp' context
Debug: 153 45 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 154 46 command.c:376 register_command(): command 'apptrace' is already registered in 'esp' context
Debug: 155 46 command.c:376 register_command(): command 'sysview' is already registered in 'esp' context
Debug: 156 46 command.c:376 register_command(): command 'sysview_mcore' is already registered in 'esp' context
Debug: 157 46 command.c:376 register_command(): command 'gcov' is already registered in 'esp' context
Debug: 158 47 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 159 47 command.c:376 register_command(): command 'smp' is already registered in 'esp32' context
Debug: 160 47 command.c:376 register_command(): command 'smp_on' is already registered in 'esp32' context
Debug: 161 48 command.c:376 register_command(): command 'smp_off' is already registered in 'esp32' context
Debug: 162 48 command.c:376 register_command(): command 'smp_gdb' is already registered in 'esp32' context
Debug: 163 48 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 164 48 command.c:376 register_command(): command 'flashbootstrap' is already registered in 'esp32' context
Debug: 165 49 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 166 49 command.c:376 register_command(): command 'set_permissive' is already registered in 'esp32' context
Debug: 167 49 command.c:376 register_command(): command 'maskisr' is already registered in 'esp32' context
Debug: 168 49 command.c:376 register_command(): command 'smpbreak' is already registered in 'esp32' context
Debug: 169 49 command.c:376 register_command(): command 'perfmon_enable' is already registered in 'esp32' context
Debug: 170 50 command.c:376 register_command(): command 'perfmon_dump' is already registered in 'esp32' context
Debug: 171 50 command.c:376 register_command(): command 'tracestart' is already registered in 'esp32' context
Debug: 172 50 command.c:376 register_command(): command 'tracestop' is already registered in 'esp32' context
Debug: 173 51 command.c:376 register_command(): command 'tracedump' is already registered in 'esp32' context
Debug: 174 51 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 175 51 command.c:376 register_command(): command 'semihost_basedir' is already registered in 'esp32' context
Debug: 176 52 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 177 52 command.c:376 register_command(): command 'apptrace' is already registered in 'esp32' context
Debug: 178 52 command.c:376 register_command(): command 'sysview' is already registered in 'esp32' context
Debug: 179 53 command.c:376 register_command(): command 'sysview_mcore' is already registered in 'esp32' context
Debug: 180 53 command.c:376 register_command(): command 'gcov' is already registered in 'esp32' context
Debug: 181 54 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 182 54 command.c:376 register_command(): command 'flashbootstrap' is already registered in 'esp32' context
Debug: 183 54 command.c:376 register_command(): command 'esp' is already registered in 'esp32.cpu1' context
Debug: 184 55 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu1' context
Debug: 185 55 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu1' context
Debug: 186 55 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu1' context
Debug: 187 55 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu1' context
Debug: 188 56 command.c:376 register_command(): command 'esp32' is already registered in 'esp32.cpu1' context
Debug: 189 56 command.c:376 register_command(): command 'flashbootstrap' is already registered in 'esp32' context
Debug: 190 56 command.c:146 script_debug(): command - flash bank esp32.cpu1.flash esp32 0x0 0 0 0 esp32.cpu1
Debug: 192 57 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 193 57 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp' context
Debug: 194 57 command.c:376 register_command(): command 'compression' is already registered in 'esp' context
Debug: 195 57 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp' context
Debug: 196 58 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp' context
Debug: 197 58 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 198 58 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp32' context
Debug: 199 59 command.c:376 register_command(): command 'compression' is already registered in 'esp32' context
Debug: 200 59 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp32' context
Debug: 201 59 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp32' context
Debug: 202 60 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 203 60 command.c:146 script_debug(): command - flash bank esp32.cpu1.irom esp32 0x0 0 0 0 esp32.cpu1
Debug: 205 60 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 206 60 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp' context
Debug: 207 60 command.c:376 register_command(): command 'compression' is already registered in 'esp' context
Debug: 208 61 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp' context
Debug: 209 61 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp' context
Debug: 210 61 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 211 61 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp32' context
Debug: 212 62 command.c:376 register_command(): command 'compression' is already registered in 'esp32' context
Debug: 213 62 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp32' context
Debug: 214 62 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp32' context
Debug: 215 62 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 216 62 command.c:146 script_debug(): command - flash bank esp32.cpu1.drom esp32 0x0 0 0 0 esp32.cpu1
Debug: 218 63 command.c:376 register_command(): command 'esp' is already registered in '<global>' context
Debug: 219 63 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp' context
Debug: 220 63 command.c:376 register_command(): command 'compression' is already registered in 'esp' context
Debug: 221 64 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp' context
Debug: 222 64 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp' context
Debug: 223 64 command.c:376 register_command(): command 'esp32' is already registered in '<global>' context
Debug: 224 64 command.c:376 register_command(): command 'appimage_offset' is already registered in 'esp32' context
Debug: 225 65 command.c:376 register_command(): command 'compression' is already registered in 'esp32' context
Debug: 226 65 command.c:376 register_command(): command 'verify_bank_hash' is already registered in 'esp32' context
Debug: 227 65 command.c:376 register_command(): command 'flash_stub_clock_boost' is already registered in 'esp32' context
Debug: 228 66 tcl.c:1319 handle_flash_bank_command(): 'esp32' driver usage field missing
Debug: 229 66 command.c:146 script_debug(): command - target smp esp32.cpu0 esp32.cpu1
Debug: 230 66 target.c:6062 jim_target_smp(): 3
Debug: 231 66 target.c:6072 jim_target_smp(): esp32.cpu0
Debug: 232 66 target.c:6072 jim_target_smp(): esp32.cpu1
Debug: 233 66 command.c:146 script_debug(): command - esp32.cpu0 esp32 flashbootstrap 3.3
Debug: 235 67 command.c:146 script_debug(): command - esp32.cpu0 xtensa maskisr on
Debug: 237 67 command.c:146 script_debug(): command - esp32.cpu0 xtensa smpbreak BreakIn BreakOut
Debug: 239 67 xtensa.c:744 xtensa_smpbreak_set(): esp32.cpu0: set smpbreak=30000, state=1
Debug: 240 67 xtensa.c:744 xtensa_smpbreak_set(): esp32.cpu1: set smpbreak=30000, state=1
Debug: 241 68 command.c:146 script_debug(): command - esp32.cpu0 esp semihost_basedir .
Debug: 243 68 command.c:146 script_debug(): command - esp32.cpu0 configure -event gdb-attach
$_TARGETNAME_0 xtensa smpbreak BreakIn BreakOut
# necessary to auto-probe flash bank when GDB is connected
halt
Debug: 244 68 command.c:146 script_debug(): command - esp32.cpu1 configure -event gdb-attach
$_TARGETNAME_1 xtensa smpbreak BreakIn BreakOut
# necessary to auto-probe flash bank when GDB is connected
halt
Debug: 245 69 command.c:146 script_debug(): command - add_help_text program_esp32 write an image to flash, address is only required for binary images. verify, reset, exit are optional
Debug: 247 71 command.c:1115 help_add_command(): added 'program_esp32' help text
Debug: 248 72 command.c:146 script_debug(): command - add_usage_text program_esp32 <filename> [address] [verify] [reset] [exit]
Debug: 250 72 command.c:1141 help_add_command(): added 'program_esp32' usage text
Info : 251 74 server.c:312 add_service(): Listening on port 6666 for tcl connections
Info : 252 74 server.c:312 add_service(): Listening on port 4444 for telnet connections
Debug: 253 74 command.c:146 script_debug(): command - init
Debug: 255 74 command.c:146 script_debug(): command - target init
Debug: 257 75 command.c:146 script_debug(): command - target names
Debug: 258 75 command.c:146 script_debug(): command - esp32.cpu0 cget -event gdb-flash-erase-start
Debug: 259 75 command.c:146 script_debug(): command - esp32.cpu0 configure -event gdb-flash-erase-start reset init
Debug: 260 75 command.c:146 script_debug(): command - esp32.cpu0 cget -event gdb-flash-write-end
Debug: 261 76 command.c:146 script_debug(): command - esp32.cpu0 configure -event gdb-flash-write-end reset halt
Debug: 262 76 command.c:146 script_debug(): command - esp32.cpu0 cget -event gdb-attach
Debug: 263 76 command.c:146 script_debug(): command - esp32.cpu1 cget -event gdb-flash-erase-start
Debug: 264 77 command.c:146 script_debug(): command - esp32.cpu1 configure -event gdb-flash-erase-start reset init
Debug: 265 77 command.c:146 script_debug(): command - esp32.cpu1 cget -event gdb-flash-write-end
Debug: 266 77 command.c:146 script_debug(): command - esp32.cpu1 configure -event gdb-flash-write-end reset halt
Debug: 267 77 command.c:146 script_debug(): command - esp32.cpu1 cget -event gdb-attach
Debug: 268 78 target.c:1661 handle_target_init_command(): Initializing targets...
Debug: 269 78 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'litbase' (152) does not exist
Debug: 270 78 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'ptevaddr' (153) does not exist
Debug: 271 78 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'rasid' (154) does not exist
Debug: 272 78 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'itlbcfg' (155) does not exist
Debug: 273 79 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'dtlbcfg' (156) does not exist
Debug: 274 79 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mepc' (157) does not exist
Debug: 275 79 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'meps' (158) does not exist
Debug: 276 79 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mesave' (159) does not exist
Debug: 277 80 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mesr' (160) does not exist
Debug: 278 80 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mecr' (161) does not exist
Debug: 279 80 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mevaddr' (162) does not exist
Debug: 280 80 semihosting_common.c:100 semihosting_common_init():
Debug: 281 81 semihosting_common.c:100 semihosting_common_init():
Debug: 282 81 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'litbase' (152) does not exist
Debug: 283 81 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'ptevaddr' (153) does not exist
Debug: 284 81 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'rasid' (154) does not exist
Debug: 285 81 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'itlbcfg' (155) does not exist
Debug: 286 82 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'dtlbcfg' (156) does not exist
Debug: 287 82 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mepc' (157) does not exist
Debug: 288 82 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'meps' (158) does not exist
Debug: 289 82 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mesave' (159) does not exist
Debug: 290 82 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mesr' (160) does not exist
Debug: 291 83 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mecr' (161) does not exist
Debug: 292 83 xtensa.c:2379 xtensa_build_reg_cache(): Special reg 'mevaddr' (162) does not exist
Debug: 293 83 semihosting_common.c:100 semihosting_common_init():
Debug: 294 83 semihosting_common.c:100 semihosting_common_init():
Debug: 295 84 ftdi.c:650 ftdi_initialize(): ftdi interface using shortest path jtag state transitions
Debug: 296 103 mpsse.c:422 mpsse_purge(): -
Debug: 297 104 mpsse.c:703 mpsse_loopback_config(): off
Debug: 298 104 mpsse.c:748 mpsse_set_frequency(): target 20000000 Hz
Debug: 299 104 mpsse.c:740 mpsse_rtck_config(): off
Debug: 300 104 mpsse.c:729 mpsse_divide_by_5_config(): off
Debug: 301 105 mpsse.c:709 mpsse_set_divisor(): 1
Debug: 302 105 mpsse.c:772 mpsse_set_frequency(): actually 15000000 Hz
Debug: 303 105 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 304 106 core.c:1789 adapter_khz_to_speed(): have interface set up
Debug: 305 106 mpsse.c:748 mpsse_set_frequency(): target 20000000 Hz
Debug: 306 106 mpsse.c:740 mpsse_rtck_config(): off
Debug: 307 106 mpsse.c:729 mpsse_divide_by_5_config(): off
Debug: 308 106 mpsse.c:709 mpsse_set_divisor(): 1
Debug: 309 106 mpsse.c:772 mpsse_set_frequency(): actually 15000000 Hz
Info : 310 106 ftdi.c:291 ftdi_speed(): ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Debug: 311 107 core.c:1785 adapter_khz_to_speed(): convert khz to interface specific speed value
Debug: 312 107 core.c:1789 adapter_khz_to_speed(): have interface set up
Info : 313 107 core.c:1565 adapter_init(): clock speed 20000 kHz
Debug: 314 107 openocd.c:143 handle_init_command(): Debug Adapter init complete
Debug: 315 107 command.c:146 script_debug(): command - transport init
Debug: 317 108 transport.c:229 handle_transport_init(): handle_transport_init
Debug: 318 108 core.c:830 jtag_add_reset(): SRST line released
Debug: 319 109 core.c:855 jtag_add_reset(): TRST line released
Debug: 320 109 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 321 109 command.c:146 script_debug(): command - jtag arp_init
Debug: 322 109 core.c:1578 jtag_init_inner(): Init JTAG chain
Debug: 323 109 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Debug: 324 110 core.c:1243 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS
Debug: 325 110 core.c:327 jtag_call_event_callbacks(): jtag event: TAP reset
Info : 326 111 core.c:1142 jtag_examine_chain_display(): JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : 327 111 core.c:1142 jtag_examine_chain_display(): JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Debug: 328 111 core.c:1374 jtag_validate_ircapture(): IR capture validation scan
Debug: 329 112 core.c:1432 jtag_validate_ircapture(): esp32.cpu0: IR capture 0x01
Debug: 330 112 core.c:1432 jtag_validate_ircapture(): esp32.cpu1: IR capture 0x01
Debug: 331 112 command.c:146 script_debug(): command - dap init
Debug: 333 113 arm_dap.c:106 dap_init_all(): Initializing all DAPs ...
Debug: 334 113 openocd.c:160 handle_init_command(): Examining targets...
Debug: 335 113 target.c:1849 target_call_event_callbacks(): target event 19 (examine-start) for core esp32.cpu0
Debug: 336 113 esp32.c:523 esp32_handle_target_event(): 19
Debug: 337 113 esp_xtensa_smp.c:610 esp_xtensa_smp_handle_target_event(): 19
Debug: 338 114 esp_xtensa.c:79 esp_xtensa_handle_target_event(): 19
Debug: 339 114 xtensa.c:2447 xtensa_handle_target_event(): 19
Debug: 340 114 xtensa.c:685 xtensa_examine(): xtensa_examine coreid=0
Debug: 341 115 xtensa.c:698 xtensa_examine(): OCD_ID = 0733bff2
Debug: 342 115 target.c:1849 target_call_event_callbacks(): target event 21 (examine-end) for core esp32.cpu0
Debug: 343 115 esp32.c:523 esp32_handle_target_event(): 21
Debug: 344 115 esp_xtensa_smp.c:610 esp_xtensa_smp_handle_target_event(): 21
Debug: 345 116 esp_xtensa.c:79 esp_xtensa_handle_target_event(): 21
Debug: 346 116 xtensa.c:2447 xtensa_handle_target_event(): 21
Debug: 347 116 xtensa.c:726 xtensa_smpbreak_write(): esp32.cpu0: write smpbreak set=0x30000 clear=0x600000
Debug: 348 116 target.c:1849 target_call_event_callbacks(): target event 19 (examine-start) for core esp32.cpu1
Debug: 349 116 esp32.c:523 esp32_handle_target_event(): 19
Debug: 350 117 esp_xtensa_smp.c:610 esp_xtensa_smp_handle_target_event(): 19
Debug: 351 117 esp_xtensa.c:79 esp_xtensa_handle_target_event(): 19
Debug: 352 117 xtensa.c:2447 xtensa_handle_target_event(): 19
Debug: 353 117 xtensa.c:685 xtensa_examine(): xtensa_examine coreid=1
Debug: 354 118 xtensa.c:698 xtensa_examine(): OCD_ID = 0733bff2
Debug: 355 118 target.c:1849 target_call_event_callbacks(): target event 21 (examine-end) for core esp32.cpu1
Debug: 356 118 esp32.c:523 esp32_handle_target_event(): 21
Debug: 357 118 esp_xtensa_smp.c:610 esp_xtensa_smp_handle_target_event(): 21
Debug: 358 118 esp_xtensa.c:79 esp_xtensa_handle_target_event(): 21
Debug: 359 119 xtensa.c:2447 xtensa_handle_target_event(): 21
Debug: 360 119 xtensa.c:726 xtensa_smpbreak_write(): esp32.cpu1: write smpbreak set=0x30000 clear=0x600000
Debug: 361 119 command.c:146 script_debug(): command - flash init
Info : 362 120 xtensa.c:1804 xtensa_poll(): esp32.cpu0: Debug controller was reset.
Debug: 363 120 xtensa.c:726 xtensa_smpbreak_write(): esp32.cpu0: write smpbreak set=0x30000 clear=0x600000
Info : 364 121 xtensa.c:1810 xtensa_poll(): esp32.cpu0: Core was reset.
Debug: 365 122 esp_xtensa.c:152 esp_xtensa_poll(): esp32.cpu0: Clear debug stubs info
Debug: 366 123 esp_xtensa_smp.c:174 esp_xtensa_smp_poll(): esp32.cpu0: Check for unexamined cores after reset
Info : 367 124 xtensa.c:1804 xtensa_poll(): esp32.cpu1: Debug controller was reset.
Debug: 368 124 xtensa.c:726 xtensa_smpbreak_write(): esp32.cpu1: write smpbreak set=0x30000 clear=0x600000
Info : 369 124 xtensa.c:1810 xtensa_poll(): esp32.cpu1: Core was reset.
Debug: 370 125 esp_xtensa.c:152 esp_xtensa_poll(): esp32.cpu1: Clear debug stubs info
Debug: 371 126 esp_xtensa_smp.c:174 esp_xtensa_smp_poll(): esp32.cpu1: Check for unexamined cores after reset
Debug: 373 126 tcl.c:1385 handle_flash_init_command(): Initializing flash devices...
Debug: 374 126 command.c:146 script_debug(): command - nand init
Debug: 376 128 tcl.c:498 handle_nand_init_command(): Initializing NAND devices...
Debug: 377 128 command.c:146 script_debug(): command - pld init
Debug: 379 131 pld.c:206 handle_pld_init_command(): Initializing PLDs...
Info : 380 131 gdb_server.c:3512 gdb_target_start(): starting gdb server for esp32.cpu0 on 3333
Info : 381 131 server.c:312 add_service(): Listening on port 3333 for gdb connections
Info : 382 973 server.c:100 add_connection(): accepting 'tcl' connection on tcp/6666
Info : 383 973 server.c:577 server_loop(): dropped 'tcl' connection
I also did another test:
- Launched
openocd -d3 -f board/esp32-wrover-kit-3.3v.cfg
from the Expressif command line - Started the flashing procedure from VSCode
In the command line I see:
- The last line before start flashing from VSCode:
Info : 377 2871 server.c:312 add_service(): Listening on port 3333 for gdb connections
- The lines after clicking the flash command on VSCode:
Info : 378 70406 server.c:100 add_connection(): accepting 'tcl' connection on tcp/6666
Info : 379 70416 server.c:577 server_loop(): dropped 'tcl' connection
Environment (Doctor command output)
Posted in a comment as the current post is too long for GitHub
Output
- ESP-IDF: empty
- ESP-IDF Debug Adapter: empty
- Heap Trace: empty
- OpenOCD: (expand the previous sections above)
- SDK Configuration Editor: The sdkconfig file is in a separate comment as this post is too long for GitHub.
The most recent entries from esp_idf_vsc_ext.log
are the following. The previous entries are a repetition of these ones.
{
"message": "Cannot access filePath: ${env:ADF_PATH}",
"stack": "Error: ENOENT: no such file or directory, access '${env:ADF_PATH}'\n\tat Object.accessSync (fs.js:220:3)\n\tat Object.e.accessSync (electron/js2c/asar_bundle.js:5:7989)\n\tat I (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:1:4561)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:247561\n\tat Generator.next (<anonymous>)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:242209\n\tat new Promise (<anonymous>)\n\tat l (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:241954)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:247384\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:248464\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:245882)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)",
"level": "error",
"timestamp": "2022-03-01T10:17:48.520Z"
}
{
"message": "Cannot access filePath: ${env:MDF_PATH}",
"stack": "Error: ENOENT: no such file or directory, access '${env:MDF_PATH}'\n\tat Object.accessSync (fs.js:220:3)\n\tat Object.e.accessSync (electron/js2c/asar_bundle.js:5:7989)\n\tat I (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:1:4561)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:247757\n\tat Generator.next (<anonymous>)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:242209\n\tat new Promise (<anonymous>)\n\tat l (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:241954)\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:247384\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:248464\n\tat Generator.next (<anonymous>)\n\tat s (c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:8:245882)\n\tat processTicksAndRejections (internal/process/task_queues.js:93:5)",
"level": "error",
"timestamp": "2022-03-01T10:17:48.521Z"
}
{
"message": "Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n",
"stack": "Error: Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:1:7304\n\tat ChildProcess.exithandler (child_process.js:308:7)\n\tat ChildProcess.emit (events.js:315:20)\n\tat maybeClose (internal/child_process.js:1048:16)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)",
"level": "error",
"timestamp": "2022-03-01T10:17:50.035Z"
}
{
"message": "Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n",
"stack": "Error: Open On-Chip Debugger v0.11.0-esp32-20211220 (2021-12-20-15:43)\r\nLicensed under GNU GPL v2\r\nFor bug reports, read\r\n\thttp://openocd.org/doc/doxygen/bugs.html\r\n\n\tat c:\\Users\\raffaeler\\.vscode\\extensions\\espressif.esp-idf-extension-1.3.0\\dist\\extension.js:1:7304\n\tat ChildProcess.exithandler (child_process.js:308:7)\n\tat ChildProcess.emit (events.js:315:20)\n\tat maybeClose (internal/child_process.js:1048:16)\n\tat Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)",
"level": "error",
"timestamp": "2022-03-01T10:20:58.969Z"
}
Additional context VSCode was launched from the Espressif command prompt as “code .” to inherit the environment variables.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top GitHub Comments
Could you try the current extension in GitHub master with this vsix installer there is a couple of fixes related to JTAG.
Will soon be pushed to marketplace!
@brianignacio5 I just installed version 1.4.0 from the marketplace. Thanks