esp32/boards/ESP32_GENERIC_S3: Add 4MiB partitioning board variant.

Added a 4MiB flash partitioning variant for ESP32S3: adds support for 4MiB
discrete flash boards or ESP32-S3FH4R2 with embedded 4MiB flash based ones.

Tested on the waveshare ESP32-S3 Mini w/ESP32-S3FH4R2.

Signed-off-by: Stanislav Ponomarev <me@stasponomarev.com>
This commit is contained in:
Stanislav Ponomarev
2024-02-27 00:26:17 +04:00
committed by Damien George
parent 20f85fb26e
commit bedb649edf
4 changed files with 16 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
"url": "https://www.espressif.com/en/products/modules", "url": "https://www.espressif.com/en/products/modules",
"vendor": "Espressif", "vendor": "Espressif",
"variants": { "variants": {
"SPIRAM_OCT": "Support for Octal-SPIRAM" "SPIRAM_OCT": "Support for Octal-SPIRAM",
"FLASH_4M": "4MiB flash"
} }
} }

View File

@@ -1,7 +1,9 @@
The following files are firmware that should work on most ESP32-S3-based The following files are firmware that should work on most ESP32-S3-based
boards with 8MiB of flash, including WROOM and MINI modules. boards with 4/8MiB of flash, including WROOM and MINI modules.
This firmware supports configurations with and without SPIRAM (also known as This firmware supports configurations with and without SPIRAM (also known as
PSRAM) and will auto-detect a connected SPIRAM chip at startup and allocate 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 the MicroPython heap accordingly. However if your board has Octal SPIRAM, then
use the "spiram-oct" variant. use the "spiram-oct" variant.
If your board has 4MiB flash (including ESP32-S3FH4R2 based ones with embedded flash), then use the "flash-4m" build.

View File

@@ -20,3 +20,10 @@ if(MICROPY_BOARD_VARIANT STREQUAL "SPIRAM_OCT")
MICROPY_HW_BOARD_NAME="Generic ESP32S3 module with Octal-SPIRAM" MICROPY_HW_BOARD_NAME="Generic ESP32S3 module with Octal-SPIRAM"
) )
endif() endif()
if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_4M")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/ESP32_GENERIC_S3/sdkconfig.flash_4m
)
endif()

View File

@@ -0,0 +1,4 @@
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MiB.csv"