Micro Python Brings Python to MCU Boards and Robots (Crowdfunding)

Micro Python is an implementation of the Python programming language, written from scratch and optimized to run on micro-controllers such as the ones based on ARM Cortex-M cores. Damien George, the developer, also designed the Micro Python board powered by STMicro STM32F405 Cortex M4 MCU for the purpose of running Micro Python.

Micro_Python_BoardEven though in this project, the star of the show is not the board itself, as Micro Python will run on other platform once it’s open source, let’s have a look at the hardware specifications:

  • MCU – STMicro STM32F405RG @ 168MHz with 1MB flash, 192KB RAM, and an FPU.
  • External storage – Micro SD slot
  • 30 general purpose I/O pins – 5 USARTs, 2SPIs, 2 I2C busses, 14 ADC pins, 2 DAC pins, 2CANs, and 4 servo ports with power.
  • Built-in USB interface
  • Misc – 4 LEDs, a user switch, a reset switch, a real-time clock, and a 3-axis accelerometer (MMA7660)
  • Dimensions – 33×40 mm

The USB interface acts both as a serial device (CDC VCP) and removable storage device (MSC) to respectively access the Python terminal & debugging, and copy Python scripts to the board. The USB port can also be used to flash Micro Python onto the micro-controller.

Micro Python will handle the low level talks to boot the board, run ./boot.py to configure USB and other low level parameters, and will look for and launch your main program located by default in ./src/main.py. All you need is a Windows, Mac or Linux computer, connect the board via USB, and copy your Python scripts to the board, which just looks like another USB flash drive from your computer point of view.

Here are some code snippets:

  • Blinking LEDs every second:
  • Reading accelerometer values:
  • Controlling servos:

Micro Python has the following key features:

  • Python 3.3 grammar and semantics. Libraries not all available.
  • Support for 32-bit ARM processors with the Thumb v2 instruction set, e.g. ARM Cortex-M.
  • Footprint:
    • Space-optimized binary compiled to Thumb v2 machine code: around 60KB
    • Size of all code, including FAT support, SD card, USB serial, USB mass storage, USB HID, Bluetooth, LCD, servo, timer: about 110KB.
    • RAM – “Hello World”: 4KB.
  • 4 types of code emitters – (compressed) byte code, native code, native code with native types, and inline assembler.

Damien George is taking the project to Kickstarter in order to complete the development of Micro Python, make it open source (MIT License), and fund mass production for the Micro Python board, which will also be Open Source Hardware. If you just want to support his development efforts, and get early access to the source code and updates, you can pledge 10 GBP (~$16 US). You’ll have to pledge 24 GBP (~$39 US) in order to receive Micro Python board as well, adding 4 GBP if you live outside the UK. There are also some other pledges with kits (Robotics, Wireless, etc…).  The project already reached its funding target, and delivery is expected in March 2014.

I’ve also discovered another Python implementation for MCU called PyMite (aka p14p, python-on-a-chip) via the Kickstarter FAQ. Damien explains Micro Python does not allocate heap memory for integer operations and method calls, and by doing so, reduces the risk of inducing a garbage collection cycle which would cause performance issues during critical code, e.g. interrupt subroutines.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
6 Comments
oldest
newest
onebir
onebir
11 years ago

So this should work on Arduino Due eventually too?

onebir
onebir
10 years ago

Now 2 porting pledges, but no details about which MCUs. Looking for that info I noticed the hardware is being open-sourced: http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers/posts/693195

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...