Skip to content

Instantly share code, notes, and snippets.

@pharzan
Last active November 30, 2017 07:52
Show Gist options
  • Save pharzan/db6786c1d7a412b4c54ce366cfee7ba2 to your computer and use it in GitHub Desktop.
Save pharzan/db6786c1d7a412b4c54ce366cfee7ba2 to your computer and use it in GitHub Desktop.
Format ESP8266 01 File system
#to format:
from flashbdev import bdev
uos.VfsFat.mkfs(bdev)
vfs = uos.VfsFat(bdev, "")
# to create a boot.py file:
with open("/boot.py", "w") as f:
f.write("""\
# This file is executed on every boot (including wake-boot from deepsleep)
import esp
esp.osdebug(None)
import gc
import webrepl
webrepl.start()
gc.collect()
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment