unable to revert to main filesystem

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
philwilkinson40
Posts: 37
Joined: Tue Nov 14, 2017 3:11 am
Location: Perth, Australia

unable to revert to main filesystem

Post by philwilkinson40 » Sun Jul 08, 2018 2:09 am

I am running a uSD card shield on a esp8266 devboard

I am able to mount the SD card using

Code: Select all

import machine, sdcard, os

sd = sdcard.SDCard(machine.SPI(1), machine.Pin(15))

os.umount('/')
vfs=os.VfsFat(sd)
os.mount(vfs, '/sd')
os.listdir()
I can then open and append files in the /sd directory. However I can't revert back to the main filesystem using

Code: Select all

import flashbdev
os.umount()
os.VfsFat(flashbdev.bdev)
which returns MemoryError: memory allocation failed.
I am not sure I am using VfsFat correctly.
Any ideas?

Post Reply