sforkowany z mirror/meshtastic-firmware
auto generate partition tables
rodzic
d2521656db
commit
2671599b90
|
@ -0,0 +1,41 @@
|
||||||
|
|
||||||
|
|
||||||
|
# This is a layout for 4MB of flash
|
||||||
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
|
# nvs, data, nvs, 0x9000, 0x6000,
|
||||||
|
# otadata, data, ota, , 0x2000,
|
||||||
|
# app0, app, ota_0, , 0x1c0000,
|
||||||
|
# app1, app, ota_1, , 0x1c0000,
|
||||||
|
# spiffs, data, spiffs, , 0x06f000,
|
||||||
|
|
||||||
|
start = 0x9000
|
||||||
|
nvssys = 0x3000
|
||||||
|
nvsuser = 0x3000
|
||||||
|
nvs = nvssys + nvsuser
|
||||||
|
ota = 0x2000
|
||||||
|
# app = 0x1c0000
|
||||||
|
spi = 128 * 1024
|
||||||
|
|
||||||
|
# treat sys part sizes + spiffs size as reserved, then calculate what appsize can be
|
||||||
|
reserved = start + nvs + ota + spi
|
||||||
|
maxsize = 0x400000 # 4MB
|
||||||
|
|
||||||
|
app = (maxsize - reserved) / 2
|
||||||
|
|
||||||
|
# total = start + nvs + ota + 2 * app + spi
|
||||||
|
|
||||||
|
nvskb = nvsuser / 1024
|
||||||
|
spikb = spi / 1024
|
||||||
|
appkb = app / 1024
|
||||||
|
|
||||||
|
table = """
|
||||||
|
# This is autogenerated by genpartions.py - change that tool instead!
|
||||||
|
# appsize={appkb} KB, spiffs={spikb} KB, usernvs={nvskb} KB
|
||||||
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
|
nvs, data, nvs, 0x{start:x}, 0x{nvs:x},
|
||||||
|
otadata, data, ota, , 0x{ota:x},
|
||||||
|
app0, app, ota_0, , 0x{app:x},
|
||||||
|
app1, app, ota_1, , 0x{app:x},
|
||||||
|
spiffs, data, spiffs, , 0x{spi:x} """.format(**locals())
|
||||||
|
|
||||||
|
print table
|
|
@ -1,7 +1,8 @@
|
||||||
# This is a layout for 4MB of flash
|
# This is autogenerated by genpartions.py - change that tool instead!
|
||||||
|
# appsize=1950 KB, spiffs=128 KB, usernvs=12 KB
|
||||||
# Name, Type, SubType, Offset, Size, Flags
|
# Name, Type, SubType, Offset, Size, Flags
|
||||||
nvs, data, nvs, 0x9000, 0x5000,
|
nvs, data, nvs, 0x9000, 0x6000,
|
||||||
otadata, data, ota, 0xe000, 0x2000,
|
otadata, data, ota, , 0x2000,
|
||||||
app0, app, ota_0, 0x10000, 0x1c0000,
|
app0, app, ota_0, , 0x1e7800,
|
||||||
app1, app, ota_1, 0x1d0000,0x1c0000,
|
app1, app, ota_1, , 0x1e7800,
|
||||||
spiffs, data, spiffs, 0x390000,0x070000,
|
spiffs, data, spiffs, , 0x20000
|
||||||
|
|
|
Ładowanie…
Reference in New Issue