ESP32-S3 JTAG ROM UART
Posted: Thu Jul 28, 2022 2:08 pm
Hi,
I have an application where I need to be able to flash and have uart printing via USB. So I'm using the JTAG ROM UART. I configured it using the function from the examples and this forum:
It works, but with one major issue. It blocks unless I have a terminal (or some other program) opening the Serial/COM Port.
Is there any way to printfs from blocking program execution?
I have an application where I need to be able to flash and have uart printing via USB. So I'm using the JTAG ROM UART. I configured it using the function from the examples and this forum:
Code: Select all
setvbuf(stdin, NULL, _IONBF, 0);
/* Minicom, screen, idf_monitor send CR when ENTER key is pressed */
esp_vfs_dev_usb_serial_jtag_set_rx_line_endings(ESP_LINE_ENDINGS_CR);
/* Move the caret to the beginning of the next line on '\n' */
esp_vfs_dev_usb_serial_jtag_set_tx_line_endings(ESP_LINE_ENDINGS_CRLF);
/* Enable non-blocking mode on stdin and stdout */
fcntl(fileno(stdout), F_SETFL, 0);
fcntl(fileno(stdin), F_SETFL, 0);
usb_serial_jtag_driver_config_t usb_serial_jtag_config = (usb_serial_jtag_driver_config_t){256,256};
/* Install USB-SERIAL-JTAG driver for interrupt-driven reads and writes */
esp_err_t ret = usb_serial_jtag_driver_install(&usb_serial_jtag_config);
if (ret != ESP_OK) {
}
/* Tell vfs to use usb-serial-jtag driver */
esp_vfs_usb_serial_jtag_use_driver();
Is there any way to printfs from blocking program execution?