4 ms·
Python for embedded? How micro is micro? What kind of memory footprint are we talking about compared to C? Garbage collection on an embedded controller?
by lasmogbord 12y ago
Python for embedded? How micro is micro? What kind of memory footprint are we talking about compared to C?
Garbage collection on an embedded controller?
- choffee 12y agoIt's a micro version of python so that it can run on embedded devices, this is just a demo board. You can play with the code on your local machine. Differences from CPython are here: https://github.com/micropython/micropython/wiki/Differences https://github.com/micropython/micropython/wiki/Differences
- rm445 12y ago> How micro is micro? The reference board for Micropython is the Pyboard, which has a 32-bit ARM chip running around 168 MHz and with 192 kB of RAM. It's legitimately the kind of thing that gets called a microcontroller. Quite a bit cheaper and less powerful than for instance a Raspberry Pi. (Though note the Pyboard isn't significantly cheaper than a RasPi, because it's not being manufactured at the same scale). Regarding memory footprint compared to C, well it's Python. Reading from the Kickstarter page, the interpreter binary is 60 kB and it can run 'hello world' with an additional 4 kB of RAM. And there's memory overhead for Python objects (32 bytes each apart from integers). Garbage collection takes around 4 ms. I got my Pyboard a few weeks ago when the store was opened to people who expressed interest after the Kickstarter campaign had finished. I haven't pushed it on performance yet, but it's easy to use and it works. It feels strange (but great!) to have Python running on such a limited system.