MicroPython - Porting python to microcontrollers

aswinvenu


15

Votes

Description:

Have you ever worked on embedded system projects? Does that challenge your C skills? What if you have a python interpreter running on a bare metal microcontroller? Then you should have a look at MicroPython project.

<h3> What is Micropython ?</h3>

MicroPython is a lean and fast implementation of the Python 3 programming language that is optimised to run on a microcontroller. The MicroPython board is a small electronic circuit board that runs MicroPython on the bare metal, and gives you a low-level Python operating system that can be used to control all kinds of electronic projects.

<h3> About the Talk</h3>

Running an interpreter based programming language in a microprocessor with an OS is considered to be easier than running a the same in a microcontroller environment ,where you won't get the luxury of the RAM (System memory) and available ROM ( It can be flash or EEPROM etc.).

In the most modern microcontrollers with ARM Cortex M4 or even M7 series the RAM is limited to few hundred kiloBytes and Flash will be few MegaBytes.

Keeping the limited memory availability in the mind micropython is an effort to port python 3 (cpython) into microcontrollers.

<p2>some of the currently supported platforms are:

  • PyBoard ( Official micropython boards) *STM32F4 ( Discovery boards )
  • Tiva TM4C123G ( Launchpad board from TI)
  • Arduino Due
  • Teensy
  • ESP8366 etc. </p2>

We will be running micropython with some of these boards.

<b>The talk will be divided into three parts.</b>

<h4><b> Part One : Micropython and cpython implementation</b> </h4>

In this section I will briefly explain micropython architecture. including :

  • Decoding
  • Tokenizing
  • Parsing
  • AST
  • Compiling and Virtual Machine

I will point out how a typical cpython implementation differ from the micropython implementation.

<h4> <b>Part Two : Hands on with micropython </b></h4>

This will be more interesting part. we will port micropython in few supported platform and run some examples.

Through example we will check the working of all main functionalities ( Accessing driver level functions etc.).

Note : In the end of this section I will give some hints on how to port micropython into other currently unsupported platforms.

<h4><b> Part Three : Application </b></h4>

IOT is a hot spot now. Everything is connected now. We will discuss how we can increase the pace of IOT development using the simplicity of python.

Prerequisites:

Any one who has python knowledge can attend. It will be great if you the following skills

  • Basic C skills
  • Basics of Micro Controllers

Content URLs:

MicroPython Website : https://micropython.org/

MicoPython GitHub Repo: https://github.com/micropython/micropython

Some PyCon Talks on Micropython : https://www.youtube.com/watch?v=MZ_KOS2BSEo&feature=youtu.be

https://www.youtube.com/watch?v=4loeAfwaWM4&feature=youtu.ben

MicroPython - Porting Python to microcontrollers ( Proposed talk presentation slides ) : https://github.com/aswinvenu/Micropython-Talk/blob/master/MicroPython-Presentation.pdf

Speaker Info:

I am a free and open source enthusiast. Currently working for a Bangalore based startup. I holds a B E degree in Electronics and Communication Engineering from Anna University. I have been doing research in Brain Computer Interface and distributed sensor networks for last two years. I am an OpenSuse Advocate and Fedora community member. I have been a part of volunteering committee of Pycon India for last 2 years.

Speaker Links:

https://www.linkedin.com/in/aswinvenu

https://en.opensuse.org/User:Aswinvenu

https://fedoraproject.org/wiki/User:Aswin22

Section: Embedded Python
Type: Talks
Target Audience: Intermediate
Last Updated: