Thanks for your reply.
I was able to upload the program and to single step in the code through the debugger.
I reduced the adapter speed to 1000 khz as you pointed out. I get a different result now, but I’m still unable to debug my program.
PlatformIO Unified Debugger -> http://bit.ly/pio-debug
PlatformIO: debug_tool = olimex-arm-usb-ocd-h
PlatformIO: Initializing remote target...
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : tcl server disabled
Info : telnet server disabled
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : accepting 'gdb' connection from pipe
Error: No symbols for FreeRTOS
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000288 (active) APP_CPU: PC=0x00000000
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 1 was reset (pwrstat=0x5F, after clear 0x5F).
Info : esp32: Core 1 was reset (pwrstat=0x5F, after clear 0x5F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Warn : Received debug request on stalled active core 0.
Info : Target halted. PRO_CPU: PC=0x00000000 APP_CPU: PC=0x00000000 (active)
Info : Flash mapping 0: 0x3ffc0590 -> 0x3ffc0590, 1048321 KB
Info : Flash mapping 1: 0x3ffc0590 -> 0x3ffc0590, 1048321 KB
Info : Flash mapping 2: 0x20324e0e -> 0xfffffffe, 1942452 KB
Info : Flash mapping 3: 0x9bdbc0 -> 0x9cfa50, 10017 KB
Info : Flash mapping 4: 0x94fcac -> 0x4280e9, 9974 KB
Info : Flash mapping 5: 0x13 -> 0x11f1998, 10175 KB
Info : Flash mapping 6: 0x9cfa50 -> 0x9c8480, 0 KB
Info : Flash mapping 7: 0x94fca8 -> 0x9c4cd0, 0 KB
Info : Flash mapping 8: 0x94ffcc -> 0x2b, 10046 KB
Info : Flash mapping 9: 0x9c8480 -> 0x0, 4423 KB
Info : Flash mapping 10: 0x0 -> 0x94fcac, 10017 KB
Info : Flash mapping 11: 0x9c8288 -> 0x1c, 10017 KB
Info : Flash mapping 12: 0x94fca8 -> 0x2, 9535 KB
Info : Flash mapping 13: 0x0 -> 0x94ffcc, 1942519 KB
Info : Flash mapping 14: 0x20327106 -> 0xfffffffe, 0 KB
Info : Flash mapping 15: 0x9bdbc0 -> 0x9ced70, 6358 KB
Info : Flash mapping 16: 0x94fce4 -> 0x9c8288, 10017 KB
Info : Flash mapping 17: 0x94fd2c -> 0x0, 4446 KB
Info : Flash mapping 18: 0x9c8480 -> 0x6356bf, 0 KB
Info : Flash mapping 19: 0x635ae0 -> 0x63593c, 10006 KB
Info : Flash mapping 20: 0x11f19c0 -> 0x45e3bf, 9949 KB
Info : Flash mapping 21: 0x94fd28 -> 0x0, 16464 KB
Info : Flash mapping 22: 0x9c7398 -> 0x635fca, 0 KB
Info : Flash mapping 23: 0x0 -> 0x1, 6391 KB
Info : Flash mapping 24: 0x94ffcc -> 0x721104, 527505 KB
Info : Flash mapping 25: 0xfffffffc -> 0x0, 0 KB
Info : Flash mapping 26: 0x0 -> 0x9c72b8, 9840 KB
Info : Flash mapping 27: 0x0 -> 0x9c70c8, 0 KB
Info : Flash mapping 28: 0x64 -> 0x1d09d0, 0 KB
Info : Flash mapping 29: 0x768e85f4 -> 0x5632168e, 10029 KB
Info : Flash mapping 30: 0x11f19c0 -> 0x94fa28, 1942433 KB
Info : Flash mapping 31: 0x11f0000 -> 0x0, 1942433 KB
Info : Flash mapping 32: 0x563216ae -> 0x9cb500, 18374 KB
Info : Flash mapping 33: 0x9b7640 -> 0x20327106, 4194303 KB
Info : Flash mapping 34: 0x768e85f4 -> 0x5ce868, 9534 KB
Info : Flash mapping 35: 0x9ba8a0 -> 0x94ffcc, 1942519 KB
Info : Flash mapping 36: 0x20327106 -> 0xfffffffe, 1942433 KB
Info : Flash mapping 37: 0x5ce7a9 -> 0x9c72b8, 9949 KB
Info : Flash mapping 38: 0x11f1ae8 -> 0x9ba8a0, 9534 KB
Info : Flash mapping 39: 0x94fa90 -> 0x9b7640, 5990 KB
Info : Flash mapping 40: 0x11f19c0 -> 0x9b7640, 9534 KB
Info : Flash mapping 41: 0x768e87c0 -> 0x1, 0 KB
Info : Flash mapping 42: 0x9afed0 -> 0x94fa90, 0 KB
Info : Flash mapping 43: 0x94fa90 -> 0x9cb500, 9953 KB
Info : Flash mapping 44: 0x9c72c4 -> 0x9d77c0, 0 KB
Info : Flash mapping 45: 0x5ce152 -> 0x9bf058, 1960148 KB
Info : Flash mapping 46: 0x998f94 -> 0x9d7860, 9939 KB
Info : Flash mapping 47: 0x94fb74 -> 0x635a0e, 9926 KB
Info : Flash mapping 48: 0x630000 -> 0x11f1998, 0 KB
Info : Flash mapping 49: 0x17 -> 0x94fea8, 4102 KB
Info : Flash mapping 50: 0x11f1998 -> 0x614215, 18373 KB
Info : Flash mapping 51: 0x61421c -> 0x6141d4, 1942869 KB
Info : Flash mapping 52: 0x0 -> 0x0, 9535 KB
Info : Flash mapping 53: 0x77a31f3e -> 0x94ffcc, 0 KB
Info : Flash mapping 54: 0x11f1798 -> 0x17, 9535 KB
Info : Flash mapping 55: 0x603fa0 -> 0xb, 18373 KB
Info : Flash mapping 56: 0x4 -> 0x0, 18373 KB
Info : Flash mapping 57: 0x17 -> 0x94ff70, 4100 KB
Info : Flash mapping 58: 0xb -> 0x11f1798, 18375 KB
Info : Flash mapping 59: 0x0 -> 0x0, 0 KB
Info : Flash mapping 60: 0x0 -> 0x0, 3355443 KB
Info : Flash mapping 61: 0xcccccccc -> 0xcccccccc, 3355443 KB
Info : Flash mapping 62: 0xcccccccc -> 0xcccccccc, 3355443 KB
Info : Flash mapping 63: 0xcccccccc -> 0x2d99fad6, 0 KB
Info : Flash mapping 64: 0x1 -> 0x30, 0 KB
Info : Flash mapping 65: 0x11f1798 -> 0x0, 0 KB
Info : Flash mapping 66: 0xc0c068 -> 0x0, 0 KB
Info : Flash mapping 67: 0x0 -> 0x0, 0 KB
Info : Flash mapping 68: 0x0 -> 0x0, 0 KB
Info : Flash mapping 69: 0x0 -> 0x0, 0 KB
Info : Flash mapping 70: 0x0 -> 0x0, 0 KB
Info : Flash mapping 71: 0x0 -> 0x0, 0 KB
Info : Flash mapping 72: 0x4014e0 -> 0x4014e0, 9535 KB
Info : Flash mapping 73: 0x22e000 -> 0x4014e0, 4101 KB
Info : Flash mapping 74: 0x94ff80 -> 0x76720419, 2232 KB
Info : Flash mapping 75: 0x76720400 -> 0x94ffdc, 1960281 KB
Info : Flash mapping 76: 0x22e000 -> 0x2ec31cc2, 0 KB
Info : Flash mapping 77: 0x0 -> 0x22e000, 0 KB
Info : Flash mapping 78: 0x0 -> 0x0, 0 KB
Info : Flash mapping 79: 0x0 -> 0x0, 0 KB
Info : Flash mapping 80: 0x0 -> 0x0, 0 KB
Info : Flash mapping 81: 0x94ff8c -> 0x0, 9535 KB
Info : Flash mapping 82: 0x77a686d0 -> 0x59f871ae, 0 KB
Info : Flash mapping 83: 0x94ffec -> 0x77a565fd, 4194303 KB
Info : Flash mapping 84: 0x77a751c4 -> 0x0, 0 KB
Info : Flash mapping 85: 0x4014e0 -> 0x22e000, 0 KB
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: No error.
My connections:
JTAG ESP
3 → EN (RST)
4 → GND
5 → 12 (TDI)
7 → 14 (TMS)
9 → 13 (TCK)
13 → 15 (TDO)
I power the ESP through USB so I don’t connect the VTref. I also tried it with it, but it did not work.
I’m pretty sure that the wiring is correct, because it worked once.