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

Deprecating stream_flash_erase_page #82326

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

de-nordic
Copy link
Collaborator

A few commits that

  • move stream flash logic to stop using stream_flash_erase_page
  • fixing tests
  • marking the stream_flash_erase_page as deprecated

Switches flash_sync to use stream_flash_erase_to_append
instead of stream_flash_erase_page in preparation of deprecating
the later and reming control on erase from API user.

Signed-off-by: Dominik Ermel <[email protected]>
Keep on testing the function but fix logic where applicable
and remove last_erased_page_start_offset which has been replaced
with erased_up_to in stream_flash_ctx.

Signed-off-by: Dominik Ermel <[email protected]>
The commit marks stream_flash_erase_page as deprecated.
After the function is removed users will have to rely on stream
flash to erase space it needs prior to write.

The stream_flash_erase_page has several issues like using non-relative
offset for erases, allowing to destroy data already written or even
erase out of area available for stream flash.

This fixes zephyrproject-rtos#67407

Signed-off-by: Dominik Ermel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant