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

Support LittleFS and Settings subsystem on LPC55s69 #45528

Open
danieldegrasse opened this issue May 10, 2022 · 1 comment
Open

Support LittleFS and Settings subsystem on LPC55s69 #45528

danieldegrasse opened this issue May 10, 2022 · 1 comment
Assignees
Labels
area: File System Enhancement Changes/Updates/Additions to existing features platform: NXP NXP

Comments

@danieldegrasse
Copy link
Collaborator

Is your enhancement proposal related to a problem? Please describe.
The LPC55s69 flash driver does not support using LittleFS with the default configuration or the Zephyr settings subsystem. This is due to the requirement enforced by the LPC flash driver that all writes be in multiples of 512 bytes.

Describe the solution you'd like
The LPC flash driver should support bytes of less than 512 bytes.

Describe alternatives you've considered
Subsystems could be updated to support 512 byte writes, but this will just result in reimplementations of "unaligned write" algorithms in most subsystems.

@danieldegrasse danieldegrasse added the Enhancement Changes/Updates/Additions to existing features label May 10, 2022
@danieldegrasse danieldegrasse self-assigned this May 10, 2022
@Laczen
Copy link
Collaborator

Laczen commented May 11, 2022

@danieldegrasse, I have looked at the issue and the proposed solution (#45526 ). The solution uses a read/modify/erase/write method that will increase the wear and might leave zephyr users breaking their system early. Next to this it also might result in a broken littlefs system or lost data (nvs) whenever a write is interrupted.

For nvs let's consider a flash area (page) that contains ate's, these will be 8 byte long and for the page to be completely written it will be erased 64 times. Every write of an ate will erase a page, and every write can result in loosing all other ate's in that area. Nvs does not play nice with these kind of flashes, and nvs shouldn't be used on them.

For littlefs the same holds, and it is not required/advantageous. Littlefs should be defined with a block size of 512 bytes and everything will be taken into account, the fs will try to limit flash writes. And as a bonus the fs will not be broken when a write is interrupted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: File System Enhancement Changes/Updates/Additions to existing features platform: NXP NXP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants