Skip to content
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

[HELP] Cannot debug esp32c6 using open ocd #12905

Closed
1 task done
FelipeMdeO opened this issue Aug 13, 2024 · 8 comments
Closed
1 task done

[HELP] Cannot debug esp32c6 using open ocd #12905

FelipeMdeO opened this issue Aug 13, 2024 · 8 comments
Labels
Community: Question Further information is requested

Comments

@FelipeMdeO
Copy link
Contributor

Description

Description

Hello All,

I am trying debug esp32c6 using open ocd, I followed tutorial in link:
[https://nuttx.incubator.apache.org/docs/latest/platforms/risc-v/esp32c6/index.html#debugging-with-openocd

openocd -c 'set ESP_RTOS hwthread; set ESP_FLASH_SIZE 0' -f board/esp32c6-builtin.cfg

Open On-Chip Debugger v0.12.0-esp32-20240726 (2024-08-13-15:00)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
0
Info : only one transport option; autoselecting 'jtag'
Info : esp_usb_jtag: VID set to 0x303a and PID to 0x1001
Info : esp_usb_jtag: capabilities descriptor set to 0x2000
Info : Hardware thread awareness created
WARNING: ESP flash support is disabled!
force hard breakpoints
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: esp_usb_jtag: could not find or open device!
/usr/local/bin/../share/openocd/scripts/target/esp_common.cfg:9: Error: 
at file "/usr/local/bin/../share/openocd/scripts/target/esp_common.cfg", line 9
Error: [esp32c6] Unsupported DTM version: -1
Error: [esp32c6] Could not identify target type.

Do you have any idea what's happen?

Verification

  • I have verified before submitting the report.
@FelipeMdeO FelipeMdeO added the Community: Question Further information is requested label Aug 13, 2024
@acassis
Copy link
Contributor

acassis commented Aug 13, 2024

@fdcavalcanti @tmedicci please take a look!

@FelipeMdeO seems similar to this issue: espressif/openocd-esp32#315

@tmedicci
Copy link
Contributor

Hi @FelipeMdeO ,

Considering the message Error: esp_usb_jtag: could not find or open device!, it seems the USB/JTAG port is not connected. Can you please double-check if the 2nd USB port (the one in the right) is connected?

You should expected something like that on your dmesg when you attach the USB-C cable to the USB/JTAG port of the ESP32-C6:

[1214203.144071] usb 3-1.2.2: new full-speed USB device number 109 using xhci_hcd
[1214203.259848] usb 3-1.2.2: New USB device found, idVendor=303a, idProduct=1001, bcdDevice= 1.02
[1214203.259867] usb 3-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1214203.259874] usb 3-1.2.2: Product: USB JTAG/serial debug unit
[1214203.259880] usb 3-1.2.2: Manufacturer: Espressif
[1214203.259884] usb 3-1.2.2: SerialNumber: 60:55:F9:F7:4C:D4
[1214203.274098] cdc_acm 3-1.2.2:1.0: ttyACM0: USB ACM device

@FelipeMdeO
Copy link
Contributor Author

FelipeMdeO commented Aug 13, 2024

Hello @tmedicci ,

Yes, USB/JTAG port is connected, please look image below:

image

PS: I am using esp32c6 devkit m

@acassis
Copy link
Contributor

acassis commented Aug 13, 2024

@FelipeMdeO see the LIBUSB_ERROR_ACCESS, please try the same command with "sudo"

@fdcavalcanti
Copy link
Contributor

@FelipeMdeO Hi Felipe, what OS are you using? Did you check udev rules?

@FelipeMdeO
Copy link
Contributor Author

Hello @fdcavalcant.

I am using Ubuntu 20 .04 noble.

@acassis Thank you very much, running with sudo it worked.

@tmedicci
Copy link
Contributor

@tmedicci
Copy link
Contributor

Thanks for reporting. We will update the documentation to make it clearer...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community: Question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants