I have followed all the steps from the Espressif docs and tried this tutorial https://www.youtube.com/watch?v=uq93H7T7cOQ
I am getting the following error when I try to run the debugger I am able to run openOCD with the command line and have been able to connect to the esp prog board successfully however I am unable to get the entire tool chain working in VS Code. So my guess is that there is something wrong with OpenOCD or GBD, not the esp prog hardware.
Any suggestions or potential fixes would be greatly appreciated.
Here are the launch.json and tasks.json files that I am trying to run in VS Code
Tasks.json
Code: Select all
{
"version": "2.0.0",
"tasks": [
{
"label": "preRun",
"type": "shell",
"windows":{
"command": [
"C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20211220/openocd-esp32/bin/openocd.exe -f C:/Espressif/tools/openocd-esp32/v0.11.0-esp32-20211220/openocd-esp32/share/openocd/scripts/board/esp32s2-kaluga-1.cfg"
]
}
}
]
}
Code: Select all
{
"version": "0.2.0",
"configurations": [
{
"name" : "ESP32 OpenOCD",
"type" : "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}/build",
"program": "${workspaceFolder}/build/debugtest.elf",
"miDebuggerPath": "C:\\Espressif\\tools\\xtensa-esp32s2-elf\\esp-2021r2-patch2-8.4.0\\xtensa-esp32s2-elf\\bin\\xtensa-esp32s2-elf-gdb.exe",
"setupCommands": [
{"text": "target remote 127.0.0.1:3333"},
{"text": "set remote hardware-watchpoint-limit 2"},
{"text": "monitor reset halt"},
{"text": "flushregs"}
]
}
]
}