OpenAMP Runs MicroPython and Arduino Code on Same Dual-Core Microcontroller

MicroPython 1.23.0 adds OpenAMP, allowing Arduino GIGA R1 WiFi, Portenta H7, and Nicla Vision to run different code bases on each core.

The latest MicroPython release empowers Arduino users with new possibilities. In the past, Arduino boards were limited to running code from a single development environment. However, now that limitation is gone with the introduction of OpenAMP support in the MicroPython 1.23.0 release — the GIGA R1 WiFi, Portenta H7, and Nicla Vision boards can run both Arduino code and MicroPython at the same time.

MicroPython is a Python implementation that runs on microcontrollers and other limited-memory platforms. Its high compatibility with Normal Python makes it a fantastic rapid development tool while being robust enough for deployment. Before adding OpenAMP support, if you needed a function MicroPython did not offer, you would need to either develop it yourself or change development environments.

OpenAMP, where AMP stands for Asymmetric Multi-Processing, is an open-source project that aims to standardize how operating environments interact in an embedded system. It's a software framework that makes resource sharing on multi-core embedded systems more straightforward for developers. For example, the Arduino framework already supported OpenAMP on the STM32H7-based Arduino Giga and Portena H7 boards, which have an Arm Cortex-M7 core and an Arm-Cortex-M4 core with shared RAM, Flash, and other resources. That inclusion made it easier for developers writing Arduino code to utilize both cores, as long as they both used Arduino code!

The addition of OpenAMP support in MicroPython 1.23.0 opens up new possibilities for harnessing the full capability of the more powerful Arduino boards. Now, you can run Arduino code on one core and MicroPython on another, enabling a seamless integration of the two. The two cores communicate with each other asynchronously via remote procedure calls (RPC), making it an invaluable tool for developers.

As we delved into the OpenAMP-related commits on the MicroPython GitHub, we couldn't help but notice Ibrahim Abdelkader's significant contribution. Abdelkader is the original developer behind the Python-based computer vision project OpenMV. Kudos to Ibrahim for expanding the connection between Arduino and MicroPython!

Today, you can use MicroPython and Arduino code on the GIGA R1 WiFi, Portenta H7, and Nicla Vision boards. For more information, check out this blog post announcing the exciting capability.

baldengineer

Electronics enthusiast, Bald Engineer, and freelance content creator. AddOhms on YouTube. KN6FGY.

Latest Articles