Merge branch 'fix/icmp_echo_usb_serial_jtag' into 'master'

fix(examples): Use s_repl for USB Serial/JTAG in icmp_echo

See merge request espressif/esp-idf!52888
This commit is contained in:
Abhik Roy
2026-09-21 18:59:13 +08:00

View File

@@ -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
*