usb_serial_jtag: fix the bug that cannot write with usb_jtag

This commit is contained in:
Cao Sen Miao 2021-05-13 11:29:47 +08:00
parent d6cdb3e0ae
commit f49d6bf061
2 changed files with 4 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#include "esp32s2/rom/usb/usb_common.h" #include "esp32s2/rom/usb/usb_common.h"
#elif CONFIG_IDF_TARGET_ESP32C3 #elif CONFIG_IDF_TARGET_ESP32C3
#include "esp32c3/rom/ets_sys.h" #include "esp32c3/rom/ets_sys.h"
#include "esp32c3/rom/uart.h"
#endif #endif
#include "esp_rom_gpio.h" #include "esp_rom_gpio.h"
#include "esp_rom_uart.h" #include "esp_rom_uart.h"
@ -115,7 +116,7 @@ void bootloader_console_init(void)
#ifdef CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG #ifdef CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG
void bootloader_console_init(void) void bootloader_console_init(void)
{ {
//Nothing to do; ROM already outputs here by default. UartDevice *uart = GetUartDevice();
//(But also to the UART; should we disable that? hmm.) uart->buff_uart_no = ESP_ROM_USB_SERIAL_DEVICE_NUM;
} }
#endif //CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG #endif //CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG

View File

@ -19,3 +19,4 @@
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library #define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
#define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM #define ESP_ROM_UART_CLK_IS_XTAL (1) // UART clock source is selected to XTAL in ROM
#define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking #define ESP_ROM_HAS_RETARGETABLE_LOCKING (1) // ROM was built with retargetable locking
#define ESP_ROM_USB_SERIAL_DEVICE_NUM (3) // UART uses USB_SERIAL_JTAG port in ROM.