-
Notifications
You must be signed in to change notification settings - Fork 274
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
[esp-storage]: Add partitions support and allowed memory ranges #3259
Comments
Couldn't this be easily DIYed with a wrapper? |
This is totally fixable with a DIY wrapper, but providing it with the library itself makes it more user-friendly for newcomers and reduces the amount of work needed to get something working.
|
embedded-storage can provide a sub region struct then to solve this problem. I'd rather not artificially limit what FlashStorage is capable of for something that can be done externally. |
I agree with @Dominaezzz that we should not artificially limit the things it can do - providing But one thing I'm also concerned about is that while currently we only support esp-idf's bootloader and partition-table that might (and most probably will) change in future (we will keep what we currently support but want to add at least MCUboot - maybe others in future) We can ofc introduce features and/or configs but e.g. in #3124 (review) we are considering having specific crates for that |
That's a good point. Using partition related data might be too specific to the IDF bootloader. But it could be offered optionally. My view on this, isn't to limit |
I am considering having a Later we can have e.g. |
Motivations
Currently,
esp-storage
gives an API to access memory with a read write access, but when initialized withesp_storage::FlashStorage::new()
, it gives readable / writable access to the complete SoC flash. This enables many footgun like accidentally writing over multiple partitions.Solution
esp-storage
has access to. (I.E. keep start: u32. end: u32 in FlashStorage and throw an invalid range error when trying to access memory outside of the range)Alternatives
To be discussed...
Additional context
N/A
The text was updated successfully, but these errors were encountered: