-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugging a Zephyr OS application with openocd-esp32 on esp32c6 (OCD-1053) #350
Comments
Zephyr doesn't use the IDF bootloader, so OpenOCD cannot retrieve the flash mappings by reading the target's flash. Therefore, you must disable flash support to avoid the mappings error. Additionally, you need to specify the RTOS type before the configuration file; otherwise, OpenOCD will assume your application runs on top of FreeRTOS.
After disabling flash support, you cannot flash your application using OpenOCD. Instead, you can flash it using |
Thanks! It looks like with Zephyr we are not using some (or may me all) additional features of the Espressif specific OpenOSD-esp32. Instead, is it possible to use the vanilla OpenOCD or JLINK GDB server? Will it be possible to flash and debug at ones with some of them? |
As I said, you can not run
As an alternative, looks like Jlink has ESP32-C6 support. https://www.segger.com/supported-devices/espressif |
Development Kit
nanoESP32-C6 v1.0 https://github.com/wuxx/nanoESP32-C6/blob/master/README_en.md
Module or chip used
ESP32-C6-WROOM-1
Debug Adapter
On-board JTAG (no additional addapter)
OpenOCD version
v0.12.0-esp32-20241016 (2024-10-16-14:17)
Operating System
Ubuntu 24.04
Using an IDE ?
vs code
OpenOCD command line
bin/openocd -f share/openocd/scripts/board/esp32c6-builtin.cfg -c "set ESP_RTOS none"
JTAG Clock Speed
default
ESP-IDF version
No ESP-IDF used. Instead Zephyr OS v4.0.99
Problem Description
I am trying to debug a hello world Zephyr OS project on esp32c6.
with the following comand:
launch.json:
tasks.json:
After starting the debug session vscode shows an error regarding "problemMatcher", see screenshot
The debug sessions starts but it is not possible to step through the code. When I try that the program executions starts but it is not stopping on breakpoints. In addition the openocd terminal shows a lot of warnings regarding flash mappings and an error regarding FreeRTOS.
How to configure openocd-esp32 to work correctly with a zephyr OS image?
Debug Logs
No response
Expected behavior
I can debug the application by stepping through the code.
Screenshots
No response
The text was updated successfully, but these errors were encountered: