Skip to content

Commit

Permalink
esp32/boards/ESP32_GENERIC_S3: Add 4MiB partitioning board variant.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stanislav Ponomarev authored and dpgeorge committed Mar 8, 2024
1 parent 20f85fb commit bedb649
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ports/esp32/boards/ESP32_GENERIC_S3/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"url": "https://www.espressif.com/en/products/modules",
"vendor": "Espressif",
"variants": {
"SPIRAM_OCT": "Support for Octal-SPIRAM"
"SPIRAM_OCT": "Support for Octal-SPIRAM",
"FLASH_4M": "4MiB flash"
}
}
4 changes: 3 additions & 1 deletion ports/esp32/boards/ESP32_GENERIC_S3/board.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
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
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.

If your board has 4MiB flash (including ESP32-S3FH4R2 based ones with embedded flash), then use the "flash-4m" build.
7 changes: 7 additions & 0 deletions ports/esp32/boards/ESP32_GENERIC_S3/mpconfigboard.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ if(MICROPY_BOARD_VARIANT STREQUAL "SPIRAM_OCT")
MICROPY_HW_BOARD_NAME="Generic ESP32S3 module with Octal-SPIRAM"
)
endif()

if(MICROPY_BOARD_VARIANT STREQUAL "FLASH_4M")
set(SDKCONFIG_DEFAULTS
${SDKCONFIG_DEFAULTS}
boards/ESP32_GENERIC_S3/sdkconfig.flash_4m
)
endif()
4 changes: 4 additions & 0 deletions ports/esp32/boards/ESP32_GENERIC_S3/sdkconfig.flash_4m
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=

CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MiB.csv"

0 comments on commit bedb649

Please sign in to comment.