• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    C
  • Created almost 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

MicroPython implementation for Kendryte K210

MicroPython for Kendryte K210

This MicroPython port is now in a stable phase, but some bugs and issues can be expected, please report
All standard MicroPython functionality and modules are implemented, as well as advanced thread support, file system support, display module, network, enhanced K210 peripheral support ...
Modules providing support for still unsupported K210 peripherals will be implemented soon


For discussion about this MicroPython port please visit the dedicated Forum


Wiki pages are provided with detailed information about usage, classes, methods ... (not yet complete)


If you find this project useful, you can contribute by making a donation.  Donate


This implementation was based on Sipeed MaixPy, but it diverged from it and is now a completely independent project.

Main features:

  • Based on kendryte-freertos-sdk, modified to include some needed features not yet implemented and enhanced drivers support
  • MicroPython core based on latest release build from main Micropython repository
    Unchanged except for the thread support and other changes needed to work with 64-bit RISC-V.
  • BUILD.sh script is provided to make building MicroPython firmware as easy as possible
  • Running two independent Micropython instances on two K210 cores is supported.
    Rich set of functions for data exchange between instances is provided.
  • Refactored _thread module with many new features, based on my MicroPython for ESP32 thread module.
    Rich set of threads related methods, including inter-thread notifications and messages.
  • Full support for LittleFS as default file system on internal Flash.
    LittleFS file system image can be prepared on host and flashed to the board.
    SPIFFS is also supported (with directories support) and can be selected when building.
  • Full support for Fat32 file system on external SD Card
  • Full file timestamp support for LittleFS, SPIFFS and Fat32
  • improved utime module, all time related values are handled as 64-bit values
  • SRAM buffer is provided with content preserved after reset, accessible via machine.mem_xxx methods
  • uart module, compatible with the uart module on my ESP32 port
    buffered, interrupt based input with callbacks on events
  • Pin module, compatible with the Pin module on my ESP32 port
  • i2c module, master & slave, compatible with the i2c module on my ESP32 port
    SSD1306 module provided as MicroPython frozen module
  • spi module, master & slave, compatible with the spi module on my ESP32 port with added slave support
  • WS2812 (neopyxel) support, using spi module
  • Timer and PWM modules
  • OneWire & DS18x20 module
  • ymodem module for file transfer to/from K210 board using ymodem protocol is provided
  • uhashlib and ucryptolib using K210 hardware AES are implemented
  • Display module ported from my MicroPython for ESP32 display module
    Rich set of drawing methods, direct write or framebuffer, jpeg, bmp and raw image format
    Flexible fonts support (fixed width and proportional) with user fonts loadable from file (online Font creator provided)
  • Full network support for WiFi (based on ESP8266/ESP8285) and GSM modules.
    • My own ESP8266/ESP8285 firmware is provided with enhanced features and OTA firmware update support
    • PPPoS support for GSM modules
    • full SMS support for GSM modules with collbacks on SMS receive
    • flexible and feature rich AT command method is provided for both WiFi and GSM modules
    • Full MicroPython socket module compatibility, with some additional features. FTP Server and Web Server examples are available.
    • urequests module (written in C) supporting all http request methods, http and https ( SSL/TLS, on WiFi, only)
    • Full featured mqtt module (written in C) with callbacks on all events
    • FTP Server and Web Server provided as frozen modules
  • usqlite3 module, data base on internal flash or SD Card, in-memory database supported
  • Boot menu, invoked by external pin, is provided which can help solve some issues.
    Options to prevent loading of boot.py and/or main.py, force format of the internal file system, load the default configuration ...
  • Many configuration options can be configured directly from MicroPython (saved on Flash):
    • running two MicroPython instances
    • heap and stack sizes
    • using PyStack
    • default CPU frequency
    • default REPL baudrate
    • boot menu pin
    • default log level
    • using ansi colors
    • MicroPython VM divisor
  • pye, full screen file editor (as MicroPython frozen module) is provided
  • MPyTerm, serial terminal emulator specially designed for MicroPython is provided.
    Included are commands to synchronize MicroPython time from PC, change the REPL baudrate, transfer files to/from MicroPython filesystem (including transferring whole directories).
    Fast block file transfer is used, protected with CRC.
  • Eclipse project files included.
    To include it into Eclipse goto:
    File->Import->General->Existing Projects into Workspace
    Select root directory [select MicroPython_K210_LoBo directory]
    Finish.
    Rebuild index
    Execute Index->Freshen All Files.
  • Many modules from my MicroPython for ESP32 port are already ported, porting some others is planned.
  • More to come soon ...


This MicroPython port was tested on Sipeed's MAIX boards.
Here are some links to the distributors:

Seed
AnalogLamb
Banggood (prices to high)

It should also work on Kendryte KD233, probably with some modifications, but it was not tested.


For build instructions see the Wiki.


More Repositories

1

MicroPython_ESP32_psRAM_LoBo

MicroPython for ESP32 with psRAM support
C
822
star
2

ESP32_TFT_library

Full featured TFT library for ESP32 with demo application
C
558
star
3

ESP32_ePaper_example

Full featured ePaper library for ESP32 with demo application
C
218
star
4

ESP32-PPPOS-EXAMPLE

Example of using ESP32 with GSM modem and lwip+pppos
C
216
star
5

OrangePi-BuildLinux

Shell
121
star
6

OrangePI-Kernel

C
116
star
7

ESP32_curl_example

Full example of using libcurl with ESP3232
C
78
star
8

ESP32_spiffs_example

Full example of using SPIFFS with ESP32 VFS
C
72
star
9

ESP32_CC1101

ESP32 driver library for TI CC1100 Low-Power Sub-1 GHz RF Transceiver
C
70
star
10

ESP8266_AT_LoBo

New ESP8266 AT-Firmware with many added features
C++
38
star
11

ESP32_SPI_MASTER_NODMA_EXAMPLE

Non DMA version of the spi_master driver with ILI9431&ILI9488 example
C
36
star
12

ktool

A Python-based cross-platform Kendryte K210 UART ISP Utility, enhanced kflash.py
C++
35
star
13

Kboot

K210 bootloader
C++
33
star
14

Lua-RTOS-ESP32-lobo

Lua RTOS for ESP32
C
33
star
15

RePhone_on_Linux

RePhone develpment on Linux with Eclipse, IoT oriented Lua implementation
C
30
star
16

Odroid-installer

Boot menu and tools for Odroid XU3/XU4 & C2
Shell
29
star
17

ESP32_ymodem_example

Example of using YModem protocol on ESP32
C
28
star
18

GD32VF_USB_UART_BRIDGE

USB to UART bridge for GD32VF103
C
27
star
19

Odroid_Multiboot

Boot menu and tools for Odroid C1, C2 & XU3/XU4
Shell
23
star
20

MICO

C
17
star
21

ESP32_NEW_SPI_MASTER_EXAMPLE

Modified esp-idf spi_master driver with example
C
16
star
22

iMX_RT10XX_bootloader

Bootloader for mimrxt MicroPython port
C
6
star
23

Lua-RTOS-ESP32-additions

Additions to Whitecat's Lua-RTOS-ESP32
C
5
star
24

K210_FreeRTOS_SDK

FreeRTOS SDK for Kendryte K210
C
4
star
25

mecrisp-stellaris

Mecrisp-Stellaris mirror
Assembly
1
star
26

ESP8266Forth

Forth for the ESP8266 NodeMCU Amica
Arduino
1
star
27

OdroidC1-BuildLinux

Shell
1
star
28

ESP32_K210_FIRMWARE

ESP32 firmware for MicroPython for K210 project
C
1
star
29

OdroidC1-tripleboot

Shell
1
star