Hello,
I am testing my custom PCB with esp32-c3-mini-1 microcontroller. I tested all my peripherals by programming esp32 via USB_UART chip, that is present on PCB, but I also made a possibility to change flashing method, so now I try to flash firmware via USB. ESP32-c3 has integrated usb controller, so it can be flashed by just connecting D- and D+. Through searching I found ,that these lines are needed in platformio.ini file:
I have found that my PCB design was interrupting flashing session, so after fixing it, I am able to flash the firmware, my code works (LED is blinking), but I also want to see text that I am printing via serial.println, maybe you know how to set up serial monitor to print my text via USB and not UART? I added these values in platformio.ini:
I see, thank you for correction. But this still doesn’t help. Its my first time trying to use internal USB JTAG controller to flash mcu and I’m just searching solutions on the internet. Since flashing is now working, I just want to see my data and text that I print. Maybe I need to change USB JTAG/serial debug unit (Interface 0) drivers? because USB JTAG/serial debug unit (Interface 2) and USB JTAG/serial debug unit (Interface 0) are two devices on device manager and zadig list, that disappears when I disconnect my PCB.
So yeah, I managed to solve this by myself. I will try to explain my steps for flashing and serial monitoring esp32-c3-mini-1 chip when using internal USB JTAG controller on Arduino framework:
remove all chips or components from D- and D+ lines if they are not used, in my PCB, D- and D+ could go either to esp32 or to CP2102N-A02-GQFN24 chip, selection is made with jumpers, so I have to remove CP2102N chip completely.
Add these lines in platformio.ini file of your project: