ESP32-C3 Unresolved inclusions, Solved OpenOcd Problem

BrianP
Posts: 53
Joined: Mon Apr 13, 2020 1:48 pm

ESP32-C3 Unresolved inclusions, Solved OpenOcd Problem

Postby BrianP » Sun May 23, 2021 3:05 pm

Edited to show solution to OpenOCD ESP32-C3 ( see at the end)

I have modified my ESP32-C3 devkit to use the internal USB. I can program the device from both idf.py and Eclipse (!). I have a number of problems:

1) I can compile and flash successfully, however, Eclipse shows unresolved inclusions so when I go to flash I get an "error" but if I ignore I can flash. Various permutations of "clean", index, freshen, etc. have no effect. This would likely render attempts to debug useless. I am on Eclipse Version: 2021-03 (4.19.0) Build id: 20210312-0638 which is the one the ESP-IDF downloaded.

Usually with Eclipse you can simple add files to the project but that does not seem to be an option here.
Edit I discovered I also get the following CMake Warning at C:/Users/bjpic/Desktop/esp-idf/tools/cmake/crosstool_version_check.cmake:28 (message): but I do not know what that means


2) When I try and use the built in JTAG debugger it fails.

Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:46)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 40000 kHz


Thanks
Warn : Interface already configured, ignoring
Warn : Transport "jtag" was already selected
force hard breakpoints
Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!

The details are

Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: No connection could be made because the target machine actively refused it.
Failed to execute MI command:
-target-select remote localhost:3333
Error message from debugger back end:
localhost:3333: No connection could be made because the target machine actively refused it.
localhost:3333: No connection could be made because the target machine actively refused it.


My debug configuration is

-s ${openocd_path}/share/openocd/scripts -f interface/esp_usb_jtag.cfg -f board/esp32c3-builtin.cfg

I have tried opening Windows Firewall local port 3333 and local port all ports and it doesn't seem to matter.


Solution to OpenOCD ESP32-C3:
Apparently the proper driver was only partially installed for the ESP32-C3 USB port. I downloaded this tool https://visualgdb.com/UsbDriverTool/ and it showed warning triangle on the JTAG port. I selected it, right clicked, and installed the Libusb-WinUSB driver. After that OpenOCD loads fine. I still have the unresolved inclusions problem which I believe stops me from debugging. I will make a new post.

fahrettinaslan
Posts: 5
Joined: Wed Mar 30, 2022 10:39 am

Re: ESP32-C3 Unresolved inclusions, Solved OpenOcd Problem

Postby fahrettinaslan » Wed Apr 06, 2022 1:29 pm

Hi,

Did you solve it ?
If you solved it, I will be glad if you write how you solved it.
Last edited by fahrettinaslan on Tue Jun 14, 2022 6:21 am, edited 2 times in total.

BrianP
Posts: 53
Joined: Mon Apr 13, 2020 1:48 pm

Re: ESP32-C3 Unresolved inclusions, Solved OpenOcd Problem

Postby BrianP » Thu Apr 07, 2022 2:20 am

The solution to the OpenOCD problem is right above

Solution to OpenOCD ESP32-C3:
Apparently the proper driver was only partially installed for the ESP32-C3 USB port. I downloaded this tool https://visualgdb.com/UsbDriverTool/ and it showed warning triangle on the JTAG port. I selected it, right clicked, and installed the Libusb-WinUSB driver. After that OpenOCD loads fine. I still have the unresolved inclusions problem which I believe stops me from debugging. I will make a new post.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 347 guests