I presume you mean your source has to be compatible with a 5 year old version of MicroPython, rather then you are building and running that old version on a Pico W ?My situation is quite specific, unfortunately I have to use a certain version of uPython that's about 5 years old and I can not pre-compile the code as it needs to be updatable OTA.
That does seem like it should be more than enough to allocate a 32KB bytearray so I am not sure why it isn't. I would also suspect fragmentation but, if it is, I have no idea how to resolve that or identify the cause.If I put `micropython.mem_info()` at the top of my program it reports that there are about 117KB of free memory. I'm not aware of how much memory the load/compilation of code needs exactly but it kind of feels like that it has plenty left, not sure.
What I was meaning is that my test code shows 60KB of RAM gets used whether I load and run that source from the command line or from Thonny, and likewise if I import from the filesystem after uploading the '.py' or '.mpy file. So that would appear to be executable byte code being placed into RAM.Additionally, I'm not sure I understand what you meant by "only saved 100 or so bytes at best" with your 60KB test, no matter how many times I read it, could you re-word that? Thank you!
The actual amount of RAM used depended on how it was done but the smallest amount used was only around 100 bytes less than the largest, insignificant in the grand scheme of things.
Statistics: Posted by hippy — Sat Jan 11, 2025 7:49 pm