#468·littlefs

Superblock 0x0 has become unwritable

Author: NeevoTechCreated Sep 11, 2020Updated May 24, 2026
Labelsneeds investigation

Hello @geky sir,

I am using LittleFS for NOR flash which is W25Q64. I had ported littlefs library successfully for my controller with all 4 base functions like localread,localProg,localErase and localSync. while first time mount i got error given below

custom/lfs.c:1170:error: Corrupted dir pair at {0x0, 0x1} custom/lfs.c:4418:trace: lfs_unmount(f03d4558) custom/lfs.c:4420:trace: lfs_unmount -> 0 custom/lfs.c:4411:trace: lfs_mount -> -84

In your comments from the previous few threads i got to know that it is ok to get this error for very first time mount and then you should have to call format function after first mount.

Now I am calling littlefs format function after first mount then i am getting error like

custom/lfs.c:1970:debug: Bad block at 0x0 custom/lfs.c:1977:warn: Superblock 0x0 has become unwritable custom/lfs.c:4248:trace: lfs_format -> -28

From last line i got to know that it is No space left on device error.

So i just want to know where am I doing wrong? or where is the issue in my code? can you please provide me some pointers for this so that i can get out of this problem. is there any sample codes available to port littlefs library to any microcontroller?

Sorry for my bad english.

Thank you in advance. techNiv1

Source: littlefs-project/littlefs