ESP32-C3 super mini boot log thru the USB port

Does someone have a trick on how to see the boot log on an ESP32-C3 super mini? I mean every time you reboot the PIO monitor gets disconnected (the USB device is removed) and before you are ready to connect again the boot log is long gone. I even had to put in a 10 sec. delay at the beginning of the application in order to get the App. log.

This is due to the fact that this board uses the native USB port of the ESP32-C3. As this is integrated in the MCU, it is also restarted on a reboot and loses the connection to the PC.

The extension Serial Monitor is available for VS Code.
This allows an automatic reconnection if the connection is lost:

Thanks for the reply!
Yes I also concluded that it was the USB port being disconnected, but I couldn’t find what to do about it. I will try the ‘Serial Monitor’ extension - thanks for the hint. :+1:

@sivar2311 I tried the ‘Serial Monitor’ extension, but I am still missing the boot log I only see the App. log. Maybe the ESP32-C3 don’t output a boot log as e.g. the ESP32-WROOM?
BTW do you know if the ‘Serial Monitor’ takes the ‘monitor_filters = esp32_exception_decoder’ from the platformio.ini into account?

It does:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x400462e2
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1144
load:0x403cc710,len:0xad8
load:0x403ce710,len:0x2f80
entry 0x403cc710

Using the Serial Monitor plugin you can use the DTR / RTS to force an USB_UART_CHIP_RESET

Open the Serial Monitor plugin and click on the tooth gear icon.
This brings up an additional line:

Check / Uncheck the DTR / RTS in the following sequence:

DTR
RTS
DTR

The ESP32-C3 is now in the download mode and should show:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x7 (DOWNLOAD(USB/UART0/1))
Saved PC:0x40383006
waiting for download

Continue the sequence:
RTS
RTS
This reboots the ESP32-C3 in normal mode. Now you should see the complete boot log:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xf (SPI_FAST_FLASH_BOOT)
Saved PC:0x40046c9e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1144
load:0x403cc710,len:0xad8
load:0x403ce710,len:0x2f80
entry 0x403cc710

@sivar2311 Wow, that is very nice - the solution to my question, thanks.
Wonder why this reset dosn’t disconnect the USB port. I guess that this emulated USB port doesn’t use the HW flow control for a hard reset as done on the ESP32devkit USB chip.

I rest my case. :grinning: :+1: