mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-19 03:53:37 +03:00
esp_console_new_repl_stdio() called esp_console_setup_prompt(), and thus linenoiseProbe(), before esp_stdio_install_io_driver(). On USB Serial JTAG the VFS read path reports zero available bytes until the driver is installed, so the probe never received the terminal reply, linenoise fell back to dumb mode, and the arrow keys printed escape sequences instead of recalling the command history. Install the IO driver right after the common init so that the probe has a working stdin, and uninstall it again on the error paths. Closes IDF-16181 Co-authored-by: Cursor <cursoragent@cursor.com>