-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
CircuitPython version and board name
Adafruit CircuitPython 10.0.3 on 2025-10-17; Adafruit Fruit Jam with rp2350bCode/REPL
# write to a file in saves
with open("/saves/testfile.txt", "w") as f:
f.write("test content")
# read from a file in saves
# with open("/saves/testfile.txt", "r") as f:
# print(f.read())Behavior
After this sequence of events the saves drive ends up in a broken state:
- Start with CPy loaded and CPSAVES drive working as normal
- Write content to a file inside of
/saves/, read back the content to verify that it was successfully written. - Load a non CPy firmware UF2 such as apple 2e
- Load CPy firmware again
Now the CPSAVES drive does not seem to get mounted to my PC any more, only CIRCUITPY. Though I do hear 2 "device connected" jingles so it does seem to be trying. Possibly the 2 jingles is a not actually an indication of it trying to connect CPSAVES, I just noticed when CPSAVES is working I hear 3 jingles.
Trying to read the test file from /saves/ reports:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "saves_file_test.py", line 6, in <module>
OSError: [Errno 2] No such file/directory: /saves/testfile.txt
Trying to write a new file into /saves/ reports:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "saves_file_test.py", line 1, in <module>
OSError: [Errno 30] Read-only filesystem
os.listdir("/saves/") outputs only the placeholder.txt file.
Description
No response
Additional information
This isn't specific to the apple 2e emulator, I've had the same with the 286 emulator. Though I have not tried a more basic arduino program to see if it does the same. I could do that test if it is helpful to know.
Running storage.erase_filesystem() gets the CPSAVES drive back to a working state after this happens.