ESP-IDE 3.0.0, ESP32-Lyrat-Mini_V1.2, no longer able to debug (.gdbinit issue?)

PaulBerland
Posts: 2
Joined: Thu Aug 22, 2024 3:54 pm

ESP-IDE 3.0.0, ESP32-Lyrat-Mini_V1.2, no longer able to debug (.gdbinit issue?)

Postby PaulBerland » Thu Aug 22, 2024 3:58 pm

Hello! I was successfully debugging and single-stepping through my code back in May of 2024. When I picked the project up again in August, the debugger wasn’t working any more.

I tried updating all of the software to the latest (ESP-IDE 3.0.0). First of all, I noticed that ESP-IDF 5.2.2 and ESP-IDF 5.3 wouldn’t properly install all of the components successfully under ESP-IDE 3.0.0 so I went back to using ESP-IDE 5.1.2 again, which cleans and builds fine under ESP-IDE 3.0.0 with my project.

I am able to flash my target using the command line tools (“idf.py build”, “idf.py -p COM3 flash”), but I really need to get the debugger working to debug the code.

The first change that I saw that I needed to make is when I click the gearbox next to the middle drop-down box that names my target name and click on the Debugger tab and change “GDB debugger” from “gdb” (which wasn’t really pointing to anything) to “C:\Espressif\tools\xtensa-esp-elf-gdb\14.2_20240403\xtensa-esp-elf-gdb\bin\xtensa-esp32-elf-gdb.exe”. That helped. But it still wouldn’t debug. It gave the error “Error in final launch sequence / Failed to execute MI command: -exec-run (Don’t know how to run)”.

So then I started to change the line that says “GDB command file” to point to a file that I created called .gdbinit in my project folder. The contents of the .gdbinit file are as follows:

Code: Select all

target remote COM3
set remote hardware-watchpoint-limit 2
mon reset halt
maintenance flush register-cache
thb app_main
c 
but that doesn’t work. The error I get is “Error in final launch sequence / Filed to execute MI command: source …\.gdbinit \ Error message from debugger back end \ …\.gdbinit:1 Error in sourced command file: Remote replied unexpectedly to ‘vMustReadEmpty’ timeout.”

Now I don’t know that I composed the .gdbinit file properly, I just took some advice from an online link. But I do know that my hardware (ESP32-Lyrat-Mini_V1.2) works because I am able to flash it using the command line tools (“idf.py build” and “idf.py -p COM3 flash”). But like I said I really need the in-circuit debug capability to debug my program.

Does anyone have a .gdbinit file they can share that is working for them, preferably for the EP32-Lyrat-Mini_V1.2, or something similar, or see something wrong or missing in my .gdbinit file, or have any other advice about how to get the debugger to work again?

Paul Berland

PaulBerland
Posts: 2
Joined: Thu Aug 22, 2024 3:54 pm

Re: ESP-IDE 3.0.0, ESP32-Lyrat-Mini_V1.2, no longer able to debug (.gdbinit issue?)

Postby PaulBerland » Thu Sep 12, 2024 9:05 pm

Hello, I still have not solved this issue, but I thought I'd give one more piece of information that might be relevant. Since May of 2024 when the Espressif debugging was working, I did install STM32 Cube IDE, which also uses Eclipse, GCC, and GDB for a different project and it is possible that is what broke the Espressif GDB in the Espressif IDE (under Windows 10). I don''t know this for sure, this might be superstition, but I would recommend to people reading this post that if they really need their Espressif debugging, don't install STM32Cube IDE on the same computer? This might just be superstitious, I don't know yet. I will certainly post here if I ever figure out an answer to this problem.

Who is online

Users browsing this forum: No registered users and 11 guests