Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit bae7798

Browse files
committed
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.
1 parent b0f2378 commit bae7798

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

esp8266/modules/flashbdev.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
class FlashBdev:
44

55
SEC_SIZE = 4096
6-
START_SEC = esp.flash_user_start() // SEC_SIZE
7-
NUM_BLK = 0x6b
6+
RESERVED_SECS = 1
7+
START_SEC = esp.flash_user_start() // SEC_SIZE + RESERVED_SECS
8+
NUM_BLK = 0x6b - RESERVED_SECS
89

910
def __init__(self, blocks=NUM_BLK):
1011
self.blocks = blocks

0 commit comments

Comments
 (0)