-
Notifications
You must be signed in to change notification settings - Fork 17.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
Protecting parameters from eeprom from copying after reinstalling the firmware #26336
Comments
I think if your special firmware was modified so that it used a different FORMAT_VERSION then when the standard firmware is uploaded the parameters will be reset Let's close this issue if you're happy with this solution 'cuz really this is a question so it shouldn't be here on our to-do list. |
Sorry for spamming in this section. Yes, it should be, but when I change this param in my plane’s firmware, build it and then upload - FORMAT_VERSION is the same as it was before and eeprom did not resets |
So I guess you changed this line in Copter? .. or this line in Plane? |
Yep, this line for plane and built a plane firmware |
Thanks @NotShittyProgrammer, I may have reproduced the problem in SITL by doing the following:
If the above procedure is followed for the Copter-4.5 branch the parameter is reset correctly. If it is done for "master" (aka "latest") the parameter is not reset. It remains at 8. |
I did not understand you well. My goal is to erase eeprom parameters when I install new firmware after mine, so no one could see my previous eeprom params list. So I changed format_version to 14 for plane so it would remove old eeprom values. But when I install my new firmware eeprom params did not erased and format_version is still 13. |
Are you using a very recent version of master (aka "latest")? I think the issue may be due to a recent change.. |
Yes, I am using the latest version. Should I switch to another branch or previos commits? |
I'm not sure, I was able to reproduce the issue once but now I'm unable to. I've added the issue to the Copter-4.5 issues list although I suspect it only affects master. I've also alerted @peterbarker who I think is most familiar with this area. You might want to try following the procedure I've mentioned above for reproducing the issue in SITL. Basically we need to be able to reproduce the issue in order to narrow down how to fix it. |
Thanks, I will be waiting for further details🫡 |
I've tested further and I think changing k_format_version does actually work. The issues that I was facing were, I think, caused by unrelated mission planner problems to do with support for the dual CPU CubeRed. Which autopilot are you using? I'm happy to create two binaries with only the format_version changed and I think you'll find that loading one of them clears out the autopilot's parameters. |
I am using current ArduPilot repository and I build firmware for CUAV-X7. But I really need to build it on different controllers. I will try to find older version where this trick with k_format_version work |
OK, although I find that even with master it works. |
I've created two binaries here built on master. One has the format-version of 13, the other 14. Could you try these two? |
I'm going to go ahead and close this issue now. Please tell me if the above binaries don't work for you. |
Good afternoon, I am facing a problem - I wrote a custom firmware that does not display values from the eeprom in the mission planner. But when I install the official firmware, the params list appears. I can block it in theory, here's a link on how to do it:
https://ardupilot.org/dev/docs/secure-firmware.html
However, if I install the official firmware through the stm32cubeprogrammer, I will still see the values from the eeprom. Is there any way I can block this or reset the values to default every time someone tries to install a new firmware version?
The text was updated successfully, but these errors were encountered: