Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting flash Memory and Read Data #841

Open
Aravind0812 opened this issue Jun 14, 2023 · 1 comment
Open

Overwriting flash Memory and Read Data #841

Aravind0812 opened this issue Jun 14, 2023 · 1 comment
Labels

Comments

@Aravind0812
Copy link

Currently, I am working on the W25q128 module. Once storage is filled, I want to overwrite the first block
without data corruption for that module. But, I have a problem rewinding the file pointer and erasing the first block but littlefs, Erase the last block. How to erase the block in sequence order after erasing and writing the first block, how to read the data in the correct order?

@geky geky added the question label Jun 14, 2023
@geky
Copy link
Member

geky commented Jun 14, 2023

Hi @Aravind0812, sorry if I misunderstand the question.

littlefs doesn't store files on disk in reliable locations. As files are rewritten littlefs moves them around to distribute wear.

Files are also broken up into multiple blocks which get stored in arbitrary locations, and once they are larger enough start containing extra metadata that would mess up most use cases that would rely on this.

Though there is a PR requesting to add a different file type that would accomplish this: #692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants