-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Backup config directly on the board #20081
Backup config directly on the board #20081
Conversation
Now from the correct branch! |
We get the question all the time, "Is there any way to extract settings from my firmware binary". With this change, the answer will be YES! It is too large for anybody to practically enable on a 128k board, but I expect that most 256k users and every 512k+ user will be able to enable it. Since this is currently using uncompressed text, it would be pretty trivial to locate and extract from a raw binary image as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we move forward with this you should probably add it to at least one of the test files.
@@ -3236,6 +3236,8 @@ | |||
|
|||
//#define REPETIER_GCODE_M360 // Add commands originally from Repetier FW | |||
|
|||
//#define SAVE_CONFIG_INSIDE_FIRMWARE // This will save all user configuration options and enable M360 to dump it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here comes the controversy...
I think there is little value to this if it is not enabled by default.
The entire point is to make setting retrievable for users who do not track their changes in git, or back them up in any other way. Ideally vendors would leave it enabled as well.
If we decide to include this, I think it should be opt-out rather than opt-in. Perhaps something could be done to default-disable it on boards with very small flash memories.
We might be able to gauge the impact of this by enabling it on every example in the Config repo and testing how many now run out of space.
@rhapsodyv I found you a related feature request! |
f964943
to
f17394d
Compare
What about making a ZIP file of the configuration, boot screen, status screen, and version files and storing that instead? These files should compress extremely well. (Under 80kb in my testing.) |
@thinkyhead did you mean to close this without any discussion at all? |
All marlin configs fit in less than 50kb uncompressed, less than 10kb compressed.... Just the marlin boot screen that is embed in the flash in the Color UI have 76kb..... |
Description
This is one idea that @sjasonsmith came to me somedays ago.
It generate a cpp file containing an array with all user configs. Then it add M360 do dump that configs.
It uses from 5k to 10k of flash size to hold all user options.
It might be useful for vendors, users with multiple printers or even users with low technical knowledge, to be easy to reconfigure a new printer based in the old configs.
The actual code works fine. But it needs discussion. M360 is the right place for that? Maybe should be
M360 C
? Do we need some formatting on the dump? Do we need to embed the config in a place to offline extraction too?SAVE_CONFIG_INSIDE_FIRMWARE
is a good name?!I just pushed it today because the topic came again in the discord.
One of the main advantages is that our python script will be able to parse and load configs... and it can open other possibilities...
Sample of the generated file:
Benefits
User will not lost their configs.
Configurations
SAVE_CONFIG_INSIDE_FIRMWARE
Related Issues