Skip to content

Commit 7f60ebd

Browse files
authored
Merge pull request #3426 from tannewt/esp_flash_sizes
Add partition layouts for 8 and 16 MB as well.
2 parents 4b827b2 + 2bd169e commit 7f60ebd

File tree

8 files changed

+51
-9
lines changed

8 files changed

+51
-9
lines changed

ports/esp32s2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ $(BUILD)/esp-idf:
230230

231231
# create the config headers
232232
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf
233-
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;boards/$(BOARD)/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
233+
IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults;boards/$(BOARD)/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja
234234

235235
# build a lib
236236
# Adding -d explain -j 1 -v to the ninja line will output debug info

ports/esp32s2/partitions-16MB.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, 0, ota_0, 0x10000, 2048K,
8+
ota_1, 0, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
user_fs, data, fat, 0x450000, 11968K,
File renamed without changes.

ports/esp32s2/partitions-8MB.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table,, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, 0, ota_0, 0x10000, 2048K,
8+
ota_1, 0, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
user_fs, data, fat, 0x450000, 3776K,

ports/esp32s2/sdkconfig-16MB.defaults

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
3+
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
4+
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
5+
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
6+
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
7+
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
8+
9+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
10+
CONFIG_PARTITION_TABLE_FILENAME="partitions-16MB.csv"

ports/esp32s2/sdkconfig-4MB.defaults

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
3+
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
4+
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
5+
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
6+
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
7+
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
8+
9+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
10+
CONFIG_PARTITION_TABLE_FILENAME="partitions-4MB.csv"

ports/esp32s2/sdkconfig-8MB.defaults

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
3+
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
4+
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
5+
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
6+
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
7+
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
8+
9+
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MB.csv"
10+
CONFIG_PARTITION_TABLE_FILENAME="partitions-8MB.csv"

ports/esp32s2/sdkconfig.defaults

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
8888
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
8989
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
9090
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
91-
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
92-
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
93-
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
94-
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
95-
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
96-
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
9791
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
9892
CONFIG_ESPTOOLPY_BEFORE_RESET=y
9993
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
@@ -119,8 +113,6 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
119113
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
120114
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
121115
CONFIG_PARTITION_TABLE_CUSTOM=y
122-
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
123-
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
124116
CONFIG_PARTITION_TABLE_OFFSET=0x8000
125117
CONFIG_PARTITION_TABLE_MD5=y
126118
# end of Partition Table

0 commit comments

Comments
 (0)