ESP32C3 JTAG-USB on a Raspberry Pi
ESP32C3 JTAG-USB on a Raspberry Pi
A Raspberry Pi 4 with (Linux Buster) is all I have.
I'd like to get jtag usb debugging on a rev. 3 ESP32C3DevKit
openocd built OK.
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
Or the one I built yesterday
Open On-Chip Debugger v0.10.0-esp32-20210721-12-g1cdfdce2 (2021-08-29-20:28)
...
I get this error:
openocd -f board/esp32c3-builtin.cfg
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: esp_usb_jtag: could not find or open device!
I'm using a ESP32-C3-DevKitC-02 and on /dev/ttyUSB0 and I can program it with IDF examples.
using ESP-IDF v4.3-356-g48ae2309fd-dirty
esptool.py v3.1-dev
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32-C3
Chip is unknown ESP32-C3 (revision 3)
I remember a soldering hardware mod to select the USB jtag but I think that was for an early version of the DevKit
No changes to the DEVKIT board.
Thanks for any help.
I'd like to get jtag usb debugging on a rev. 3 ESP32C3DevKit
openocd built OK.
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
Or the one I built yesterday
Open On-Chip Debugger v0.10.0-esp32-20210721-12-g1cdfdce2 (2021-08-29-20:28)
...
I get this error:
openocd -f board/esp32c3-builtin.cfg
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: esp_usb_jtag: could not find or open device!
I'm using a ESP32-C3-DevKitC-02 and on /dev/ttyUSB0 and I can program it with IDF examples.
using ESP-IDF v4.3-356-g48ae2309fd-dirty
esptool.py v3.1-dev
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32-C3
Chip is unknown ESP32-C3 (revision 3)
I remember a soldering hardware mod to select the USB jtag but I think that was for an early version of the DevKit
No changes to the DEVKIT board.
Thanks for any help.
Re: ESP32C3 JTAG-USB on a Raspberry Pi
What mod do you talk about? On espressif C3 devkit you can find pads to control if USB is native or over cp210x.bobolink wrote: I remember a soldering hardware mod to select the USB jtag but I think that was for an early version of the DevKit
No changes to the DEVKIT board.
From your logs i can tell you have board with cp210x configuration, so no JTAG, but you can re-solder resistors.
Native USB is ACMx port on linux OS.bobolink wrote:Serial port /dev/ttyUSB0
Re: ESP32C3 JTAG-USB on a Raspberry Pi
Thank you chegewara.
I think I understand.
I want to use VSCode or Eclipse with visual real-time debugging (like with the raspberry pi pico) but don’t want to buy a j-link.
thanks
I think I understand.
Do you know what espressif hardware devkit and version supports ESP32C3 jtag over USB without soldering anything?so no JTAG
I want to use VSCode or Eclipse with visual real-time debugging (like with the raspberry pi pico) but don’t want to buy a j-link.
thanks
Re: ESP32C3 JTAG-USB on a Raspberry Pi
I dont know about any devices that have for sure JTAG and i didnt even see such info on mouser.
My C3 devkits are from espressif, but i believe there are some boards on market, because on arduino-esp32 some people are asking to add C3 native USB support to flash boards.
My C3 devkits are from espressif, but i believe there are some boards on market, because on arduino-esp32 some people are asking to add C3 native USB support to flash boards.
-
- Posts: 9746
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32C3 JTAG-USB on a Raspberry Pi
If you get '/dev/ttyUSB0', you're seeing the external USB-to-serial converter that perhaps your board has. The native USB shows up as /dev/ttyACM0. If you have a DevkitM1, you need to move some zero-ohm links to route the USB port to the internal USB-serial-JTAG pins first, specifically R1 and R4 should be moved to R1 and R3. If these are too tiny for you, you can also take an USB cord, cut it in two, and connect the wires to +5V, GPIO18, GPIO19 and GND; the internal USB-serial_JTAG should appear there then.
Re: ESP32C3 JTAG-USB on a Raspberry Pi
@ESP_Sprite
Thank you. Will put my DevKitM1 under the microscope and give it a try.
Thank you. Will put my DevKitM1 under the microscope and give it a try.
you need to move some zero-ohm links to route the USB port to the internal USB-serial-JTAG pins first, specifically R1 and R4 should be moved to R1 and R3. If these are too tiny for you, you can also take an USB cord, cut it in two, and connect the wires to +5V, GPIO18, GPIO19 and GND; the internal USB-serial_JTAG should appear there then.
Re: ESP32C3 JTAG-USB on a Raspberry Pi
OK. Removed resistors and chopped up a cable.
/dev/ttyUSB0 went away and /ttyACM0 showed up--as we hoped.
ls /dev/ttyACM*
/dev/ttyACM0
However, openocd fails trying to open a USB port now. Does it need two ports? One for JTAG and one for serial?
Any help would be greatly appreciated. Those resistors aren't going back anytime soon
_______________________
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
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_ACCESS
Error: esp_usb_jtag: could not find or open device!
Here is some info on the new JTAG port from ESP32-C3-DevKitM-1
35: USB 00.1: 0000 Unclassified device
[Created at usb.122]
Unique ID: DrDI.MMglq5bokX0
Parent ID: ADDn.mUqILwxEtWB
SysFS ID: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1
SysFS BusID: 1-1.1:1.1
Hardware Class: unknown
Model: "Espressif USB JTAG/serial debug unit"
Hotplug: USB
Vendor: usb 0x303a "Espressif"
Device: usb 0x1001 "USB JTAG/serial debug unit"
Revision: "1.01"
Serial ID: "7C:DF:A1:89:25:A4"
Driver: "cdc_acm"
Driver Modules: "cdc_acm"
Speed: 12 Mbps
Module Alias: "usb:v303Ap1001d0101dcEFdsc02dp01ic0Aisc02ip00in01"
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #42 (Hub)
/dev/ttyUSB0 went away and /ttyACM0 showed up--as we hoped.
ls /dev/ttyACM*
/dev/ttyACM0
However, openocd fails trying to open a USB port now. Does it need two ports? One for JTAG and one for serial?
Any help would be greatly appreciated. Those resistors aren't going back anytime soon
_______________________
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
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_ACCESS
Error: esp_usb_jtag: could not find or open device!
Here is some info on the new JTAG port from ESP32-C3-DevKitM-1
35: USB 00.1: 0000 Unclassified device
[Created at usb.122]
Unique ID: DrDI.MMglq5bokX0
Parent ID: ADDn.mUqILwxEtWB
SysFS ID: /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.1
SysFS BusID: 1-1.1:1.1
Hardware Class: unknown
Model: "Espressif USB JTAG/serial debug unit"
Hotplug: USB
Vendor: usb 0x303a "Espressif"
Device: usb 0x1001 "USB JTAG/serial debug unit"
Revision: "1.01"
Serial ID: "7C:DF:A1:89:25:A4"
Driver: "cdc_acm"
Driver Modules: "cdc_acm"
Speed: 12 Mbps
Module Alias: "usb:v303Ap1001d0101dcEFdsc02dp01ic0Aisc02ip00in01"
Config Status: cfg=new, avail=yes, need=no, active=unknown
Attached to: #42 (Hub)
Re: ESP32C3 JTAG-USB on a Raspberry Pi
Maybe you are missing udev rules?
https://openocd.org/doc/html/Running.htmlOn Linux, this usually involves installing a file in /etc/udev/rules.d, so OpenOCD has permissions.
Re: ESP32C3 JTAG-USB on a Raspberry Pi
Indeed I was.Maybe you are missing udev rules?
Thanks again chegewara (the USB, Bluetooth, BLE, ...) expert.
note to self: read ALL the instructions!
__________________________________________
/home/pi/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin/openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
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
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
-
- Posts: 2
- Joined: Mon Mar 28, 2022 6:30 pm
Re: ESP32C3 JTAG-USB on a Raspberry Pi
Sorry, I don't understand how the problem was solved.bobolink wrote: ↑Tue Aug 31, 2021 6:21 pmIndeed I was.Maybe you are missing udev rules?
Thanks again chegewara (the USB, Bluetooth, BLE, ...) expert.
note to self: read ALL the instructions!
__________________________________________
/home/pi/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin/openocd -f board/esp32c3-builtin.cfg
Open On-Chip Debugger v0.10.0-esp32-20210401 (2021-04-01-15:45)
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
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
Who is online
Users browsing this forum: Google [Bot], johnny_henriksen and 112 guests