Page 1 of 1

USB UART implementation

Posted: Thu Jan 11, 2024 10:59 am
by JohnnyZ
Hi,

I am playing with ESP32-C3.

Which function is used to put char on UART over USB/JTAG?
From esp-idf/components/log/log.c esp_log_writev() uses (*s_log_print_func)(format, args) which is set to "vprintf" by default.
Looking through sources I can't find that is set to something else.

Following executing path with GDB (vanilla v13.2) the last executed line is:
https://github.com/espressif/newlib-esp ... ntf.c#L686
Which doesn't make sense.

If I want to put char to USB-UART without IDF's help which ROM/libc function I should use?
If I to implement it myself, to which address I should write my char?

Re: USB UART implementation

Posted: Fri Jan 12, 2024 3:11 am
by ESP_Sprite
It depends. If you get your debugging info via the USB-serial-JTAG port as well, you can simply use putchar().