tinyuf2 adopted the partition scheme called "1ota"

.. which irritated our partition table parser in build_memory_info, so
make it work again.
This commit is contained in:
Jeff Epler 2023-07-26 09:41:10 -05:00
parent c026704fd2
commit 46d7771152
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
5 changed files with 16 additions and 11 deletions

View File

@ -8,7 +8,7 @@ IDF_TARGET = esp32s3
CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-no-ota.defaults
FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-1ota.defaults
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_CANIO = 0

View File

@ -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, app, ota_0, 0x10000, 2816K,
uf2, app, factory,0x2d0000, 256K,
ffat, data, fat, 0x310000, 960K,
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, app, ota_0, 0x10000, 2816K,
8 uf2, app, factory,0x2d0000, 256K,
9 ffat, data, fat, 0x310000, 960K,

View File

@ -1,7 +0,0 @@
# Name, Type, SubType, Offset, Size
# bootloader, app, boot, 0x1000/0x0, 28/32K
# partition_table, data, table, 0x8000, 4K
nvs, data, nvs, 0x9000, 28K
ota_0, app, ota_0, 0x10000, 2112K
uf2, app, factory, 0x220000, 256K
user_fs, data, fat, 0x260000, 1664K
1 # Name Type SubType Offset Size
2 # bootloader app boot 0x1000/0x0 28/32K
3 # partition_table data table 0x8000 4K
4 nvs data nvs 0x9000 28K
5 ota_0 app ota_0 0x10000 2112K
6 uf2 app factory 0x220000 256K
7 user_fs data fat 0x260000 1664K

View File

@ -10,9 +10,9 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
# end of Serial flasher config
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-ota.csv"
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-1ota.csv"
#
# Partition Table
#
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-ota.csv"
CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-1ota.csv"
# end of Partition Table

View File

@ -73,7 +73,9 @@ with open(sys.argv[2], "r") as f:
ota = None
app = None
for partition in csv.reader(f):
if partition[0][0] == "#":
if not partition: # empty row
continue
if partition[0].startswith("#"):
continue
subtype = partition[2].strip()
if subtype == "factory":