Cannot start the debugger

Just updated the VSCode and PIO including all platforms. Now I have the issue that the debugger won’t start I get the following:

Reading symbols from c:\Users\Niels\Documents\PlatformIO\Projects\nanoBrewer.pio\build\nodemcu-32s\firmware.elf…
done.
PlatformIO Unified Debugger → Redirecting...
PlatformIO: debug_tool = olimex-arm-usb-ocd-h
PlatformIO: Initializing remote target…
Open On-Chip Debugger v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
adapter speed: 500 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 500 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : accepting ‘gdb’ connection from pipe
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x00000000, debug_reason=00000000
Info : Set GDB target to ‘esp32.cpu0’
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x00000000, debug_reason=00000000
Info : Flash mapping 0: 0x3ffc089c → 0x3ffc089c, 1048322 KB
Info : Flash mapping 1: 0x3ffc089c → 0x3ffc089c, 1048322 KB
Info : Flash mapping 2: 0x0 → 0x514, 41279 KB
Info : Flash mapping 3: 0x9 → 0x6, 9790 KB
Info : Flash mapping 4: 0x1 → 0x0, 0 KB
Info : Flash mapping 5: 0x0 → 0x40091d24, 0 KB
Info : Flash mapping 6: 0x0 → 0x0, 0 KB
Info : Flash mapping 7: 0x0 → 0x400928c4, 0 KB
Info : Flash mapping 8: 0x0 → 0x0, 1048322 KB
Info : Flash mapping 9: 0x0 → 0x283bac0, 0 KB
Info : Flash mapping 10: 0x5 → 0x0, 0 KB
Info : Flash mapping 11: 0x2828b28 → 0x0, 0 KB
Info : Flash mapping 12: 0x0 → 0x0, 0 KB
Info : Flash mapping 13: 0x40091d24 → 0x5c, 0 KB
Info : Flash mapping 14: 0x0 → 0x0, 0 KB
Info : Flash mapping 15: 0x0 → 0x0, 6990 KB
Info : Flash mapping 16: 0x233cfcc6 → 0xfffffffe, 0 KB
Info : Flash mapping 17: 0x2830290 → 0x2827ff8, 41121 KB
Info : Flash mapping 18: 0x98fcac → 0x42e989, 41152 KB
Info : Flash mapping 19: 0x13 → 0xac6e18, 41331 KB
Info : Flash mapping 20: 0x2827ff8 → 0x28285b0, 0 KB
Info : Flash mapping 21: 0x98fca8 → 0x280f420, 0 KB
Info : Flash mapping 22: 0x98ffcc → 0x2b, 41119 KB
Info : Flash mapping 23: 0x28285b0 → 0x0, 4438 KB
Info : Flash mapping 24: 0x0 → 0x98fcac, 41121 KB
Info : Flash mapping 25: 0x2817be0 → 0x1c, 0 KB
Info : Flash mapping 26: 0x98fca8 → 0x2, 9791 KB
Info : Flash mapping 27: 0x0 → 0x98ffcc, 1961267 KB
Info : Flash mapping 28: 0x233cfbce → 0xfffffffe, 0 KB
Info : Flash mapping 29: 0x2830290 → 0x283eb80, 6513 KB
Info : Flash mapping 30: 0x98fce4 → 0x2817be0, 41121 KB
Info : Flash mapping 31: 0x98fd2c → 0x0, 4462 KB
Info : Flash mapping 32: 0x28285b0 → 0x65c45f, 0 KB
Info : Flash mapping 33: 0x65c884 → 0x65c6e0, 41201 KB
Info : Flash mapping 34: 0x77c0627f → 0x24, 0 KB
Info : Flash mapping 35: 0x65dda6 → 0xac0000, 16448 KB
Info : Flash mapping 36: 0xac0000 → 0x27f8e40, 0 KB
Info : Flash mapping 37: 0x0 → 0x1, 0 KB
Info : Flash mapping 38: 0x9e07d0 → 0x64, 0 KB
Info : Flash mapping 39: 0x10 → 0x9e01c4, 0 KB
Info : Flash mapping 40: 0x0 → 0xe9, 0 KB
Info : Flash mapping 41: 0xea0069 → 0x283b9f8, 41202 KB
Info : Flash mapping 42: 0x2827250 → 0xac0000, 0 KB
Info : Flash mapping 43: 0x98f9ec → 0x77c03c16, 0 KB
Info : Flash mapping 44: 0x0 → 0x0, 0 KB
Info : Flash mapping 45: 0x283c8d0 → 0x5, 9790 KB
Info : Flash mapping 46: 0x77b37379 → 0xac0000, 0 KB
Info : Flash mapping 47: 0x5f0a87 → 0x65df3e, 41201 KB
Info : Flash mapping 48: 0x283c8d0 → 0x1, 0 KB
Info : Flash mapping 49: 0x1 → 0xac6f14, 6090 KB
Info : Flash mapping 50: 0xac6e40 → 0x65df3e, 41201 KB
Info : Flash mapping 51: 0x77b4ccc0 → 0x1, 11035 KB
Info : Flash mapping 52: 0x281bb48 → 0x5f595c, 11035 KB
Info : Flash mapping 53: 0x65df3e → 0x5, 41202 KB
Info : Flash mapping 54: 0x1 → 0xac6e18, 41070 KB
Info : Flash mapping 55: 0x46282e → 0xac6e40, 6519 KB
Info : Flash mapping 56: 0x0 → 0x65e344, 6519 KB
Info : Flash mapping 57: 0x65ddf1 → 0x28051a0, 0 KB
Info : Flash mapping 58: 0x0 → 0xb1, 11035 KB
Info : Flash mapping 59: 0x283c8d0 → 0xac6e40, 41202 KB
Info : Flash mapping 60: 0xac6e18 → 0x281f9b0, 41089 KB
Info : Flash mapping 61: 0x20 → 0x65c7b2, 41053 KB
Info : Flash mapping 62: 0x660000 → 0xac6e18, 0 KB
Info : Flash mapping 63: 0x10 → 0x98fea8, 4102 KB
Info : Flash mapping 64: 0xac6e18 → 0x63920d, 11034 KB
Info : Flash mapping 65: 0x639214 → 0x6391cc, 1961617 KB
Info : Flash mapping 66: 0x0 → 0x0, 9791 KB
Info : Flash mapping 67: 0x77c05dde → 0x98ffcc, 0 KB
Info : Flash mapping 68: 0xac6be8 → 0x10, 9791 KB
Info : Flash mapping 69: 0x62aa50 → 0xd, 11034 KB
Info : Flash mapping 70: 0x4 → 0x0, 11034 KB
Info : Flash mapping 71: 0x10 → 0x98ff70, 4100 KB
Info : Flash mapping 72: 0xd → 0xac6be8, 11022 KB
Info : Flash mapping 73: 0x77c1bd9b → 0x1c10, 4205 KB
Info : Flash mapping 74: 0x54f7764c → 0x0, 3355443 KB
Info : Flash mapping 75: 0xcccccccc → 0xcccccccc, 3355443 KB
Info : Flash mapping 76: 0xcccccccc → 0xcccccccc, 3355443 KB
Info : Flash mapping 77: 0xcccccccc → 0xffffffff, 0 KB
Info : Flash mapping 78: 0x546c6148 → 0x38, 0 KB
Info : Flash mapping 79: 0xac6be8 → 0xbee, 10202 KB
Info : Flash mapping 80: 0xcf79c8 → 0x0, 0 KB
Info : Flash mapping 81: 0x0 → 0x0, 0 KB
Info : Flash mapping 82: 0x0 → 0x0, 0 KB
Info : Flash mapping 83: 0x0 → 0x0, 0 KB
Info : Flash mapping 84: 0x0 → 0x0, 0 KB
Info : Flash mapping 85: 0x0 → 0x0, 0 KB
Info : Flash mapping 86: 0x4014e0 → 0x4014e0, 9791 KB
Info : Flash mapping 87: 0x2cd000 → 0x4014e0, 4101 KB
Info : Flash mapping 88: 0x98ff80 → 0x7737fa29, 2868 KB
Info : Flash mapping 89: 0x7737fa10 → 0x98ffdc, 1962142 KB
Info : Flash mapping 90: 0x2cd000 → 0x545665a1, 0 KB
Info : Flash mapping 91: 0x0 → 0x2cd000, 0 KB
Info : Flash mapping 92: 0x0 → 0x0, 0 KB
Info : Flash mapping 93: 0x0 → 0x0, 0 KB
Info : Flash mapping 94: 0x0 → 0x0, 0 KB
Info : Flash mapping 95: 0x98ff8c → 0x0, 9791 KB
Info : Flash mapping 96: 0x77c3ad40 → 0x2302521d, 0 KB
Info : Flash mapping 97: 0x98ffec → 0x77c27a6e, 4194303 KB
Info : Flash mapping 98: 0x77c48a39 → 0x0, 0 KB
Info : Flash mapping 99: 0x4014e0 → 0x2cd000, 0 KB
.pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: Success.

I also get a Visual Studio Code dialog popup stating:

Failed to launch GDB: .pioinit:11: Error in sourced command file:
Remote communication error. Target disconnected.: Success. (from interpreter-exec console
“source .pioinit”)

So, what does “.pioinit:11: Error in sourced command file:” mean??

If it previously worked and now it doesn’t, open an issue about the regression in Issues · platformio/platform-espressif32 · GitHub

1 Like

@maxgerhardt Thanks for the response!

Not sure if it is a pio bug - I spend some time experimenting this evening and found that if I ‘Erase Flash’ first the debugger starts and break at the app_main() as it should. The strange thing is that I now and then need to erase the flash or the debugger don’t start correctly, so maybe it’s my HW (NodeMCU)?

After testing and experimenting with the OLIMEX ARM-USB-OCD-H jtag debugger I found that if the error occurs ,as described in this post - one need to erase the flash by help of the PIO menu ‘Erase Flash’.
Also if you have problems with not being able to set break point(s), check if the Vcc on the JTAG connector (pin 1 or 2) is connected to the development board, if it is then remove it. Doing so removed all the break point issues I had on the NodeMCU development board.