Open zfields opened 2 years ago
@P-R-O-C-H-Y - Do you think you can help on this issue? I think you have experience using VSCode/openocd/gdb. Thanks!
@zfields - The precompiled IDF libraries used with Arduino Core have no debug information. I think that the whole final generated firmware has no debug information in order to use gdb.
You may need to create an "Arduino as Component" project and activate -Og
compilation option to build it in order to debug it using openocd and gdb.
Board
Adafruit ESP32 Feather (esp32:esp32:featheresp32)
Device Description
ESP-Prog
Hardware Configuration
No additional hardware is required to reproduce this issue.
Version
v2.0.3
IDE Name
VSCode (Microsoft Arduino Extension to compile and Microsoft C/C++ Extension to debug)
Operating System
Ubuntu 22.04
Flash frequency
80000 kHz (80 MHz)
PSRAM enabled
no
Upload speed
921600
Description
I am experiencing two issues:
Debugger only connects every other attempt (fail/succeed/fail/succeed/...).
Failed Attempt Log:
Successful Attempt Log:
Specifying
-c "esp32.cpu1 configure -rtos FreeRTOS"
in the OpenOCD parameters, causes the debugger to break atesp_pm_impl_waiti () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/hal/esp32/include/hal/cpu_ll.h:183
.I do not appear to be able to "continue" past it, or access other threads.
Originally specified to suppress the OpenOCD warning,
openocd: Warn : No symbols for FreeRTOS!
Sketch
Debug Message
Other Steps to Reproduce
This can be reproduced from the container. It has all required tools, and can be accessed via the dev container by clicking "Reopen in Container" button.
The Arduino application needs to be flashed directly over USB via the primary bootloader (which flashes the secondary bootloader and partition table). Finally, the sketch can be deployed and debugged via the ESP Prog using OpenOCD.
The Microsoft Arduino extension allows you to directly flash the entire application, then debugging can be performed using the Debugging Menu by selecting "ESP-Prog Debug".
I have checked existing issues, online documentation and the Troubleshooting Guide