summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-04 23:47:09 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-04 23:47:09 +1100
commitbae7798f1ef531c862421b37c0d5d462e34a6d2f (patch)
tree9290c6e5157f696f196d2719cd8b8cc30583ff94 /esp8266
parentb0f23786da8c9ad9eff44d961cb159604e7d5272 (diff)
downloadmicropython-bae7798f1ef531c862421b37c0d5d462e34a6d2f.tar.gz
micropython-bae7798f1ef531c862421b37c0d5d462e34a6d2f.zip
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.
Diffstat (limited to 'esp8266')
-rw-r--r--esp8266/modules/flashbdev.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/esp8266/modules/flashbdev.py b/esp8266/modules/flashbdev.py
index e879895fb0..64f0363f96 100644
--- a/esp8266/modules/flashbdev.py
+++ b/esp8266/modules/flashbdev.py
@@ -3,8 +3,9 @@ import esp
class FlashBdev:
SEC_SIZE = 4096
- START_SEC = esp.flash_user_start() // SEC_SIZE
- NUM_BLK = 0x6b
+ RESERVED_SECS = 1
+ START_SEC = esp.flash_user_start() // SEC_SIZE + RESERVED_SECS
+ NUM_BLK = 0x6b - RESERVED_SECS
def __init__(self, blocks=NUM_BLK):
self.blocks = blocks