-
Notifications
You must be signed in to change notification settings - Fork 134
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
Can't Build on Windows (for real this time) (OCD-376) #162
Comments
@BrianAtDocumentedDesigns Can you tell the revision of eps32c3 you have? The very first revisions had problems with builtin USB_JTAG and need to disable it for debugging with external debug adapter.
or get it using esptool
|
gerekon The binary included in ESP-IDF is a dated one from April. That is why I want to build the binary from sources. I subsequently discovered that the Eclipse ESP32 plug in is not compatible with Eclipse versions after March 2021, but that does not mean OpenOCD is up to date. I know, for example that there has been at least one recent bug fix. For the record, the ESP32-C3 I am using was supplied to me by Espressif in June for evaluation of the JTAG function. If the instruction This is the dump I get when I flash the device Thanks |
I should have added that because of a problem with Eclipse (see https://www.esp32.com/viewtopic.php?f=13&t=21654#p78920) because I can't download or build the version of OpenOCD binary which fixes this bug #158 I have to close and reopen Eclipse when switching configurations. So for every change in source/debug session:
The version of OpenOCD which is in the ESP-IDF is v0.10.0-esp32-20210401 |
Revision 3 should have no problems with builtin USB_JTAG. Regarding your build problem... I think you need to add path to your libusb pkgconfig file ( Meanwhile I attach Windows distro build for the latest OpenOCD Please, let us know the results. |
Hi @BrianAtDocumentedDesigns , sample
then you can export the path which has
|
@BrianAtDocumentedDesigns Can we close this issue? Updated ESP32-C3 support is released. Please see v0.10.0-esp32-20210721. |
I haven't had time to test it but if you want to close it, fine with me. To be clear I have found significant issues with esp-idf, Eclipse, OpenOCD, and the documentation for all these components with respect to the ESP32-C3. I am more than happy that the list is reduced to only esp-idf, Eclipse, and the documentation. |
I just fought this problem all morning until I finally found this thread. Using this newer version v0.10.0-esp32-20210721 definitely fixes it! They need to get this in their esp-idf-tools installer and Visual Studio Code. I was beginning to think my C3 dev board was to blame. |
Environment
Attempting to build on Windows 10/MSYS2
Problem Description
I posted this to the espressif forum but did not get any suggestions. I had previously posted a similar issue but I was not following the most recent instructions.
I have been trying to build a current version of openocd on Windows using the instructions here https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#jtag-debugging-configuring-target
I have tried it multiple times but it fails with
configure: error: libusb-1.x is required for the MPSSE mode of FTDI based devices
even though I downloaded and unzipped libusb-1.x as per the instructions and when I ls I see it is were I think it should be
$ echo $CPPFLAGS
-I/c/Users/bjpic/esp/libusb/include/libusb-1.0 -D__USE_MINGW_ANSI_STDIO=1 -Wno-error
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ echo $LDFLAGS
-L/c/Users/bjpic/esp/libusb/MinGW32/.libs/dll
bjpic@LAPTOP-70Q5CT1Q MSYS ~/esp
$ ls
buildsetup.bat config.bat examples install.bat libusb-1.0.22.7z openocd-esp32 sdkconfig.ci
CMakeLists.txt example_test.py export.bat libusb Makefile README.md sdkconfig.defaults
Because configure fails I cannot run make. If I run configure without the options (i.e. --disable-doxygen-pdf --enable-ftdi --enable-jlink --enable-ulink --build=i686-w64-mingw32 --host=i686-w64-mingw32) It give me errors because libusb is not found.
I have attached a fill trace of the problem.
I am trying to build the most recent version of openocd because when I try to run it as per https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/jtag-debugging/index.html#jtag-debugging-configuring-target
I get the following
C:\Users\bjpic\Desktop\esp-idf>openocd -f board/esp32c3-builtin.cfg
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'
Warn : Transport "jtag" was already selected
force hard breakpoints
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
Info : esp_usb_jtag: Device found. Base speed 40000KHz, div range 1 to 255
Info : clock speed 40000 kHz
Info : JTAG tap: esp32c3.cpu tap/device found: 0x00005c25 (mfg: 0x612 (Espressif Systems), part: 0x0005, ver: 0x0)
Info : datacount=2 progbufsize=16
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40101104
Info : Listening on port 3333 for gdb connections
Note the Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
This occurs even though I have tried all the permutations of drivers for the USB port. When I try actual debugging in Eclipse I get a register dump and numerous lines like
Info : [0] Found 8 triggers
Error: esp_usb_jtag: usb sent only 0 out of 17 bytes.
Error: missing data from bitq interface
Error: dmi_scan failed jtag scan
...
Error: dmi_scan failed jtag scan
Error: failed read at 0x11, status=2
Error: esp_usb_jtag: usb sent only 0 out of 2601 bytes.
It seemed that since ESP32-C3 is new it makes more sense to use the most recent version of Openocd before trying to figure out the GDB issue.
Debug Logs
See attached for full dump of build output
Expected behavior
I would expect to be able to build openocd following the provided instructions.
Screenshots
na
openocdfails.txt
The text was updated successfully, but these errors were encountered: