An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required
An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required
中文页 | Forum | Documents | Videos | BSP | Package Manager | Contribute | Business
# 1. Abstract PikaPython is an ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. PikaPython also known as PikaScript and PikaPy. It's very easy to bind C function to python module with the help of Pika Pre-compiler.Only write the API of python in `.pyi` and the bindings are autoly generated by Pre-compiler. # Get pikapython: ## Use Online Project Generator Generator url: http://pikascript.com Note: You need the [Community Edition license (Now Free)](https://www.keil.com/pr/article/1299.htm) to build Keil projects, and the version of Keil should be newer than v5.36. ## PikaPython studio PikaPython serial terminal, script download and package menage tool. # Quick Start You can use [simulation project](https://pikadoc-en.readthedocs.io/en/latest/Keil%20%E4%BB%BF%E7%9C%9F%E5%B7%A5%E7%A8%8B.html) to quick start without hardware,or use the out-of-the-box develop board [Pika-Pi—Zero](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-23991764791.11.37216340XZtYt9&id=738387991209). The board based on STM32G030C8T6 MCU, only 64kB Flash, 8kB RAM can run pikapython with total peripheral device (GPIO、TIME、IIC、RGB、KEY、LCD、RGB). CH340 is deployed to support USB to serial with Type-C USB, support download python script py serial, there are 4 RGB on the board and support the [LCD](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-23991764791.12.16f97c58fsLjVk&id=660745643102). # Related Projects - [MicroLink](https://github.com/Aladdin-Wang/MicroLink) 一款集多功能于一体的嵌入式系统开发工具 - ▶️ [pikapython Binding For LVGL](https://github.com/lvgl/lv_binding_pikascript) - ⭐ [pikapython Bluepill Demo In PlatformIO — Python-like REPL ](https://github.com/maxgerhardt/pikascript-pio-bluepill) - ⭐ [pikapython Bluepill Demo In GCC ](https://github.com/Chandler-Kluser/pikascript_gcc_bluepill) - ⏩ [pika_startup_demo](https://gitee.com/kcfkwok/pika_startup_demo) This program demonstrate the 5 startup methods of pikapython. - [PikaPython-OpenHardware](https://gitee.com/Lyon1998/pikapython_openhardware) PikaPython 开源硬件 - [pikapython-msvc-qt](https://gitee.com/zuto360_460135301/pikapython-msvc-qt) 移植pikapython到windows平台,基于QT,采用MSVC编译器,移植pthread库,支持多线程。 # Document https://pikadoc-en.readthedocs.io/en/latest/index.html ## How to contribute https://pikadoc-en.readthedocs.io/en/latest/%E5%A6%82%E4%BD%95%E5%8F%82%E4%B8%8E%E7%A4%BE%E5%8C%BA%E8%B4%A1%E7%8C%AE.html ## Folders [src](../../tree/master/src) - core code [bsp](../../tree/master/bsp) - mcu/board support [port](../../tree/master/port) - OS and package manager [test](../../tree/master/port/linux/test) - unit test [document](../../tree/master/document) - developt document [examples](../../tree/master/examples) - example scripts [package](../../tree/master/package) - packages and moudles [pikaCompiler](../../tree/master/tools/pikaCompiler) - pre-compiler write by Rust, used to bind C function to python moudle. [pikaPackageManager](../../tree/master/tools/pikaPackageManager) - pacakge manager # 2.Platform support ## MCU support |MCU |bsp|gpio|time|uart|pwm|adc|i2c|dac| |--- |---|--- |--- |--- |---|---|---|---| |stm32g030c8 |√ |√ |√ |√ |√ |√ |√ | | |stm32g070cB |√ |√ |√ |√ |√ |√ |√ | | |stm32f103c8 |√ |√ |√ |√ |√ |√ |√ | | |stm32f103rb |√ |√ |√ |√ |√ |√ |√ | | |stm32f103ze |√ |√ |√ |√ |√ |√ |√ | | |stm32f103rc |√ |√ |√ |√ |√ |√ |√ | | |stm32f401cc |√ |√ |√ |√ |√ |√ |√ | | |stm32f411ce |√ |√ |√ |√ |√ |√ |√ | | |stm32f407ze |√ | | | | | | | | |stm32f407zg |√ | | | | | | | | |stm32h750vb |√ | | | | | | | | |stm32f051r8 |√ | | | | | | | | |air32f103cb |√ |√ |√ | | | | | | |ch582 |√ |√ |√ |√ | |√ |√ | | |ch32v103r8t6 |√ |√ |√ | | | | | | |cm32m101a |√ | | | | | | | | |w806 |√ |√ |√ |√ |√ |√ |√ | | |apm32f030r8 |√ | | | | | | | | |apm32e103vb |√ | | | | | | | | |bl-602 |√ |√ | | |√ |√ | |√ | |bl-706 |√ | | | | | | | | |[bl-618](https://verimake.com/d/285-bl618-pikapython-led)|√ | √ | √ | √ | √ | √ | √ | √ | |Raspberry Pico |√ | | | | | | | | |ESP32C3 |√ |√ |√ | | | | | | |TC264D |√ | | | | | | | | |devc |√ | | | | | | | | |visual-studio |√ | | | | | | | | |EC600N |√ | | | | | | | | |mm32f5277e9p |√ |√ | | | | | | | |xr806(openharmony)|√ | | | | | | | | ## Board support |Board|bsp|gpio|uart|pwm|adc|i2c|rgb|lcd|arm-2d| |---|---|---|---|---|---|---|---|---|---| |[Pika-Pi-Zero](https://item.taobao.com/item.htm?spm=a230r.1.14.1.4f2e27a8R0qWJn&id=654947372034&ns=1&abbucket=15#detail)|√|√|√|√|√|√|√|√|√| |Board|bsp|pika_lvgl| |---|---|---| |lvgl-vs-simu|√|√| |swm320|√|√| |Board|bsp|arm-2d| |---|---|---| |QEMU-arm2d|√|√| |Board|bsp|LED|KEY| |---|---|---|---| |SmartLoong|√|√|√|√| ## OS support |OS|port|GPIO|TIME|PWM| |---|---|---|---|---| |RT-Thread|√|√|√|√| |vsf|√|√| | | |OS|port|Google Test|Benchmark| |---|---|---|---| |linux|√|√|√| # 3.Characteristic ### (1)Run environment Support run in mcu without OS or file system. Can run in everywhere with **RAM ≥ 4kB** and **FLASH ≥ 64kB**,such as stm32g030, stm32f103c8t6,esp8266. ### (2)Develop enviroment #### Support REPL by serial.No open issues yet, or sync has not completed.