diff options
| author | Patrick Van Oosterwijck <patrick@silicognition.com> | 2021-08-26 12:19:46 -0600 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-08-31 00:12:41 +1000 |
| commit | a66bd7a48925d318e1dd6ada756df947ffacdc12 (patch) | |
| tree | 5905d73fc0e8fd722b37840ef44933bb2ab6d9f9 /ports/esp32/main.c | |
| parent | 3720a570f2c2d1617d59a9832e4384e4479006a7 (diff) | |
esp32/boards: Add GENERIC_C3_USB board with USB serial/JTAG support.
Add a new board type for ESP32-C3 revision 3 and up that implement the USB
serial/JTAG port on pin 18 and 19. This variant uses the USB serial for
programming and console, leaving the UART free.
- Pins 18 and 19 are correctly reserved for this variant. Also pins 14-17
are reserved for flash for any ESP32-C3 so they can't be reconfigured
anymore to crash the system.
- Added usb_serial_jtag.c and .h to implement this interface.
- Interface was tested to work correctly together with webrepl.
- Interface was tested to work correctly when sending and receiving
large files with ampy.
- Disconnecting terminal or USB will not hang the system when it's
trying to print.
Diffstat (limited to 'ports/esp32/main.c')
| -rw-r--r-- | ports/esp32/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/esp32/main.c b/ports/esp32/main.c index 0650c8d71..2ba613668 100644 --- a/ports/esp32/main.c +++ b/ports/esp32/main.c @@ -58,6 +58,7 @@ #include "shared/runtime/pyexec.h" #include "uart.h" #include "usb.h" +#include "usb_serial_jtag.h" #include "modmachine.h" #include "modnetwork.h" #include "mpthreadport.h" @@ -89,6 +90,8 @@ void mp_task(void *pvParameter) { #endif #if CONFIG_USB_ENABLED usb_init(); + #elif CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG + usb_serial_jtag_init(); #else uart_init(); #endif |
