-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Feature] Reserve memory region for persistent system settings. #1622
Comments
One issue when starting this is that the region could contain any random data to begin with on Spike Hubs. On Technic/Boost/City it is erased on update. Do we want to clear it on first boot on SPIKE hubs? Should we erase user programs too? |
Maybe on those hubs, we could use a magic number or checksum to tell if the persistent data is valid or not. |
Could we consider having 3 BT modes?
Though kids are nice it is a disaster if during the competition anyone can connect to your hub when doing the programming / testing part. (You know the analogy - in the IoT abbreviation the letter "s" stands for security) |
Apologies, I was going to, but accidentally left the wrong ticket open on my phone. I will add it there, please feel free to remove my comment(s) from here. |
Oh, don't worry! Please keep the comments coming before your morning coffee, those are often the best 😄 |
I would like to avoid a repeat of #744, so maybe we should just take the space needed for persistent storage out of the user data area. On the other platforms this shouldn't matter, since all user data gets erased during a firmware update anyway. |
Perhaps we could emulate this on the SPIKE hubs by including a hash of the data plus the firmware version (or a data layout version that only changes when the layout changes, like this proposed change here - this would need to include |
Related / maybe addressable at the same time #1496:
|
This ensures we don't run broken programs when the memory layout changes. See pybricks/support#1622
The mechanics for this have been implemented. There is just one setting for now, but we can add more with every release since the settings are erased after an update. |
Is your feature request related to a problem? Please describe.
We have a persistent memory section for user data. We might need one for system settings as well.
We can either reduce the existing user data size, or reduce program size instead.
Taking it out of the user data has the benefit that there is no breaking change for user programs already on SPIKE hubs when they upgrade the firmware. I've also not seen many projects that use large amounts of persistent data anyway.
Persistent data we could consider reserving space for:
The text was updated successfully, but these errors were encountered: