OSError: 8 when modifying file in GPy 1.20.2r5 LittleFS

  • Hello,

    I have a problem with one of my GPy cards with firmware 1.20.2.r5 in LittleFS.

    When I try to create or modify a file I get the error : OSError: 8.

    I can read the contents of the files without problems.

  • @quentinmsl Version 1.20.2.r6 also enable flash wear leveling. Before that change, LFS would always use Block 0 and 1 for the superblock. If you write really often to the file system, like millions of times, these blocks get damaged. But if you still can reformat the file system and start over without any files, than the flash should still be fine.
    But if the first two blocks are damaged, the only cure would be to create a firmware, which places the file system at a slightly higher address, leaving the damaged area beside. Or you replace the flash chip, which is some work.
    When you reformat the drive, does the file write problem start immediately? Or is it a special file name/situation which causes it to fail?

    Error 8 indeed stands for LFS_ERR_CORRUPT, telling that the file system is defective.

  • Hi @Meriç-SARIIŞIK ,

    Thank you for your reply.

    No, but I had seen that only a small patch on pybyte concerned version 1.20.2.r6 on https://github.com/pycom/pycom-micropython-sigfox/releases ?

    Yes, I tried to reformat but the problem reoccurs.

    I do a lot of file access on these devices so I suspect this is a problem.
    But before that I was in FatFS and I didn't have this problem, only random complete flash removal problems.

  • Hi @quentinmsl,

    We have another release after this firmware release. Have you given any try to 1.20.2r6?

    Also, can you try to erase the flash and do the same operation?

    Best regards,

  • Now almost all our cards are blocked and I still don't have a solution...

Log in to reply

Pycom on Twitter