Unable to Debug ESP32-S3-DevKitC1 v1.1

HopWorks
Posts: 8
Joined: Mon Sep 03, 2018 8:56 pm

Unable to Debug ESP32-S3-DevKitC1 v1.1

Postby HopWorks » Tue Jan 17, 2023 11:39 pm

Greets All,

Summary - I bought 3 ESP32-S3-DevKitC1-v1.1 devices with two USB ports. One is USB-UART and the other is USB, which when connected this way, allows for debugging using the internal JTAG circuitry. I have not been able to debug at all. I am using ESP-IDF 5.0, ESP-IDF extension version 1.5.1, and Visual Studio Code version 1.74.2.

I have been able to successfully build, flash, and monitor the board using the same USB (jtag one) using USB-UART but when I change to JTAG I have issues. I have searched everywhere for the launch.json configuration settings, but all I found was an older YouTube that was for using ESP-PROG, which is why my settings (posted below) look the way they do.

I would love to get JTAG working so I can set break points, etc. But after I hopefully get this working, I have questions on where the info is available on the launch.json settings. Like what the parameters mean, and what "setupCommands" parameters exist, and what I need to include here for the JTAG interface inside this board.

If I missed something in the setup docs for this sort of thing, my apologies. This is my 4th attempt to get this working after redoing my ESP-IDF install 3 times. Once using the installer from Espressif, and twice doing it through the extension.

I am including my launch.json settings here. If there is anything else I need or should include, please let me know. I am still somewhat new to the VSCODE IDE but if shown how, I will get the additional info.

I hope someone can help. I have crawled all over posts everywhere and still cannot get this working. For 2 days now.

Thank you for your valuable time! I appreciate it!!!

Code: Select all

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "espidf",
      "name": "Launch",
      "request": "launch"
    },
    {
      "name": "ESP32 OpenOCD",
      "type": "cppdbg",
      "request": "launch",
      "cwd": "${workspaceFolder}/build",
      "program": "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf",
      "miDebuggerPath": "C:/esp/Espressif/tools/tools/xtensa-esp32s3-elf/esp-2022r1-11.2.0/xtensa-esp32s3-elf/bin/xtensa-esp32s3-elf-gdb.exe"
    }
  ]
}

HopWorks
Posts: 8
Joined: Mon Sep 03, 2018 8:56 pm

Re: Unable to Debug ESP32-S3-DevKitC1 v1.1

Postby HopWorks » Thu Jan 19, 2023 12:27 am

Well 44 views but no replies yet, but I did not include enough information I believe. And once I get that together I will post it. In the meantime, I am reading up on Espressif's guides on using openocd and their xtensa gdb from the command line when concerning an internal JTAG interface like they have in their WROVER and my device, the ESP32-S3-DevKitC1, in Windows and Linux in hopes that I can find out why I am getting the error I do from the GDB. Which is...

Code: Select all

ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". Don't know how to run.  Try "help target".
The program 'C:\Users\hopwo\test_blink\build\test_blink.elf' has exited with code 42 (0x0000002a).
I figure that if I can accomplish what I need and want from the command line, I can then go into how the VSCode ESP-IDF extension uses it's settings to accomplish the same thing and tweak accordingly.

If you want something bad enough, can't be afraid to venture down rabbit holes, right? No matter how many there are.

Who is online

Users browsing this forum: cdollar and 102 guests