ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

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

ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby BrianP » Wed May 19, 2021 3:50 pm

Hello and thanks in advance for the help.

I recently received my ESP32-C3 mini development kit. I am pretty sure it is configured to use the CP2102 USB interface and so R1 and R4 are installed. I would like to use the internal USB JTAG interface which I understand requires the removal of R1 and R4 and installation of R2 and R3 (though I am not sure this is the case). This would also free up RXD and TXD, which I need to use.

I have not been able to find documentation on how to use the Devkits with the USB JTAG, nor have I been able to determine the location of R1, R2, R3, R4. I have tried "beeping out" the circuit but would prefer not to ruin my board.

Is there any guidance as to where those components are and/or how to use USB JTAG.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby ESP_Sprite » Wed May 19, 2021 11:33 pm

The PCB layout of that devboard can be found here. As far as I can see, you need to rotate those resistors 90 degrees: move them from the red to the green position in this image:
c3_builtin.png
c3_builtin.png (246.05 KiB) Viewed 21230 times
You probably also want to disconnect the RxD/TxD pins from the CP2104 to the ESP32C3 if you want to use those pins. You can do that by removing R21/R22, I marked those in blue.

The builtin USB thing should more-or-less work as an extra UART inside the ESP32C3 and as a generic CDC-ACM serial port (=no drivers required) on the PC side. You do need to use the latest master of ESP-IDF to get full support for it, and you specifically want to select the device as your console output UART in menuconfig, otherwise your debug messages will go to UART0.

On the JTAG side, just use esp_usb_jtag.cfg as your JTAG adapter config file in OpenOCD and you should be good.

If you need any more help, feel free to post it here. Support for the built-in USB-to-JTAG thing on the C3 is pretty new, so I'd be interested in seeing how you fare with it.

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

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby BrianP » Wed May 19, 2021 11:47 pm

Thanks for the reply! That's exactly what I was looking for. For some reason I was not able to find the information but now I have it. Thanks again!

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby chegewara » Thu May 20, 2021 4:23 am

Is not that you need devkit rev 3 to get USB to JTAG to work? I thought it was broken in older versions.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby ESP_Sprite » Thu May 20, 2021 5:54 am

The chip itself needs to be at least ECO3, indeed. Not sure if that somehow matches with a certain version of devboard, but given the fact that all non-ECO3 chips were pre-releases, I imagine that if you buy a mass-production board by now you're sure to have that rev.

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

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby BrianP » Thu May 20, 2021 12:12 pm

I'll try the mod later today and let you know.

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

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby BrianP » Fri May 21, 2021 2:31 pm

Alas, I am not used to working with SMT parts as small as those resistors. I removed them OK but I could not solder anything in place. I used an ultra-fine pitch iron but the parts kept sticking to the iron instead of the board. I ended up screwing up the tracks.

Fortunately, I bought two development boards and I know I can fix my problem, either by soldering to the USB connector or the external pins.

Now I am struggling with installing the ESP-IDF. It installs OK but the installation menu at the end does not correspond to the directions on the website. When I try and compile "helloworld" for the C3 I either get toos not found or some other error in Eclipse.

I am now trying offline installation.

MIKHAIL
Posts: 2
Joined: Wed Dec 22, 2021 6:11 pm

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby MIKHAIL » Wed Dec 22, 2021 6:18 pm

Can anybody provide step-by-step instruction on any platform that you managed to flash the device on with Magic Built in USB JTAG? (ESP-idf Eclipse, VS Code platform IO)

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby ESP_Sprite » Thu Dec 23, 2021 2:05 am

If you mean the USB-serial-JTAG device, it should simply show up as another serial port; you'd flash in the same way as you would over a 'standard' USB to serial adapter. (Note under Linux and macOS the device nodes may be named different, e.g. /dev/ttyACM0 instead of /dev/ttyUSB0)

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

Re: ESP32-C3 Mini Devkit: Configure for Built in USB JTAG?

Postby BrianP » Thu Dec 23, 2021 2:07 am

Try this https://www.esp32.com/viewtopic.php?f=40&t=22365

I have put this aside for a few months to work on a second processor used on my project.

Who is online

Users browsing this forum: No registered users and 57 guests