Not enough memory available on the board.
-
I have upgraded my sipy to the latest firware 1..16 and it get Not enough memory available on the board. when the same code runs on my lopy with no issues! What could be causing this?
-
>>> os.uname() (sysname='LoPy4', nodename='LoPy4', release='1.15.0.b1', version='v1.8.6-849-baa8c33 >>> import gc >>> gc.collect() >>> gc.mem_free() 2558368
-
@jmarcelino said in Not enough memory available on the board.:
@misterlisty
Yes, the new boards (FiPy, LoPy4, GPY, WiPy3) have a much increased 4MB RAM vs 512KB in the previous gen.And this is the real existing memory. You have to count the numbers after you booted the device. In the 512KB version of the LoPy there is only around 30-60KB left for your own projects. Not very much, but for most projects it is plenty of memory.
Can someone post the numbers for the LoPy4, please.
-
@misterlisty
Yes, the new boards (FiPy, LoPy4, GPY, WiPy3) have a much increased 4MB RAM vs 512KB in the previous gen.
-
@robert-hh I run this exact code on a fipy and it works fine. It appears to give error as soon as it finishes boot.py and starts main.py
Does sipy and gipy have different memeries?
-
@misterlisty Different firmware types have differentz memory needs. At what stage does the code run out of memory?
- if it is during import, then pre-compiling can help.
- if precompiled code runs out of memory, then frozen bytecode will help.
If you already use the latter, then you have to optimize the data usage of your code or use one of the newer modules with more RAM.
-
can anyone assist?