Page 3 of 4
Re: Free RAM on MicroPython boards
Posted: Wed Oct 19, 2016 1:26 pm
by rcolistete
bmarkus wrote:On a LoPy v1.0 board with stock firmware
Code: Select all
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
191088
>>>
Thanks. Please state the firmware version.
Re: Free RAM on MicroPython boards
Posted: Wed Oct 19, 2016 2:29 pm
by kfricke
The LoPy firmware does only print a commit hash suffix but no MicroPython release number. So only Pycom knows which MicroPython release we do use there.
Re: Free RAM on MicroPython boards
Posted: Wed Oct 19, 2016 2:46 pm
by bmarkus
kfricke wrote:The LoPy firmware does only print a commit hash suffix but no MicroPython release number. So only Pycom knows which MicroPython release we do use there.
returns a tuple with release, version and other parameters. On my board release='0.9.0b' whatever it means.
Re: Free RAM on MicroPython boards
Posted: Wed Oct 19, 2016 5:03 pm
by Frida
Code: Select all
>>> import os
>>> os.uname()
(sysname='LoPy', nodename='LoPy', release='0.9.0.b2', version='f5444c7 on 2016-10-12', machine='LoPy with ESP32')
Code: Select all
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
191216
Re: Free RAM on MicroPython boards
Posted: Fri Oct 21, 2016 5:45 pm
by bmarkus
Updated LoPy to 0.9.1.b1 firmware released today. Now free RAM is only
71152 bytes Also, every execution of gc.mem_free() is decresing it by 64 bytes
Re: Free RAM on MicroPython boards
Posted: Sun Oct 23, 2016 5:47 am
by rcolistete
bmarkus wrote:Updated LoPy to 0.9.1.b1 firmware released today. Now free RAM is only
71152 bytes Also, every execution of gc.mem_free() is decresing it by 64 bytes
Answer from here :
71,152 is the expected value for now. We will increase it in future releases, and we should end-up with something around 150K. The old value of 191,088 was wrong and that was causing the gc crashes.
Calling gc.mem_free() on the REPL will decrease the value as it creates new objects. As soon as you call gc.collect() the free memory amount will increase again.
Cheers,
Daniel
So the free RAM on LoPy (and possibly WiPy 2.0) is a moving target. Hoping to see about 150 KB of free RAM.
Re: Free RAM on MicroPython boards
Posted: Wed Nov 02, 2016 5:53 pm
by rcolistete
Added firmware/MicroPython versions for most of the boards in 1st post. I'll later update Pyboard line with the MicroPython version.
Re: Free RAM on MicroPython boards
Posted: Wed Nov 02, 2016 8:05 pm
by Roberthh
Today's commit for ESP8266 increased the heap and this the available RAM by 8k.
Re: Free RAM on MicroPython boards
Posted: Sat Nov 05, 2016 4:54 am
by kamikaze
Teensy 3.6:
Code: Select all
>>> __import__('gc').mem_free()
233920
Code: Select all
>>> del machine
>>> del pins
>>> del pyb
>>> del led
>>> del af
>>> __import__('gc').collect()
>>> __import__('gc').mem_free()
234496
Re: Free RAM on MicroPython boards
Posted: Wed Nov 09, 2016 6:45 pm
by rcolistete
Roberthh wrote:Today's commit for ESP8266 increased the heap and this the available RAM by 8k.
Thanks. Hope to see it in v1.8.6. Constrained RAM is one of the limitations of ESP8266, so this increase will be very useful.
1st post updated with free RAM for LoPy and WiPy2, firmware v0.9.3.b2 with 77KB, 8KB more than previous version.