Wrong reference to GDB when debugging in IDE 2.1.1

When trying to debug a compiled and loaded sketch for an ESP32S3,
I got an error message saying that the IDE can not find the arm-none-eabi-gdb GDB executable.
The path is correct but the IDE should have sought the xtensa-esp32-elf-gdb GDB executable.
It appears the the newly installed Arduino IDE clashes with an already installed VS code instance and uses the settings of that as that is configured for Arm processors. Both are using the same plugin for debugging.

Error message:

GDB executable "C:\Users\Jack\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp-elf-gdb\11.2_20220823\bin\arm-none-eabi-gdb.exe" was not found. Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly.

launch.json file:

{
  "version": "0.2.0",
  "configurations": [
    {
      "cwd": "${workspaceRoot}",
      "name": "Arduino",
      "request": "launch",
      "type": "cortex-debug",
      "executable": "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino\\sketches\\207281DE0A1D91ED31333A5DBD97D7DC/take_photos.ino.elf",
      "servertype": "openocd",
      "serverpath": "C:\\Users\\Jack\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\openocd-esp32\\v0.11.0-esp32-20221026/bin/openocd",
      "armToolchainPath": "C:\\Users\\Jack\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\xtensa-esp-elf-gdb\\11.2_20220823/bin/",
      "configFiles": [
        "debug.cfg"
      ]
    }
  ]
}

Debug panel of the IDE with ARM registers:

Hi ! I have currently the same problem as you.
Did you already find a solution ?

Thx for your answer :slight_smile:

No, no answer yet

Same issue here. Please report solution if you find one! Thanks :slight_smile:

LOL, so my fix was you need to actually compile the code before you can run debug, or the missing files wont be included. Im used to other IDE rebuilding before debugging automatically, Arduino doesnt appear to do so.

I got it working, but I get a lot of "gdb-server session closed" and the connection breaks...

Unfortunately that solution dos not work in my case. I already tried that but still the IDE looks for the wrong type of GDB

When using the ESP32 boards, you must enable debugging via Arduino IDE's Tools > JTAG Adapter menu.

If that menu is set to "Disabled", the sketch is not configured for use with the debugger and you get this mysterious "...arm-none-eabi-gdb.exe" was not found. Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly." error when you try to start the debugger.

If you don't have a Tools > JTAG Adapter menu in Arduino IDE, this means the definition of the board you have selected from the Tools > Board menu in Arduino IDE has not been configured for use with the debugger. You will need to instead select Tools > Board > esp32 > ESP32S3 Dev Module from the Arduino IDE menus and then make the necessary configurations to the other custom board option menus in the Arduino IDE Tools menu for your board.

1 Like
GDB executable "C:\Users\Alina\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp-elf-gdb\11.2_20220823\bin\arm-none-eabi-gdb.exe" was not found. Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly.

I as well keep getting this error message. I am working with a NodeMCU-32S esp board. I tried updating the drivers and going on github to get the missing file from the repositories, but I can't seem to find it. Is there any answer on this yet?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.