Hello everyone.
I have a lot of chips controlled by my system (pybv10). I have packaged them into modules for each chip driver and frozen them.
I read the instructions for memory usage.http://docs.micropython.org/en/latest/r ... ained.html
After optimizing the code, the memory is still insufficient. Is there a solution for software or hardware?
Is there a way to increase RAM?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Is there a way to increase RAM?
There is no way to do this in hardware. You may need to consider an alternative platform or wait for the Pyboard D series to emerge.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Is there a way to increase RAM?
Why is the available gc memory only about 72KB?
I want to know how the 192KB+4KB RAM is allocated.
By the way, when will pyboard D be available? I am looking forward to it for a long time.
Code: Select all
MicroPython v1.9.4-479-g828f771e3-dirty on 2018-11-30; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>> import micropython
>>> micropython.mem_info(1)
stack: 508 out of 15360
GC: total: 74368, used: 69968, free: 4400
By the way, when will pyboard D be available? I am looking forward to it for a long time.
Re: Is there a way to increase RAM?
There are 192kB of SRAM on the F405. A PYBV11 shows:
64 kB SRAM is used for filesystem cache and ~30kB SRAM for static variables and stack (depending on build options).
Using 64k as file system cache is a pity but unfortunately unavoidable if you want to have a FAT file system in the internal flash.
The upcoming PYBD will use SRAM in a much more efficient way.
Code: Select all
>>> micropython.mem_info(1)
stack: 484 out of 15360
GC: total: 102656, used: 1440, free: 101216
Using 64k as file system cache is a pity but unfortunately unavoidable if you want to have a FAT file system in the internal flash.
The upcoming PYBD will use SRAM in a much more efficient way.
Re: Is there a way to increase RAM?
Is there a way to use the 64K that was originally used as a file system cache ? I can use the SD card to do file system storage.
Re: Is there a way to increase RAM?
Why does mem_info() on your device show only ~73k. The mem_info() on the device of @dhylands shows about 100k, the same as mine.
Re: Is there a way to increase RAM?
Because I used websocket on pyboard.
Lwip maybe used part of the memory.
It seems to be a bit difficult to use CCM data RAM.
viewtopic.php?f=2&t=427&hilit=CCM+data+RAM
Code: Select all
#define MICROPY_PY_LWIP (1)
#define MICROPY_PY_WEBSOCKET (1)
It seems to be a bit difficult to use CCM data RAM.
viewtopic.php?f=2&t=427&hilit=CCM+data+RAM
Re: Is there a way to increase RAM?
CCM memory on the pyboard is used/reserved by the filesystem for writing Flash blocks.