mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 00:18:11 +01:00
Enlarge ESP32 app partitions (#1197)
This commit is contained in:
parent
0fc8e8d483
commit
5887fe8302
1 changed files with 12 additions and 8 deletions
|
@ -180,6 +180,16 @@ def gather_build_flags():
|
||||||
return list(sorted(list(build_flags)))
|
return list(sorted(list(build_flags)))
|
||||||
|
|
||||||
|
|
||||||
|
ESP32_LARGE_PARTITIONS_CSV = """\
|
||||||
|
nvs, data, nvs, 0x009000, 0x005000,
|
||||||
|
otadata, data, ota, 0x00e000, 0x002000,
|
||||||
|
app0, app, ota_0, 0x010000, 0x1C0000,
|
||||||
|
app1, app, ota_1, 0x1D0000, 0x1C0000,
|
||||||
|
eeprom, data, 0x99, 0x390000, 0x001000,
|
||||||
|
spiffs, data, spiffs, 0x391000, 0x00F000
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def get_ini_content():
|
def get_ini_content():
|
||||||
lib_deps = gather_lib_deps()
|
lib_deps = gather_lib_deps()
|
||||||
build_flags = gather_build_flags()
|
build_flags = gather_build_flags()
|
||||||
|
@ -196,15 +206,9 @@ def get_ini_content():
|
||||||
if CORE.is_esp32:
|
if CORE.is_esp32:
|
||||||
data['board_build.partitions'] = "partitions.csv"
|
data['board_build.partitions'] = "partitions.csv"
|
||||||
partitions_csv = CORE.relative_build_path('partitions.csv')
|
partitions_csv = CORE.relative_build_path('partitions.csv')
|
||||||
if not os.path.isfile(partitions_csv):
|
write_file_if_changed(partitions_csv, ESP32_LARGE_PARTITIONS_CSV)
|
||||||
with open(partitions_csv, "w") as f:
|
|
||||||
f.write("nvs, data, nvs, 0x009000, 0x005000,\n")
|
|
||||||
f.write("otadata, data, ota, 0x00e000, 0x002000,\n")
|
|
||||||
f.write("app0, app, ota_0, 0x010000, 0x190000,\n")
|
|
||||||
f.write("app1, app, ota_1, 0x200000, 0x190000,\n")
|
|
||||||
f.write("eeprom, data, 0x99, 0x390000, 0x001000,\n")
|
|
||||||
f.write("spiffs, data, spiffs, 0x391000, 0x00F000\n")
|
|
||||||
|
|
||||||
|
# pylint: disable=unsubscriptable-object
|
||||||
if CONF_BOARD_FLASH_MODE in CORE.config[CONF_ESPHOME]:
|
if CONF_BOARD_FLASH_MODE in CORE.config[CONF_ESPHOME]:
|
||||||
flash_mode = CORE.config[CONF_ESPHOME][CONF_BOARD_FLASH_MODE]
|
flash_mode = CORE.config[CONF_ESPHOME][CONF_BOARD_FLASH_MODE]
|
||||||
data['board_build.flash_mode'] = flash_mode
|
data['board_build.flash_mode'] = flash_mode
|
||||||
|
|
Loading…
Reference in a new issue