Corrupted filesystem

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
PinkInk
Posts: 61
Joined: Tue Mar 11, 2014 3:42 pm

Re: Corrupted filesystem

Post by PinkInk » Fri May 06, 2016 5:21 am

I'm having what appears to be a related problem with 12e modules, after writing boot.py, main.py and an updated neopixel.py I noticed an increasing number of "0x00 * x" files in the filesystem. This is what os.listdir() says, shortly before the module reboots with memory issues;

Code: Select all

>>> import os
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', etc. etc.
esptool erase_flash (or ESP8266Flasher with INTERNAL://BLANK), and a re-flash, don't clear this content from the filesystem (although they do clear the files I specifically created). Tried various combinations of flash-size etc.

Damien
Site Admin
Posts: 623
Joined: Mon Dec 09, 2013 5:02 pm

Re: Corrupted filesystem

Post by Damien » Fri May 06, 2016 10:03 am

Try resetting the filesystem using:

Code: Select all

import uos
import flashbdev
uos.VfsFat.mkfs(flashbdev.bdev)

PinkInk
Posts: 61
Joined: Tue Mar 11, 2014 3:42 pm

Re: Corrupted filesystem

Post by PinkInk » Fri May 06, 2016 3:54 pm

Damien; thanks - you're a star; yes, that's cleared the filesystem.

Something funny is going on; some combination of trying to open to write 'neopixel.py' and/or 'neoxpixel_.py' occasionally re-corrupts the filesystem, but I've not yet been able to find a test case that does so consistently.

User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: Corrupted filesystem

Post by deshipu » Fri May 06, 2016 7:22 pm

How are you powering the board? While the esp8266 chip itself is quite robust to power fluctuations, the flash memory chips usually are not.

PinkInk
Posts: 61
Joined: Tue Mar 11, 2014 3:42 pm

Re: Corrupted filesystem

Post by PinkInk » Sat May 07, 2016 1:24 am

Ahhh, that's probably it ... at the moment 2x(new)AA and 100uf across the rails - but I do run these until the module bulks at them, hence the flash may already be having less obvious issues.

I've been caught by surprise by how power sensitive the bare modules are, melted a breadboard psu in the process, but more refined options (aka adafruit huzzah) are not an option where I live.

I was planning to ask for a recommendation for a novice for for small ebay power solution for embedding into permanent esp8266 projects, as far as I can work out the options are;

- 3.7v lipo and matched usb charger
- higher voltage battery pack and;
--- buck step-down regulator
--- ld1117v33 (can fortunately get these here, so will start with this)
- boost step-up regulator

The last option seems attractive for embedded projects, due to (potentially) small size, but difficult to tell which modules are going to maximize battery utilization with the esp8266's 300ma peak requirement.

PinkInk
Posts: 61
Joined: Tue Mar 11, 2014 3:42 pm

Re: Corrupted filesystem

Post by PinkInk » Sat May 07, 2016 2:58 pm

Stability generally much improved with a jury-rigged 3xAA battery pack ... thanks.

Post Reply