Unable to start debugging. Unexpected GDB output from command "- interpreter-exec console "target remote:3333""
Posted: Thu Mar 31, 2022 5:49 pm
Hi,
I am new with the ESP and i am trying to work with VSCode and use the debugger, the setup is:
- ESP32-S3 -DevKitC1
- espressif-idf ver 1.4
- IDF 4.4
- blink example
I'm working by the documentation and the YouTube guide as reference (https://www.youtube.com/watch?v=uq93H7T7cOQ)
configure the launch.json as:
{
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "preRun",
"type": "cppdbg",
"name": "Esp32OpenOcd",
"request": "launch",
"cwd":"${workspaceFolder}/build",
"program": "${workspaceRoot}/build/${command:espIdf.getProjectName}.elf",
"miDebuggerPath": "${command:espIdf.getXtensaGdb}",
"setupCommands": [
{"text":"target remote :3333"},
{"text":"set remote hardware-watchpoint-limit 2"},
{"text":"monitor reset halt"},
{"text":"flushregs"},
{"text":"thb app_main"},
],
}
]
}
and the tasks.json as:
{
"version": "2.0.0",
"tasks": [
{
"label": "preRun",
"type": "shell",
"windows": {
"command": "clear '&' start openocd -c \"set ESP_RTOS none\" -f board/esp32s3-builtin.cfg '&' exit"
}
}
]
}
It look that it start when i try to connect manually:
openocd -f board/esp32s3-builtin.cfg
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
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32s3.cpu0: Target halted, PC=0x40000400, debug_reason=00000001
Info : esp32s3.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
but when i use the launch.json - the dbg fail, it look that it fail to parse => Unable to start debugging. Unexpected GDB output from command "- interpreter-exec console "target remote:3333"" .:3333 (undocumented errno138)
Anyone have any idea how to solve that ?
Thanks
I am new with the ESP and i am trying to work with VSCode and use the debugger, the setup is:
- ESP32-S3 -DevKitC1
- espressif-idf ver 1.4
- IDF 4.4
- blink example
I'm working by the documentation and the YouTube guide as reference (https://www.youtube.com/watch?v=uq93H7T7cOQ)
configure the launch.json as:
{
"version": "0.2.0",
"configurations": [
{
"preLaunchTask": "preRun",
"type": "cppdbg",
"name": "Esp32OpenOcd",
"request": "launch",
"cwd":"${workspaceFolder}/build",
"program": "${workspaceRoot}/build/${command:espIdf.getProjectName}.elf",
"miDebuggerPath": "${command:espIdf.getXtensaGdb}",
"setupCommands": [
{"text":"target remote :3333"},
{"text":"set remote hardware-watchpoint-limit 2"},
{"text":"monitor reset halt"},
{"text":"flushregs"},
{"text":"thb app_main"},
],
}
]
}
and the tasks.json as:
{
"version": "2.0.0",
"tasks": [
{
"label": "preRun",
"type": "shell",
"windows": {
"command": "clear '&' start openocd -c \"set ESP_RTOS none\" -f board/esp32s3-builtin.cfg '&' exit"
}
}
]
}
It look that it start when i try to connect manually:
openocd -f board/esp32s3-builtin.cfg
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
Info : only one transport option; autoselect 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Warn : Transport "jtag" was already selected
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32s3.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32s3.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32s3.cpu0: Target halted, PC=0x40000400, debug_reason=00000001
Info : esp32s3.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : starting gdb server for esp32s3.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
but when i use the launch.json - the dbg fail, it look that it fail to parse => Unable to start debugging. Unexpected GDB output from command "- interpreter-exec console "target remote:3333"" .:3333 (undocumented errno138)
Anyone have any idea how to solve that ?
Thanks