esp8266/scripts: Don't try to create filesystem on 512KB devices or less.

There's no space for it.
This commit is contained in:
Paul Sokolovsky 2016-04-18 17:14:00 +03:00
parent 89e56a80b8
commit 8dcce92606
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ import builtins
from flashbdev import bdev from flashbdev import bdev
try: try:
if bdev:
vfs = uos.VfsFat(bdev, "") vfs = uos.VfsFat(bdev, "")
except OSError: except OSError:
import inisetup import inisetup

View File

@ -26,4 +26,7 @@ class FlashBdev:
if op == 5: # BP_IOCTL_SEC_SIZE if op == 5: # BP_IOCTL_SEC_SIZE
return self.SEC_SIZE return self.SEC_SIZE
if esp.flash_size() < 1024*1024:
bdev = None
else:
bdev = FlashBdev() bdev = FlashBdev()