MicroPython Demoed Running Bare Metal In Browser
MicroPython Demoed Running Bare Metal In Browser
Written by Kay Ewbank   
Tuesday, 13 June 2017

The developers of MicroPython have developed the ability to run MicroPython "bare metal" in a web browser. MicroPython is an implementation of Python optimised to run on microcontrollers and in constrained environments.

MicroPython combines Python 3 with a small subset of the Python standard library. Despite its limited size, you get features including an interactive prompt, closures, list comprehension, generators, and exception handling.  It implements the entire Python syntax and core datatypes including: str, bytes, bytearray, tuple, list, dict, set, array.array, collections.namedtuple, classes and instances. Built-in modules include sys, time, and struct. It claims to compile 99.99% of the standard library. The language will fit and run in 256k of code space and 16k of RAM.




The language is most commonly available on the MicroPython pyboard. This is a compact electronic circuit board that runs MicroPython on the bare metal, giving you a low-level Python operating system that can be used to control all kinds of electronic projects.

The browser-based "bare metal" MicroPython was put together using unicorn.js. This is an Emscripted version of unicorn, which is itself a stripped-down version of QEMU, the open source machine emulator and virtualizer. 




The developers say they used unicorn.js to implement a Cortex-M3 based "virtual microcontroller" that runs in the browser. They then run a unicorn port of MicroPython on this virtual microcontroller.

Writing about the project on the MicroPython blog, Damien George of George Robotics said:

"Running this unicorn port of MicroPython will give you a good idea of what it's like running MicroPython on the bare metal of real hardware, and allows you to test stuff out quickly, and get to know (new) features of MicroPython."

The blog post said that the current port is pretty minimal and doesn't have many features enabled, but plans for the future include different builds of unicorn MicroPython to show-case size versus features.




More Information

MicroPython Site 

MicroPython Forum

Related Articles

Micro Python - The Latest Python

Commando Jump Game For The Micro:bit In Python

Lua 5.3 Released

Raspberry Pi Goes Commercial

Edison Is A PC On An SD Card


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.



Apache Releases Trafodion

Apache Trafodion has been moved from incubator status to become a high level project. Trafodion is a webscale SQL-on-Hadoop solution enabling transactional or operational workloads on Apache Hadoop.&n [ ... ]

Mozilla Turns Twenty Years Old

March 31st, 1998 was the date on which the Mozilla Code was made available under the Mozilla Public Licence and the day the Mozilla Project was formally launched.

More News




or email your comment to: comments@i-programmer.info


Last Updated ( Tuesday, 13 June 2017 )

RSS feed of news items only
I Programmer News
Copyright © 2018 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.