Page 2 of 4

Re: Free RAM on MicroPython boards

Posted: Wed Sep 14, 2016 8:09 am
by willie
I'd be interested in seeing measurements for Espruino Pico (I like that form factor) if someone has one. The Teensy 3.2 is also of interest.

Re: Free RAM on MicroPython boards

Posted: Wed Sep 14, 2016 8:55 am
by deshipu
willie wrote:I'd be interested in seeing measurements for Espruino Pico (I like that form factor) if someone has one. The Teensy 3.2 is also of interest.
I have a pico, but the version of micropython on it is a bit old. Anyways, here's my result:

Code: Select all

MicroPython v1.5.2-21-g824f83f on 2016-01-04; Espruino Pico with STM32F401CD
Type "help()" for more information.
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
54448

Re: Free RAM on MicroPython boards

Posted: Wed Sep 14, 2016 5:32 pm
by mad474

Code: Select all

MicroPython v1.8.4 on 2016-09-09; Espruino Pico with STM32F401CD
Type "help()" for more information.
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
54336
>>> 
edit: and after commenting out

Code: Select all

import machine
import pyb
in boot.py, the following result

Code: Select all

MicroPython v1.8.4 on 2016-09-09; Espruino Pico with STM32F401CD
Type "help()" for more information.
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
54352
>>> 

Re: Free RAM on MicroPython boards

Posted: Thu Sep 15, 2016 10:00 am
by Roberthh
Teensy 3.1:
Micro Python v1.4.5 on 2015-08-16; Teensy-3.1 with MK20DX256
Type "help()" for more information.
>>> import gc
>>> gc.collect()
>>> gc.mem_free()
52064

Update:
MicroPython v1.8.4-11-g0fd3d8d-dirty on 2016-09-15; Teensy-3.1 with MK20DX256
Type "help()" for more information.
>>> import gc
>>> gc.collect();gc.mem_free()
52112

Re: Free RAM on MicroPython boards

Posted: Thu Oct 06, 2016 9:40 am
by danielm
Why in case of WiPy the heap size is less that quarter of total RAM size, when for other boards it is around half of the RAM size?

Are there any options how to build the CC3200 MP port with bigger heap size?

Re: Free RAM on MicroPython boards

Posted: Thu Oct 06, 2016 10:06 am
by Roberthh
In the course of another topic Damien epxlained that WiPy requires the code to be loaded into RAM and executed there. Therefore most of the RAM is reserved for the MicroPython code itself, leaving only 56k for heap.

Re: Free RAM on MicroPython boards

Posted: Tue Oct 18, 2016 4:06 pm
by rcolistete
Updated the 1st post with measured free RAM for LoPy, Espruino Pico and Teensy 3.1.

Re: Free RAM on MicroPython boards

Posted: Tue Oct 18, 2016 6:08 pm
by dhylands
Using my dev builds (not yet merged to master).

Teensy 3.1: 51952 (64K)
Teensy 3.5: 171120 (192K)
Teensy 3.6: 235120 (256K)

Re: Free RAM on MicroPython boards

Posted: Wed Oct 19, 2016 7:57 am
by Roberthh
The figures for teensy 3.5 and 3.6 look great. They seem to be a real alternative to PyBoard, especially the 3.6 model with the built-in ethernet controller.

Re: Free RAM on MicroPython boards

Posted: Wed Oct 19, 2016 1:03 pm
by bmarkus
On a LoPy v1.0 board with stock firmware

Code: Select all

>>> import gc
>>> gc.collect()
>>> gc.mem_free()
191088
>>>