Microcontroller Memory Constraints

Discussions center on the limited RAM and flash memory of embedded microcontrollers like PIC, AVR, STM32, and ESP32, evaluating if programs, interpreters like MicroPython, or other software can run on such resource-constrained hardware.

📉 Falling 0.5x Hardware
2,229
Comments
20
Years Active
5
Top Authors
#32
Topic ID

Activity Over Time

2007
1
2008
5
2009
12
2010
42
2011
49
2012
46
2013
60
2014
91
2015
124
2016
126
2017
133
2018
141
2019
155
2020
194
2021
173
2022
218
2023
235
2024
221
2025
197
2026
6

Keywords

RAM STM32 II CPU MIPS ARM ESP8266 youtu.be PIC32 erlang.org ram embedded flash microcontroller kb arduino memory size bytes microcontrollers

Sample Comments

roland35 Sep 30, 2021 View on HN

Not the OP, but check out devices like Microchip's PIC (8 bits) or AVR (8 bits), or ARM Cortex M0 or Cortex M3/4 devices. On cheaper devices you can get down to a few kB of RAM and Flash memory, so you need to be mindful of what you use!When working with embedded devices like that, the main thing is you can't just easily import libraries or use many layers of abstraction (limited stack depth too). So generally everything is done at a low level.

Kelbit Nov 4, 2017 View on HN

That's a huge amount of RAM for most microcontrollers.

zik Jun 25, 2019 View on HN

It'd fit in an STM32 microcontroller's 64K RAM comfortably, with room to spare for some actual programs. That's actually a pretty useful application. Except I think it targets x86 rather than ARM.

jenadine Jan 28, 2023 View on HN

A program for a micro controller with only a few KB of RAM

phkahler Sep 17, 2017 View on HN

Small micro controllers don't have the resources you're used to. The smallest thing I ever wrote code for was in the PIC family and had 176 bytes of RAM and like 4 or 8K of flash (EEPROM?). Even on more common parts you may find only a few K of RAM and 10's or 100's of K flash. In that space we don't do any dynamic memory allocation, never mind garbage collection. If you did it's entirely possible you'd run out of heap space and the program would crash. It'

rkagerer Apr 21, 2020 View on HN

Think it's portable enough to use in embedded microcontroller environments?

tesseract Apr 27, 2011 View on HN

That sounds positively luxurious... I recently worked on a project where the microcontroller had 768 bytes of RAM and around 32k flash. The hardware team were really pushing for a slightly cheaper version of the microcontroller with only 512 bytes RAM but as we software folks were feeling pinched even at 768, they got overruled.

matt_trentini Aug 17, 2020 View on HN

That's roughly true: 32KB RAM and 256KB Flash will provide a decent MicroPython environment. I'm afraid if you have fewer resources than that you should probably look at other alternatives.

icedchai Jun 19, 2018 View on HN

Have you considered embedded programming? Less bloat...

pletnes Jul 7, 2019 View on HN

Micropython runs in 16k RAM.https://micropython.org/