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.



Use of Obfuscation In Android Apps

Android apps are plagued by plagiarism and outright theft by way of malicious repackaging. Obfuscation is the main means of protection but only a quarter of Android apps on Google Play are obfuscated  [ ... ]

Oracle Holds On To Java EE Brand

Despite Oracle recently agreeing to hand over control of Java Enterprise Edition to the Eclipse Foundation, it seems that the situation isn't as clear cut as it originally seemed.

More News




blog comments powered by Disqus


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.