adafruit / adafruit/Adafruit_CircuitPython_MacroPad
CIRCUITPY is read-only: [Errno 30] Cannot write last_app.txt using default MacroPad code
- Dominant language
- Python
- Stars
- 99
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm using an Adafruit MacroPad RP2040 with CircuitPython 9.2.0, and I'm running the default "MacroPad Hotkeys" setup from the official guide ([[macropad-hotkeys-guide](https://learn.adafruit.com/macropad-hotkeys/project-code)](https://learn.adafruit.com/macropad-hotkeys/project-code)).
The MacroPad loads and runs code fine, but whenever the running script tries to write to last_app.txt, I get this error:
save_last_app: ERROR writing file: [Errno 30] Read-only file system
❌ Things I’ve already tried:
Using multiple data-capable USB cables and ports
Reinstalling CircuitPython 9.2.0 .uf2 from circuitpython.org
Running erase-circuitpy.uf2 to reset the storage
Reloading the code.py and macros setup from Adafruit’s example repo
Confirming that the MacroPad boots into CIRCUITPY, not MACROPADBOOT
Confirming that the code.py executes, buttons work, and encoder functions
✅ What works:
Code executes (code.py is running)
Encoder switches apps
apps folder and macro .py files load and display correctly
❌ What’s broken:
last_app.txt is not created
Any open("/last_app.txt", "w") call fails with [Errno 30] Read-only file system
CIRCUITPY appears mounted, but it is not writable
Questions:
Is this a known issue with CircuitPython 9.2 on MacroPad RP2040?
Could this indicate a problem with internal flash storage or USB mass storage handling?
Any other steps to re-enable write access to CIRCUITPY?
Here is my code.py for troubleshooting
[code.txt](https://github.com/user-attachments/files/21297912/code.txt)
Thanks a lot in advance for any guidance!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked code.txt and the official MacroPad Hotkeys project code, focusing on the save_last_app path and its attempt to write /last_app.txt. Reproduce the failure on a MacroPad RP2040 running CircuitPython 9.2.0 and compare the storage behavior with the documented setup; done means the cause of the read-only filesystem is identified and a verified recovery or project-level resolution is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100