Replies: 5 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
A
Because of |
Beta Was this translation helpful? Give feedback.
-
I've been playing around with this for a while now, initially just adding a partition, and it seems to me that the change is only in RAM but not persisted to storage.
|
Beta Was this translation helpful? Give feedback.
-
Here's my suggested approach to your particular situation. Code compiles but is otherwise untested. You'll need to add
|
Beta Was this translation helpful? Give feedback.
-
I've added a |
Beta Was this translation helpful? Give feedback.
-
I have another question around partitions and OTA, hopefully not as confusing as the last one.
Currently, my partition map is like this:
since I have now managed to get my web frontend small enough to fit into the rom partition, I want to change my data partitions. Currently, every OTA brings a new rom and spiffs partition, in future, the data partitions won't need to be part of the OTA process anymore.
What I'm planning is this:
I want to chage both data partitions into LittleFS as, as far as I could find out, it does better wear levelling than spiffs. (one issue we have had is that the controller writes one specific value sometimes a hundred times a day and wears out the flash within a year or two).
I will use the data partitions to store configration, but also things like presets, scenes, other controllers etc. All this data should persist through OTA, which it will easily do if I don't flash over it.
The critical part is the transition.
And there my question is:
can I change the type of a partition at run time?
I know that when talking about the OTA from Sming4.2 based controllers, there is code to write a partition table initially, but can I also change the existing partitions?
My process would be like this:
from then on, since I don't have use for more than 1MByte of storage, I'm thinking I'll keep the 2nd partition as a "last known good" backup and if I ever encounter a situation where I can't mount the first LittleFS, I use that and signal some degraded state to the user.
would the following code actually overwrite the existing partition table entry or would it create a conflicting one?
and would that partition be immediately available to create a file system in?
I'm currently trying to build a minimal prototype on the base of Basic_Storage, but
I'm getting
Beta Was this translation helpful? Give feedback.
All reactions