Arduino IDE 2.X ESP32C3 Debug not found arm-none-eabi-gdb.exe Error

When I was trying to use 2.1 Arduino IDE debug ESP32C3, the software reported an error:
GDB executable "C:\Users\XXX\AppData\Local\Arduino15\packages\esp32\tools\riscv32-esp-elf-gcc\esp-2021r2-patch5-8.4.0\bin\arm-none-eabi-gdb.exe" was not found. Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly.

I don't know if it doesn't support ESP32C3 debug or if I'm just missing this program file. If I just lack this file, could you please tell me how to get it? Thank you very much.

1 Like

I'm pretty sure that ESP32C3 doesn't have an ARM core.

Yes, I know ESP32C3 is RISC-V and not ARM, but how do I get the Arduino IDE to debug RISC-V?

1 Like

I noticed the path in the Arduino IDE prompt and the prompt to modify the GDB path. I went to check the path and found that there is such a GDB program related to risc-v.However, I see that the GDB path is modified with "cortex". Is it possible that the Arduino IDE 2.1 does not support ESP32C3?

I have the same error message using Arduino IDE 2.1 with ESP32 CAM ...

Is there a solution? I'm getting the same type of error using ESP32-S3-DevKitM:

GDB executable: "/Users/frankcohen/Library/Arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823/bin/arm-none-eabi-gdb" was not found. Please configure "cortex-debug.armToolchainPath" or "cortex-debug.gdbPath" correctly.

I do have GDB installed for the ESP32 at /Users/frankcohen/Library/Arduino15/packages/esp32/tools/xtensa-esp-elf-gdb/11.2_20220823/bin

-rwxr-xr-x@ 1 frankcohen staff 24369216 May 21 20:04 xtensa-esp-elf-gdb-3.10
-rwxr-xr-x@ 1 frankcohen staff 24361008 May 21 20:04 xtensa-esp-elf-gdb-3.6
-rwxr-xr-x@ 1 frankcohen staff 24356576 May 21 20:04 xtensa-esp-elf-gdb-3.7
-rwxr-xr-x@ 1 frankcohen staff 24364992 May 21 20:04 xtensa-esp-elf-gdb-3.8
-rwxr-xr-x@ 1 frankcohen staff 24369200 May 21 20:04 xtensa-esp-elf-gdb-3.9
-rwxr-xr-x@ 1 frankcohen staff 4587 May 21 20:04 xtensa-esp-elf-gdb-add-index
-rwxr-xr-x@ 1 frankcohen staff 23588192 May 21 20:04 xtensa-esp-elf-gdb-no-python
-rwxr-xr-x@ 1 frankcohen staff 1524400 May 21 20:04 xtensa-esp-elf-gprof
-rwxr-xr-x@ 1 frankcohen staff 2599 May 21 20:04 xtensa-esp32-elf-gdb
-rwxr-xr-x@ 1 frankcohen staff 2605 May 21 20:04 xtensa-esp32s2-elf-gdb
-rwxr-xr-x@ 1 frankcohen staff 2605 May 21 20:04 xtensa-esp32s3-elf-gdb

-Frank

1 Like

So may I ask if you have resolved the issue? I'm experiencing the same problem but haven't solved it yet, I hope you can go into more detail about the resolution process, thank you!

I am very sorry for replying you so long. I have not found a solution at present, so I can only use printf for debug. If I encounter watchdog errors, I will not be able to debug accurately.

I personally can not solve this kind of problem, if I find a solution, I will @ you, if you find a solution, I hope you can also @ me. thank you.

I haven't found a solution yet. I can't use debug function when I use Arduino IDE 2.2.1 to develop STM32. However, I heard that ESP IDE can support ESP series debug, but I feel that ESP IDE development is rather troublesome.

I personally can't solve this kind of problem, if I find a solution, I will @ you, if you find a solution, I hope you will also @ me. Thank you very much!

Sure,thank you too.If I have found the solution I will @u right away.

There is a new version of the IDE out. Installing the new version fixed this problem for me.

1 Like

Hello, what is the specific version of IDE? Can you share the link?

I use the Arduino-IDE_nightly -20230903 IDE in the windows10 22H2 system, but the debug function still cannot be used normally on ESP32-C3, ESP32-WROOM, ESP8266 and arduino nano.

I was having the problem from the original post while using nightly build from a few months ago. I downloaded 2.2.1 from the software link on arduino.cc. That resolved the problem for me.

You are lucky. But I just installed 2.2.1, but still failed with this problem.

I will buy a lottery ticket. If I were you I would reinstall my operating system.

Hi all. Debugging is supported for the ESP32-C3:

  • ESP32-C3: Built-In USB JTAG

However, you need to enable it in Arduino IDE via the 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 > ESP32C3 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

Hello, I encountered the following error when using Arduino IDE 2.2.1 and ESP32 Boards 2.0.7 and TAG Adapter are Integrated USB JTAG or ESP USB Bridge.

Error message displayed by GDB-Server :
SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed GDB server session ended. This terminal will be reused, waiting for next session to start....
gdb-server Log.txt (21.1 KB)

I see there are some reports about this problem here:

It looks like there is some advice from the esp32 platform developers about how to solve/workaround the problem in the discussion at the links above.

1 Like

Very thank you to reply me,I found that my connection method is wrong, it should not be connected through the serial chi.
I followed the method given on this page.(https://visualgdb.com/tutorials/esp32/esp32-c3/ )

Once connected, a USB JTAG/ Serial debug unit and a serial appeared in the device Manager, which I used to download and then debug the serial.
But I prompt Time out when debugging the example Blink.

My own project is hint :
Failed to launch GDB: Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000; qXfer:memory-map:read+; qXfer:features:read+; qXfer:threads:read+; QStartNoAckMode+; vContSupported+ (from target-select extended-remote localhost:50001)

Hello everyone, I'm late on this thread and I'm sure you are all aware of this, but I want to note here as well that the Nano ESP32 now has full debug support (since core 2.0.12, released a few weeks ago) on the latest IDE (since 2.1).
To take advantage of this you can follow this debugging guide, after having updated both your IDE and the "Arduino ESP32 Boards" core.