MicroPython Software Package

RT-Thread IoT OS
2 min readJun 18, 2020

Introduction

MicroPython has been ported to RT-Thread opensource IoTOS and could be run on RT-Thread 3.0 or above. This package allows you to run Python on any embedded system carrying RT-Thread.

Catalog Structure

License

RT-Thread Micropython follows MIT License, find more details in LICENSE.

Dependence

RT-Thread 3.0+

Open RT-Thread MicroPython

First, select Micropython packages in RT-Thread package manager, as follows:

RT-Thread’s package manager will download the selected packages automatically. Also, you can explicitly order the package manager to download packages into the BSP directory by using the pkgs --update command.

Process

When MicroPython Package is selected, it is added to the bsp project for compilation when bsp compiles again.

MicroPython Firmware Development Guides please refer to Here.

For more information about RT-Thread Micropython, please refer to Here.

Using MicroPython IDE

The RT-Thread MicroPython IDE provides a powerful development environment, which is downloadable through the VScode App Store, as follows:

Add C extensions to MicroPython

To make it easier for users to add their own C functions to MicroPython, which could be invoked in Python scripts, a MicroPython C binding code-generator(https://summergift.top/RT-MicroPython-Generator/) is provided by RT-Thread. With this tool, the C function extensions can be implemented in just a few simple steps, and the following image shows the form of the automatically generated C code.

Note

· Only available on RT-Thread V3.0 and above.

· Select the latest version of Micropython in the menuconfig.

· Currently, the ffi component in System Module is only supported by the GCC toolchain and adding the relevant segment information into the link script is required.

RT-Thread Contact Info:

Website | Github | Twitter | Facebook | Youtube

--

--

RT-Thread IoT OS

An Open-Source Community-Powered Real-Time Operating System (RTOS) Project! Let’s develop, DIY, create, share, and explore this new IoT World together!