esp8266/scripts/flashbdev: Use all available Flash for filesystem.
All Flash sans firmware at the beginning and 16K SDK param block at the end is used for filesystem (and that's calculated depending on the Flash size).
This commit is contained in:
parent
650df97c06
commit
237c519ac4
@ -60,7 +60,9 @@ if 22 >= size >= 18:
|
||||
machine.reset()
|
||||
while 1: time.sleep(1)
|
||||
|
||||
if esp.flash_size() < 1024*1024:
|
||||
size = esp.flash_size()
|
||||
if size < 1024*1024:
|
||||
bdev = None
|
||||
else:
|
||||
bdev = FlashBdev()
|
||||
# 16K at the flash end is reserved for SDK params storage
|
||||
bdev = FlashBdev((size - 16384) // FlashBdev.SEC_SIZE - FlashBdev.START_SEC)
|
||||
|
Loading…
x
Reference in New Issue
Block a user