esp32: Fix ESP32-C3 USB serial/jtag peripheral pre-IDF 5.1.
Regression in 0a11832cd in IDF 5.0.x where macro
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG_ENABLED is not defined.
With this patch, ESP32-S3 still USB Serial/JTAG incorrectly (now on all
ESP-IDF versions).
Closes #15701
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h
index a5c6b9c..25fa470 100644
--- a/ports/esp32/mpconfigport.h
+++ b/ports/esp32/mpconfigport.h
@@ -260,6 +260,11 @@
// board specifics
#define MICROPY_PY_SYS_PLATFORM "esp32"
+// Enable stdio over USB Serial/JTAG peripheral
+#ifndef MICROPY_HW_ESP_USB_SERIAL_JTAG
+#define MICROPY_HW_ESP_USB_SERIAL_JTAG (SOC_USB_SERIAL_JTAG_SUPPORTED)
+#endif
+
// ESP32-S3 extended IO for 47 & 48
#ifndef MICROPY_HW_ESP32S3_EXTENDED_IO
#define MICROPY_HW_ESP32S3_EXTENDED_IO (1)