diff options
12 files changed, 29 insertions, 98 deletions
diff --git a/ports/esp32/boards/GENERIC_S3/board.json b/ports/esp32/boards/GENERIC_S3/board.json index c30d4ed99..be2170c12 100644 --- a/ports/esp32/boards/GENERIC_S3/board.json +++ b/ports/esp32/boards/GENERIC_S3/board.json @@ -6,6 +6,7 @@ "features": [ "BLE", "External Flash", + "External RAM", "WiFi" ], "images": [ @@ -15,5 +16,8 @@ "product": "ESP32-S3", "thumbnail": "", "url": "https://www.espressif.com/en/products/modules", - "vendor": "Espressif" + "vendor": "Espressif", + "variants": { + "spiram-oct": "Support for Octal-SPIRAM" + } } diff --git a/ports/esp32/boards/GENERIC_S3/board.md b/ports/esp32/boards/GENERIC_S3/board.md new file mode 100644 index 000000000..cc902eeb8 --- /dev/null +++ b/ports/esp32/boards/GENERIC_S3/board.md @@ -0,0 +1,7 @@ +The following files are firmware that should work on most ESP32-S3-based +boards with 8MiB of flash, including WROOM and MINI modules. + +This firmware supports configurations with and without SPIRAM (also known as +PSRAM) and will auto-detect a connected SPIRAM chip at startup and allocate +the MicroPython heap accordingly. However if your board has Octal SPIRAM, then +use the "spiram-oct" variant. diff --git a/ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake index 3d83f8904..bd163f9f3 100644 --- a/ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake +++ b/ports/esp32/boards/GENERIC_S3/mpconfigboard.cmake @@ -4,5 +4,18 @@ set(SDKCONFIG_DEFAULTS boards/sdkconfig.base boards/sdkconfig.usb boards/sdkconfig.ble + boards/sdkconfig.spiram_sx boards/GENERIC_S3/sdkconfig.board ) + +if(MICROPY_BOARD_VARIANT STREQUAL "spiram-oct") + set(SDKCONFIG_DEFAULTS + ${SDKCONFIG_DEFAULTS} + boards/sdkconfig.240mhz + boards/sdkconfig.spiram_oct + ) + + list(APPEND MICROPY_DEF_BOARD + MICROPY_HW_BOARD_NAME="Generic ESP32S3 module with Octal-SPIRAM" + ) +endif() diff --git a/ports/esp32/boards/GENERIC_S3/mpconfigboard.h b/ports/esp32/boards/GENERIC_S3/mpconfigboard.h index b8f5fb256..8d369c7db 100644 --- a/ports/esp32/boards/GENERIC_S3/mpconfigboard.h +++ b/ports/esp32/boards/GENERIC_S3/mpconfigboard.h @@ -1,4 +1,7 @@ -#define MICROPY_HW_BOARD_NAME "ESP32S3 module" +#ifndef MICROPY_HW_BOARD_NAME +// Can be set by mpconfigboard.cmake. +#define MICROPY_HW_BOARD_NAME "Generic ESP32S3 module" +#endif #define MICROPY_HW_MCU_NAME "ESP32S3" #define MICROPY_PY_MACHINE_DAC (0) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM/board.json b/ports/esp32/boards/GENERIC_S3_SPIRAM/board.json deleted file mode 100644 index 947787f3a..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM/board.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "deploy": [ - "../deploy_s3.md" - ], - "docs": "", - "features": [ - "BLE", - "External Flash", - "WiFi" - ], - "images": [ - "generic_s3.jpg" - ], - "mcu": "esp32s3", - "product": "Generic ESP32-S3 (SPIRAM)", - "thumbnail": "", - "url": "https://www.espressif.com/en/products/modules", - "vendor": "Espressif" -} diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.cmake deleted file mode 100644 index e0b92dcd2..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.cmake +++ /dev/null @@ -1,9 +0,0 @@ -set(IDF_TARGET esp32s3) - -set(SDKCONFIG_DEFAULTS - boards/sdkconfig.base - boards/sdkconfig.usb - boards/sdkconfig.ble - boards/sdkconfig.spiram_sx - boards/GENERIC_S3_SPIRAM/sdkconfig.board -) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.h b/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.h deleted file mode 100644 index 1a8560a2d..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM/mpconfigboard.h +++ /dev/null @@ -1,10 +0,0 @@ -#define MICROPY_HW_BOARD_NAME "ESP32S3 module (spiram)" -#define MICROPY_HW_MCU_NAME "ESP32S3" - -#define MICROPY_PY_MACHINE_DAC (0) - -// Enable UART REPL for modules that have an external USB-UART and don't use native USB. -#define MICROPY_HW_ENABLE_UART_REPL (1) - -#define MICROPY_HW_I2C0_SCL (9) -#define MICROPY_HW_I2C0_SDA (8) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM/sdkconfig.board b/ports/esp32/boards/GENERIC_S3_SPIRAM/sdkconfig.board deleted file mode 100644 index a36b97116..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM/sdkconfig.board +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_ESPTOOLPY_FLASHMODE_QIO=y -CONFIG_ESPTOOLPY_FLASHFREQ_80M=y -CONFIG_ESPTOOLPY_AFTER_NORESET=y - -CONFIG_ESPTOOLPY_FLASHSIZE_4MB= -CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y -CONFIG_ESPTOOLPY_FLASHSIZE_16MB= -CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MiB.csv" diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json deleted file mode 100644 index 4cf15e888..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/board.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "deploy": [ - "../deploy_s3.md" - ], - "docs": "", - "features": [ - "BLE", - "External Flash", - "WiFi" - ], - "images": [ - "generic_s3.jpg" - ], - "mcu": "esp32s3", - "product": "Generic ESP32-S3 (SPIRAM Octal)", - "thumbnail": "", - "url": "https://www.espressif.com/en/products/modules", - "vendor": "Espressif" -} diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake deleted file mode 100644 index 7a767c49d..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(IDF_TARGET esp32s3) - -set(SDKCONFIG_DEFAULTS - boards/sdkconfig.base - boards/sdkconfig.usb - boards/sdkconfig.ble - boards/sdkconfig.240mhz - boards/sdkconfig.spiram_sx - boards/sdkconfig.spiram_oct - boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board -) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h deleted file mode 100644 index 88f6835c9..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/mpconfigboard.h +++ /dev/null @@ -1,10 +0,0 @@ -#define MICROPY_HW_BOARD_NAME "ESP32S3 module (spiram octal)" -#define MICROPY_HW_MCU_NAME "ESP32S3" - -#define MICROPY_PY_MACHINE_DAC (0) - -// Enable UART REPL for modules that have an external USB-UART and don't use native USB. -#define MICROPY_HW_ENABLE_UART_REPL (1) - -#define MICROPY_HW_I2C0_SCL (9) -#define MICROPY_HW_I2C0_SDA (8) diff --git a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board b/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board deleted file mode 100644 index a36b97116..000000000 --- a/ports/esp32/boards/GENERIC_S3_SPIRAM_OCT/sdkconfig.board +++ /dev/null @@ -1,9 +0,0 @@ -CONFIG_ESPTOOLPY_FLASHMODE_QIO=y -CONFIG_ESPTOOLPY_FLASHFREQ_80M=y -CONFIG_ESPTOOLPY_AFTER_NORESET=y - -CONFIG_ESPTOOLPY_FLASHSIZE_4MB= -CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y -CONFIG_ESPTOOLPY_FLASHSIZE_16MB= -CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MiB.csv" |
