r/circuitpython • u/DSLR_CNC • Dec 24 '21
Rookie Question
So I am new to circuitpython, and I need to read a variable of 4096 bytes but thonny says "pystack exhausted", it is the only problem I remove the variable and everything works on my code, how I can read this variable? the variable is a firmware for a optical sensor, so that's why it is 4KB.
3
Upvotes
3
u/jpconstantineau Dec 25 '21 edited Dec 25 '21
What controller are you using? Some (like the samd21) have limited ram.
There is a command you can add to boot.py to change some memory settings. I'll need to look it up and I don't know if it will help in your specific situation. The adafruit people on their discord will be able to answer your question as they monitor it very closely (not too many people here on Reddit)
Try to add this to boot.py:
https://github.com/KMKfw/kmk_firmware/blob/410cf7af0767e37baec789e06c32bf28017d2289/boot.py#L3