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
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