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

Save Python scripts to flash storage #329

Open
andrigamerita opened this issue Jun 26, 2023 · 2 comments
Open

Save Python scripts to flash storage #329

andrigamerita opened this issue Jun 26, 2023 · 2 comments

Comments

@andrigamerita
Copy link

Is your feature request related to a problem? Please describe.

When the calculator crashes, or I simply just need to go through the bootloader to switch between Upsilon and Epsilon, all Python scripts are lost, since they're only saved to SRAM. I can only rarely backup them to the NumWorks website to avoid losing them, and I can even more rarely restore them after a reset (because I don't have a PC at hand 100% of the time).

Describe the solution you'd like

There should be some way to save the Python scripts to the available flash storage.

The ideal solution, I think, would be having Python directly work on the flash storage, and this would mean 2 main benefits:

  • Scripts are never lost on reset.
  • We would have a lot more space for scripts (2560 KB instead of 60 KB).

However, I can imagine that this would be hard to implement, since the entire Python IDE is built to work on the SRAM, and so would require big changes.

A good alternative, that doesn't grant any storage advantage, but still allows for scripts to never be lost on reset, would be to integrate some sort of automatic backup system into the Python IDE:

  • The Python IDE would still work entirely from SRAM like normal.
  • Anytime the user exits from the text editor screen for a script, that script is automatically written as a file on the flash storage (maybe in a dedicated directory).
  • When a script is deleted from the scripts list in the IDE, that script is also deleted from the flash storage.
  • After a calculator reset, in the initial configuration procedure, the flash storage is checked for any backed-up Python scripts, which are automatically restored to SRAM and so the scripts list in the IDE is repopulated.
@AngeDieu
Copy link

This could lead to a very great number of erasing-writing in the flash memory, that could wear it out prematurately. (see the warning of the KhiCAS flash writer)
Maybe a button (with a warning) allowing to update the flash could be created, rather than an automatic job. It would be a good compromise, allowing users to use it when they want, and therefore less than each time they exit Python.

@UnknownAMD
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants