From fdb9edd8c6fbdb9b0c0909ca718f515d4014ad19 Mon Sep 17 00:00:00 2001 From: Dmitry <> Date: Tue, 24 Aug 2021 12:19:21 +0300 Subject: [PATCH] Bugfix enable console RX UART for gdbstub for runtime mode only. --- components/driver/uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/driver/uart.c b/components/driver/uart.c index 3f06bc82eb..8bc55f25c9 100644 --- a/components/driver/uart.c +++ b/components/driver/uart.c @@ -1515,9 +1515,9 @@ err: esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_buffer_size, int event_queue_size, QueueHandle_t *uart_queue, int intr_alloc_flags) { esp_err_t r; -#ifdef CONFIG_ESP_GDBSTUB_ENABLED +#ifdef CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME ESP_RETURN_ON_FALSE((uart_num != CONFIG_ESP_CONSOLE_UART_NUM), ESP_FAIL, UART_TAG, "UART used by GDB-stubs! Please disable GDB in menuconfig."); -#endif // CONFIG_ESP_GDBSTUB_ENABLED +#endif // CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME ESP_RETURN_ON_FALSE((uart_num < UART_NUM_MAX), ESP_FAIL, UART_TAG, "uart_num error"); ESP_RETURN_ON_FALSE((rx_buffer_size > SOC_UART_FIFO_LEN), ESP_FAIL, UART_TAG, "uart rx buffer length error"); ESP_RETURN_ON_FALSE((tx_buffer_size > SOC_UART_FIFO_LEN) || (tx_buffer_size == 0), ESP_FAIL, UART_TAG, "uart tx buffer length error");