esp8266/flashbdev: Reserve extra sysparam sector for SDK 2.0.0 compatibility.

This commit is contained in:
Paul Sokolovsky 2016-08-06 15:21:49 +03:00
parent 5b9e7e29f6
commit ca59f5f208

View File

@ -4,7 +4,7 @@ class FlashBdev:
SEC_SIZE = 4096 SEC_SIZE = 4096
START_SEC = 0x89000 // SEC_SIZE START_SEC = 0x89000 // SEC_SIZE
NUM_BLK = 0x73 NUM_BLK = 0x72
def __init__(self, blocks=NUM_BLK): def __init__(self, blocks=NUM_BLK):
self.blocks = blocks self.blocks = blocks
@ -64,5 +64,5 @@ size = esp.flash_size()
if size < 1024*1024: if size < 1024*1024:
bdev = None bdev = None
else: else:
# 16K at the flash end is reserved for SDK params storage # 20K at the flash end is reserved for SDK params storage
bdev = FlashBdev((size - 16384) // FlashBdev.SEC_SIZE - FlashBdev.START_SEC) bdev = FlashBdev((size - 20480) // FlashBdev.SEC_SIZE - FlashBdev.START_SEC)