From 4a0e9f64714ee834993d986bdd46338c7110622e Mon Sep 17 00:00:00 2001 From: Abhik Roy Date: Thu, 17 Sep 2026 00:19:18 +1000 Subject: [PATCH] fix(examples): Use s_repl for USB Serial/JTAG in icmp_echo The USB Serial/JTAG console branch passed an undeclared `repl` pointer. UART and USB CDC already use `s_repl`. --- .../protocols/icmp_echo/main/echo_example_main.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/examples/protocols/icmp_echo/main/echo_example_main.c b/examples/protocols/icmp_echo/main/echo_example_main.c index 4dc036caf7c..8bb236d5eb3 100644 --- a/examples/protocols/icmp_echo/main/echo_example_main.c +++ b/examples/protocols/icmp_echo/main/echo_example_main.c @@ -208,17 +208,8 @@ void app_main(void) ESP_ERROR_CHECK(esp_event_loop_create_default()); esp_console_repl_config_t repl_config = ESP_CONSOLE_REPL_CONFIG_DEFAULT(); - // install console REPL environment -#if CONFIG_ESP_CONSOLE_UART - esp_console_dev_uart_config_t uart_config = ESP_CONSOLE_DEV_UART_CONFIG_DEFAULT(); - ESP_ERROR_CHECK(esp_console_new_repl_uart(&uart_config, &repl_config, &s_repl)); -#elif CONFIG_ESP_CONSOLE_USB_CDC - esp_console_dev_usb_cdc_config_t cdc_config = ESP_CONSOLE_DEV_CDC_CONFIG_DEFAULT(); - ESP_ERROR_CHECK(esp_console_new_repl_usb_cdc(&cdc_config, &repl_config, &s_repl)); -#elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG - esp_console_dev_usb_serial_jtag_config_t usbjtag_config = ESP_CONSOLE_DEV_USB_SERIAL_JTAG_CONFIG_DEFAULT(); - ESP_ERROR_CHECK(esp_console_new_repl_usb_serial_jtag(&usbjtag_config, &repl_config, &repl)); -#endif + // install console REPL on the configured stdio backend (UART / USB CDC / USB Serial/JTAG) + ESP_ERROR_CHECK(esp_console_new_repl_stdio(&repl_config, &s_repl)); /* Use either WiFi console commands or menuconfig options to connect to WiFi/Ethernet *