Thanks. Please state the firmware version.bmarkus wrote:On a LoPy v1.0 board with stock firmwareCode: Select all
>>> import gc >>> gc.collect() >>> gc.mem_free() 191088 >>>
Free RAM on MicroPython boards
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: Free RAM on MicroPython boards
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: Free RAM on MicroPython boards
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
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.
Code: Select all
import os
os.uname()
Tiny Core Linux (piCore) developer
HAM radio call: HA5DI (Béla)
HAM radio call: HA5DI (Béla)
Re: Free RAM on MicroPython boards
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
Yes Frida is my watchdog!
Re: Free RAM on MicroPython boards
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
Tiny Core Linux (piCore) developer
HAM radio call: HA5DI (Béla)
HAM radio call: HA5DI (Béla)
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: Free RAM on MicroPython boards
Answer from here :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
So the free RAM on LoPy (and possibly WiPy 2.0) is a moving target. Hoping to see about 150 KB of free RAM.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
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: Free RAM on MicroPython boards
Added firmware/MicroPython versions for most of the boards in 1st post. I'll later update Pyboard line with the MicroPython version.
Last edited by rcolistete on Wed Nov 02, 2016 8:22 pm, edited 1 time in total.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: Free RAM on MicroPython boards
Today's commit for ESP8266 increased the heap and this the available RAM by 8k.
Re: Free RAM on MicroPython boards
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
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: Free RAM on MicroPython boards
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.Roberthh wrote:Today's commit for ESP8266 increased the heap and this the available RAM by 8k.
1st post updated with free RAM for LoPy and WiPy2, firmware v0.9.3.b2 with 77KB, 8KB more than previous version.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).