Memory related troubleshooting - Kyuchumimo/Micro-Joy-Home-Video-Computer GitHub Wiki
- MemoryError: Memory allocation failed, allocating (bytes) bytes
This error occurs when you try to store large amounts of data into a variable, but there is not enough space in the microcontroller's RAM.
Every byte matters. It is important to know that the launcher saves the program in a variable to be executed, so it occupies space in RAM memory. VGM files for playing music also take up RAM space.
It is recommended to load data through files in order to reduce the size of the program.
I am also thinking of using a microcontroller with more RAM in the future such as the Raspberry Pi Pico 2.
- OSError: [Errno 1] EPERM
This happens because you have tried to use the pmem function to save data, but theSAVEIDstring is empty.
You must assign a string type data to SAVEID for pmem to work. SAVEID is the name of the save file. Optionally you can add a file extension