Skip to content

Make EraseChip optional #3

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

Merged
merged 1 commit into from
Feb 23, 2023

Conversation

nilfit
Copy link
Contributor

@nilfit nilfit commented Feb 23, 2023

According to this document, only Init, UnInit, EraseSector, and ProgramPage are mandatory.

The file FlashPrg.c contains the mandatory Flash programming functions Init, UnInit, EraseSector, and ProgramPage. Optionally, depending on the device features (or to speed-up execution), the functions EraseChip, BlankCheck, and Verify can be implemented.

Leaving the optional functions opt-in allows support for Verify and BlankCheck to be added later without breaking compatibility.

@Yatekii
Copy link
Member

Yatekii commented Feb 23, 2023

Thank you very much! I was simply too lazy to implement it, but also, I think we should encourage the addition of a total chip erase because in most cases it's what you want and it's much faster :)
Can we please make it the default?

According to [1], only Init, UnInit, EraseSector, and ProgramPage
are mandatory.

[1]: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/flashAlgorithm.html#FlashPrg
@nilfit nilfit force-pushed the optional-functions-as-features branch from 9e3978d to 0bbc407 Compare February 23, 2023 15:19
@nilfit
Copy link
Contributor Author

nilfit commented Feb 23, 2023

That makes sense. Updated.

@Yatekii Yatekii merged commit 0b24c51 into probe-rs:master Feb 23, 2023
@nilfit nilfit deleted the optional-functions-as-features branch February 24, 2023 07:48
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.

2 participants