Page 1 of 1

on-chip debugging - vscode - esp32-c6-devkitC-1

Posted: Tue Apr 23, 2024 5:01 am
by leroymasongov
Hi,
I am using VS code with the ESP-IDF framework.

I can flash code with both UART and JTAG.

I am unable to get on-chip debugging working from Visual Studio. All of the online articles seem to talk about Eclipse.

Does openocd currently work with vs code?

Do I need to install GDB seperately?

regards
Leroy

Re: on-chip debugging - vscode - esp32-c6-devkitC-1

Posted: Tue Apr 23, 2024 2:42 pm
by DrMickeyLauer

Re: on-chip debugging - vscode - esp32-c6-devkitC-1

Posted: Wed Apr 24, 2024 4:05 am
by Timmwardion
https://www.youtube.com/watch?v=uq93H7T7cOQ - Awesome starter for on-chip debugging

This is a great walkthrough too: https://www.youtube.com/watch?v=rLXjd4VxYaU

Re: on-chip debugging - vscode - esp32-c6-devkitC-1

Posted: Tue Apr 30, 2024 11:25 pm
by leroymasongov
Hi, thanks for your help and interest in my problem.

A comment: I am now able to use GDB command line to look at breakpoints, source code, etc on my ESP32-C6-Devkit

All of the videos referred to use the ESP-PROG debugging chip. This is contrary to my expectations for the ESP32-C6-DevkitC-1. I expected NOT to need an external debugger chip (as show in the referred videos) since the "ESP32-C6 has a built-in JTAG circuitry and can be debugged without any additional chip." See link below.

https://docs.espressif.com/projects/esp ... -jtag.html

My progress: I am currently able to debug on chip with the GDB command line. My issue remains with VS code. The error messages have evolved so I guess that's on the bright side.

I've drawn what I know and don't know in the attached diagram. VS code and gdb and openocd currently don't communicate, I guess. I know there's configured port numbers for web services but am delving into config files to determine the mechanics of communication.

I can post more diagnostic info but I think I'll get there. Like I say, the error messages haven't stayed the same and seem more trival connection issues now.

Also attached are launch.json png from vs code and the log of output from running it in "Run and Debug" explorer.

regards from Australia,
Leroy
esp32-c6-debug-system-context.png
esp32-c6-debug-system-context.png (21.91 KiB) Viewed 3422 times