summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp32s2/Makefile2
-rw-r--r--ports/esp32s2/partitions-16MB.csv10
-rw-r--r--ports/esp32s2/partitions-4MB.csv (renamed from ports/esp32s2/partitions.csv)0
-rw-r--r--ports/esp32s2/partitions-8MB.csv10
-rw-r--r--ports/esp32s2/sdkconfig-16MB.defaults10
-rw-r--r--ports/esp32s2/sdkconfig-4MB.defaults10
-rw-r--r--ports/esp32s2/sdkconfig-8MB.defaults10
-rw-r--r--ports/esp32s2/sdkconfig.defaults8
8 files changed, 51 insertions, 9 deletions
diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile
index 64068b02d..229a3bf3a 100644
--- a/ports/esp32s2/Makefile
+++ b/ports/esp32s2/Makefile
@@ -230,7 +230,7 @@ $(BUILD)/esp-idf:
# create the config headers
$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf
- 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
+ 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
# build a lib
# Adding -d explain -j 1 -v to the ninja line will output debug info
diff --git a/ports/esp32s2/partitions-16MB.csv b/ports/esp32s2/partitions-16MB.csv
new file mode 100644
index 000000000..13ea81bea
--- /dev/null
+++ b/ports/esp32s2/partitions-16MB.csv
@@ -0,0 +1,10 @@
+# ESP-IDF Partition Table
+# Name, Type, SubType, Offset, Size, Flags
+# bootloader.bin,, 0x1000, 32K
+# partition table,, 0x8000, 4K
+nvs, data, nvs, 0x9000, 20K,
+otadata, data, ota, 0xe000, 8K,
+ota_0, 0, ota_0, 0x10000, 2048K,
+ota_1, 0, ota_1, 0x210000, 2048K,
+uf2, app, factory,0x410000, 256K,
+user_fs, data, fat, 0x450000, 11968K,
diff --git a/ports/esp32s2/partitions.csv b/ports/esp32s2/partitions-4MB.csv
index cf9b3cca8..cf9b3cca8 100644
--- a/ports/esp32s2/partitions.csv
+++ b/ports/esp32s2/partitions-4MB.csv
diff --git a/ports/esp32s2/partitions-8MB.csv b/ports/esp32s2/partitions-8MB.csv
new file mode 100644
index 000000000..f4ba9b60a
--- /dev/null
+++ b/ports/esp32s2/partitions-8MB.csv
@@ -0,0 +1,10 @@
+# ESP-IDF Partition Table
+# Name, Type, SubType, Offset, Size, Flags
+# bootloader.bin,, 0x1000, 32K
+# partition table,, 0x8000, 4K
+nvs, data, nvs, 0x9000, 20K,
+otadata, data, ota, 0xe000, 8K,
+ota_0, 0, ota_0, 0x10000, 2048K,
+ota_1, 0, ota_1, 0x210000, 2048K,
+uf2, app, factory,0x410000, 256K,
+user_fs, data, fat, 0x450000, 3776K,
diff --git a/ports/esp32s2/sdkconfig-16MB.defaults b/ports/esp32s2/sdkconfig-16MB.defaults
new file mode 100644
index 000000000..af477999b
--- /dev/null
+++ b/ports/esp32s2/sdkconfig-16MB.defaults
@@ -0,0 +1,10 @@
+
+# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
+CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
+CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
+
+CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-16MB.csv"
+CONFIG_PARTITION_TABLE_FILENAME="partitions-16MB.csv"
diff --git a/ports/esp32s2/sdkconfig-4MB.defaults b/ports/esp32s2/sdkconfig-4MB.defaults
new file mode 100644
index 000000000..561f971c3
--- /dev/null
+++ b/ports/esp32s2/sdkconfig-4MB.defaults
@@ -0,0 +1,10 @@
+
+# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
+CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
+# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
+CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
+
+CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-4MB.csv"
+CONFIG_PARTITION_TABLE_FILENAME="partitions-4MB.csv"
diff --git a/ports/esp32s2/sdkconfig-8MB.defaults b/ports/esp32s2/sdkconfig-8MB.defaults
new file mode 100644
index 000000000..fcff17f46
--- /dev/null
+++ b/ports/esp32s2/sdkconfig-8MB.defaults
@@ -0,0 +1,10 @@
+
+# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
+# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
+CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
+# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
+CONFIG_ESPTOOLPY_FLASHSIZE="8MB"
+
+CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MB.csv"
+CONFIG_PARTITION_TABLE_FILENAME="partitions-8MB.csv"
diff --git a/ports/esp32s2/sdkconfig.defaults b/ports/esp32s2/sdkconfig.defaults
index c0a56c143..4094367e0 100644
--- a/ports/esp32s2/sdkconfig.defaults
+++ b/ports/esp32s2/sdkconfig.defaults
@@ -88,12 +88,6 @@ CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
-# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
-# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
-CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
-# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
-# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
-CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
@@ -119,8 +113,6 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
-CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
-CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table