Dual processor debugging with VSCode for Windows
Posted: Fri Feb 28, 2025 1:32 pm
I'm using VSCode on Windows with ESP-IDF v5.3.2. I have a custom board with two ESP32-S3s on it. I would like to debug both of them simultaneously using a single PC.
One processor is connected to the PC via the built-in USB-JTAG port, the other one is connected via an ESP-PROG JTAG programmer. Both work (after spending a couple of hours to find the right drivers for each port), but only one at a time.
I have started two instances of VSCode. I could also start two instances of OpenOCD by configuring them on different ports in the two VSCode projects. To do that I've added an "idf.openOcdLaunchArgs" entry to '.vscode/settings.json':
Is this the right way to do this?
I also read in the docs that
However, I could not figure out how to configure gdb to use the secondary ports. Any ideas?
One processor is connected to the PC via the built-in USB-JTAG port, the other one is connected via an ESP-PROG JTAG programmer. Both work (after spending a couple of hours to find the right drivers for each port), but only one at a time.
I have started two instances of VSCode. I could also start two instances of OpenOCD by configuring them on different ports in the two VSCode projects. To do that I've added an "idf.openOcdLaunchArgs" entry to '.vscode/settings.json':
Code: Select all
{
"idf.adapterTargetName": "esp32s3",
"idf.portWin": "COM71",
"idf.openOcdConfigs": [
"interface/ftdi/esp32_devkitj_v1.cfg",
"target/esp32s3.cfg"
],
"idf.openOcdLaunchArgs": [
"-c tcl port 6667",
"-c telnet_port 4445",
"-c gdb port 3334",
],
"idf.flashType": "JTAG"
},
}I also read in the docs that
Where can I modify those?You can change these settings by modifying [openocd.tcl.host] and [openocd.tcl.port].
However, I could not figure out how to configure gdb to use the secondary ports. Any ideas?