lib-python icon indicating copy to clipboard operation
lib-python copied to clipboard

Memory errors

Open unmanagedtn opened this issue 5 years ago • 1 comments

MicroPython v1.9.4-927-g7565eb7 on 2018-11-08; XBC LTE Cat 1 Verizon with EFM32G Type "help()" for more information.

Loading /flash/main.mpy... Running bytecode... Traceback (most recent call last): File "", line 1, in MemoryError: memory allocation failed, allocating 272 bytes

unmanagedtn avatar Jul 24 '19 22:07 unmanagedtn

Hi ! As i can see from description this platform has 128 kB Flash and 16 kB RAM Could you please check free memory on your device with raw MicroPython without any other libs and scripts installed ?

import gc
gc.collect()
gc.mem_free()

Also please check this page https://github.com/blynkkk/lib-python/tree/master/examples/esp8266

I see that you have defined .mpy but maybe there will be needed more optimized bytecode compression. Could you please share listing of your script just to look for possible "memory eaters"

antohaUa avatar Jul 25 '19 06:07 antohaUa