[GH-ISSUE #329] Save Python scripts to flash storage #146

Open
opened 2026-05-06 13:15:45 +02:00 by BreizhHardware · 2 comments

Originally created by @andrigamerita on GitHub (Jun 26, 2023).
Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/329

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.
Originally created by @andrigamerita on GitHub (Jun 26, 2023). Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/329 **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.
Author
Owner

@AngeDieu commented on GitHub (Jun 28, 2023):

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.

<!-- gh-comment-id:1611401840 --> @AngeDieu commented on GitHub (Jun 28, 2023): 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.
Author
Owner

@UnknownAMD commented on GitHub (Sep 14, 2023):

bump

<!-- gh-comment-id:1720105440 --> @UnknownAMD commented on GitHub (Sep 14, 2023): bump
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Upsilon#146
No description provided.