From 4815af75bc0bc21e1e66b958fd4ee4e90c24ba10 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 25 Jul 2023 14:45:07 +1000 Subject: [PATCH] esp32/boards/GENERIC_C3: Merge with GENERIC_C3_USB. As the IDF no longer supports earlier revisions of the C3 by default, we now just explicitly support rev 3+ and enable USB (which wasn't supported in earlier revisions). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared --- ports/esp32/boards/GENERIC_C3/board.md | 7 +++++++ .../boards/GENERIC_C3/mpconfigboard.cmake | 1 + .../sdkconfig.c3usb} | 0 ports/esp32/boards/GENERIC_C3_USB/board.json | 20 ------------------- .../boards/GENERIC_C3_USB/mpconfigboard.cmake | 7 ------- .../boards/GENERIC_C3_USB/mpconfigboard.h | 8 -------- 6 files changed, 8 insertions(+), 35 deletions(-) create mode 100644 ports/esp32/boards/GENERIC_C3/board.md rename ports/esp32/boards/{GENERIC_C3_USB/sdkconfig.board => GENERIC_C3/sdkconfig.c3usb} (100%) delete mode 100644 ports/esp32/boards/GENERIC_C3_USB/board.json delete mode 100644 ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake delete mode 100644 ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.h diff --git a/ports/esp32/boards/GENERIC_C3/board.md b/ports/esp32/boards/GENERIC_C3/board.md new file mode 100644 index 000000000000..1604b879c59a --- /dev/null +++ b/ports/esp32/boards/GENERIC_C3/board.md @@ -0,0 +1,7 @@ +The following files are firmware images that should work on most +ESP32-C3-based boards with 4MiB of flash, including WROOM and MINI modules, +that use the revision 3 silicon (or newer). + +USB serial/JTAG support is enabled on pin 18 and 19. Note that this +is not a full USB stack, the C3 just provides a CDC/ACM class serial +and JTAG interface. diff --git a/ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake index 38bf7388faf1..c8f78c161d22 100644 --- a/ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_C3/mpconfigboard.cmake @@ -3,4 +3,5 @@ set(IDF_TARGET esp32c3) set(SDKCONFIG_DEFAULTS boards/sdkconfig.base boards/sdkconfig.ble + boards/GENERIC_C3/sdkconfig.c3usb ) diff --git a/ports/esp32/boards/GENERIC_C3_USB/sdkconfig.board b/ports/esp32/boards/GENERIC_C3/sdkconfig.c3usb similarity index 100% rename from ports/esp32/boards/GENERIC_C3_USB/sdkconfig.board rename to ports/esp32/boards/GENERIC_C3/sdkconfig.c3usb diff --git a/ports/esp32/boards/GENERIC_C3_USB/board.json b/ports/esp32/boards/GENERIC_C3_USB/board.json deleted file mode 100644 index 6d51e0a2c151..000000000000 --- a/ports/esp32/boards/GENERIC_C3_USB/board.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "deploy": [ - "../deploy_c3.md" - ], - "docs": "", - "features": [ - "BLE", - "External Flash", - "WiFi" - ], - "id": "esp32c3-usb", - "images": [ - "esp32c3_devkitmini.jpg" - ], - "mcu": "esp32c3", - "product": "ESP32-C3 with USB", - "thumbnail": "", - "url": "https://www.espressif.com/en/products/modules", - "vendor": "Espressif" -} diff --git a/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake deleted file mode 100644 index 7436eead8783..000000000000 --- a/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(IDF_TARGET esp32c3) - -set(SDKCONFIG_DEFAULTS - boards/sdkconfig.base - boards/sdkconfig.ble - boards/GENERIC_C3_USB/sdkconfig.board -) diff --git a/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.h b/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.h deleted file mode 100644 index d403e70e46d4..000000000000 --- a/ports/esp32/boards/GENERIC_C3_USB/mpconfigboard.h +++ /dev/null @@ -1,8 +0,0 @@ -// This configuration is for a generic ESP32C3 board with 4MiB (or more) of flash. - -#define MICROPY_HW_BOARD_NAME "ESP32C3 module" -#define MICROPY_HW_MCU_NAME "ESP32C3" - -#define MICROPY_HW_ENABLE_SDCARD (0) -#define MICROPY_PY_MACHINE_DAC (0) -#define MICROPY_PY_MACHINE_I2S (0)