Debugging ESP32P4 Issue
Posted: Mon Jun 23, 2025 8:35 am
TLDR; I am attempting to use GDB with an ESP32P4 and I am having problems stepping through code.
ESP IDF: 5.4.1
Platform: M5Stack Tab 5
Chip: ESP32P4 revision 1.0
GDB version: GNU gdb (esp-gdb) 14.2_20240403
I am using the M5Stack User demo code https://github.com/m5stack/M5Tab5-UserDemo in order to understand the hardware on the device. I have managed to build and deploy the code no problems. Next up, using the debugger to step through some of the code.
I use the command idf.py openocd gdb to kick off a debugging session and the debugger connects fine. So I set a breakpoint and continue, the breakpoint is hit and the debugger shows the code to be executed.
So far, so good.
I have then tried to step through the code using step and next and these both fail. GDB appears to indicate that it is still on the same line of code as the breakpoint.
I have also tried to use the continue command to continue the application and this also fails.
Another thing I have tried is to delete the breakpoint I created when the debugger stops and then stepping or continuing the code. This does not work either.
Any suggestions would be welcomed.
Thanks in advance,
Mark
ESP IDF: 5.4.1
Platform: M5Stack Tab 5
Chip: ESP32P4 revision 1.0
GDB version: GNU gdb (esp-gdb) 14.2_20240403
I am using the M5Stack User demo code https://github.com/m5stack/M5Tab5-UserDemo in order to understand the hardware on the device. I have managed to build and deploy the code no problems. Next up, using the debugger to step through some of the code.
I use the command idf.py openocd gdb to kick off a debugging session and the debugger connects fine. So I set a breakpoint and continue, the breakpoint is hit and the debugger shows the code to be executed.
So far, so good.
I have then tried to step through the code using step and next and these both fail. GDB appears to indicate that it is still on the same line of code as the breakpoint.
I have also tried to use the continue command to continue the application and this also fails.
Another thing I have tried is to delete the breakpoint I created when the debugger stops and then stepping or continuing the code. This does not work either.
Any suggestions would be welcomed.
Thanks in advance,
Mark