esp8266/modules/flashbdev: Add RESERVED_SECS before the filesystem.

Starting at esp.flash_user_start(), the reserved sectors are for general
purpose use, for example for native code generation.  There is currently
one sector reserved as such.
This commit is contained in:
Damien George 2017-01-04 23:47:09 +11:00
parent b0f23786da
commit bae7798f1e
1 changed files with 3 additions and 2 deletions

View File

@ -3,8 +3,9 @@ import esp
class FlashBdev: class FlashBdev:
SEC_SIZE = 4096 SEC_SIZE = 4096
START_SEC = esp.flash_user_start() // SEC_SIZE RESERVED_SECS = 1
NUM_BLK = 0x6b START_SEC = esp.flash_user_start() // SEC_SIZE + RESERVED_SECS
NUM_BLK = 0x6b - RESERVED_SECS
def __init__(self, blocks=NUM_BLK): def __init__(self, blocks=NUM_BLK):
self.blocks = blocks self.blocks = blocks