Skip to content
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

Saving and Executing Different Version of Software on the Internal File System #133

Open
5 tasks
Tracked by #88
Mikefly123 opened this issue Jan 31, 2025 · 0 comments
Open
5 tasks
Tracked by #88
Labels
enhancement New feature or request

Comments

@Mikefly123
Copy link
Member

Mikefly123 commented Jan 31, 2025

Story

  • As a Mission Operator.
  • I want to store multiple versions of the software on the satellite and choose which one I want to run.
  • So that I can safely do major over the air updates to the code.

Acceptance Criteria

  • Method discovered and documented for loading a full copy of the circuitpy_flight_software into the SD card.
  • Initial protocol established for how to denote different versions of the software that are in storage.
  • Detect the available and current version of the software from runtime.
  • Update made to code.py or boot.py that detects the available versions and selects the latest to run.
  • [Stretch] Add a new command to cdh.py that selects which version of the code to run on next boot.

Technical Details

Let's say the satellite has been delivered and then we discover a major bug. Oh no! We now need to push a major update to fix that bug. If the bug is significant enough that we need to overwrite multiple files (or even just one file but more extensively than a line or two) then it is way too risky to just shotgun in a change to the code while it is actively in runtime.

Most over the air update systems will have some kind of infrastructure for loading the new code onto the system in parallel to the current code, doing a switchover on reset, and then only discarding the old code once the new code is verified as fully working (if the old code is ever discarded at all). This ensures that at all times there is at least one working copy of the code (bugs and all) that will be around and can be used just in case this new code causes more problems than it solves.

Here's a flowchart to help explain this a bit better:
Image

Required Hardware

  • Any Version of the Flight Controller Board with an SD Card
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant