I am working on a module for the MFRC522 RFID reader. The module size is 11KB
I managed to copy the module on the micropython filesystem with the help of webrepl_cli.py.
When I try to import the module through the UART REPL, I get the following error:
Code: Select all
MemoryError: memory allocation failed, allocating 136 bytes
I tried to open the file and read it but I also got a memory error when trying to read the whole file in a single string.
I stepped line by line in the file and could display all 380 lines of code: there did not seem to be any corrupted data from the transfer.
11KB does not seem excessively large for a module, is this really a limitation of the available memory or could it be some other issue?
Does it mean that the module should be "frozen" into the hardware to optimize the memory usage?
I am working with Wemos D1 mini boards which have allegedly 4MB of memory.
I am using the official 1.8 version released this week.
Any pointers welcome.
Best regards,
Llwy