FAT filesystem appears to be corrupted
FAT filesystem appears to be corrupted
Hi I'm using a Sparkfun ESP8266 "The Thing"(https://www.sparkfun.com/products/13231) and a FTDI (https://www.sparkfun.com/products/9873) to flash it.
Actually I'm getting a "FAT filesystem appears to be corrupted" message on the serial console. I readed that sometimes happens when is reflashed so I tried to erase_flash an reflash it but I have the same result.
My doubt is if my board is broken or if the Sparkfun ESP8266 it's not compatible with micropython?
Actually I'm getting a "FAT filesystem appears to be corrupted" message on the serial console. I readed that sometimes happens when is reflashed so I tried to erase_flash an reflash it but I have the same result.
My doubt is if my board is broken or if the Sparkfun ESP8266 it's not compatible with micropython?
Re: FAT filesystem appears to be corrupted
According to the linked schematics, the device is equipped with 4 MBit = 512 kByte flash memory. That is too small to hold both the micropython firmware and a file system. The reference system for esp8266 micropython, the huzzah feather, has 32 MBi = 4 MByte flash, but 8MBit = 1 MByte should also be sufficient. See this link http://forum.micropython.org/viewtopic. ... 512k#p9414
Re: FAT filesystem appears to be corrupted
There should be some code to detect the flash size, which should not try to put a filesystem on the device if there isn't enough space.
I'm pretty sure I've seen this code, browsing the source. If it's creating this error, than that presumably means it's not working, and you should raise a bug.
I don't have an ESP8266 with less than 4M flash to test it on.
I'm pretty sure I've seen this code, browsing the source. If it's creating this error, than that presumably means it's not working, and you should raise a bug.
I don't have an ESP8266 with less than 4M flash to test it on.
Re: FAT filesystem appears to be corrupted
Thank you for the answer, now it clear why it don't work.
markxr if you want I can try it for you if you upload the code somewhere
markxr if you want I can try it for you if you upload the code somewhere
Re: FAT filesystem appears to be corrupted
I thought the filesystem was flash-friendly one. If it isn't I'm seriously concerned and not surprised if it wears the flash and breaks itself. Of course once it does this you're going to have trouble loading a slightly newer and larger micropython as it would overlap the damaged (file allocation table, probably) area.
Regarding flash size it doesn't help that some people, and I definitely don't mean Robert are really sloppy and generally unclear with units. Bits ? Bytes ?
Regarding flash size it doesn't help that some people, and I definitely don't mean Robert are really sloppy and generally unclear with units. Bits ? Bytes ?
Re: FAT filesystem appears to be corrupted
The fs on Micropython on the esp8266 is a FAT filesystem, it's not flash-friendly, in particular, it often overwrites the blocks which contain the directory entries and FATs, which is very bad for flash.
Having said that, provide you don't abuse it too much, it should be ok.
I have bricked (so far) only 1 esp8266 by wearing its flash.
But that was cause by the wifi connect() function, which (unknown to me at the time) rewrites a flash block; this is a function inside the firmware blob and not part of micropython.
Having said that, provide you don't abuse it too much, it should be ok.
I have bricked (so far) only 1 esp8266 by wearing its flash.
But that was cause by the wifi connect() function, which (unknown to me at the time) rewrites a flash block; this is a function inside the firmware blob and not part of micropython.
Re: FAT filesystem appears to be corrupted
Is anybody working on dropping in a replacement ?
SPIFFS for example ?
SPIFFS for example ?
Re: FAT filesystem appears to be corrupted
As far as I know no, you can start on it
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: FAT filesystem appears to be corrupted
Is this feasible? Do the binary blobs make use of the filesystem, or is it a specific MicroPython feature?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: FAT filesystem appears to be corrupted
This is specific to Micropython. Basically you can use any filesystem you want, you just have to implement it.