# pikapython **Repository Path**: vbcssc/pikapython ## Basic Information - **Project Name**: pikapython - **Description**: PikaPython 是一个完全重写的超轻量级python引擎,零依赖,零配置,可以在少于4KB的RAM下运行(如stm32g030c8和stm32f103c8),极易部署和扩展 - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: http://pikascript.com/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 233 - **Created**: 2023-09-20 - **Last Updated**: 2023-09-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
论坛 | 文档中心 | 视频 | 开发板 | BSP | 包管理器 | RT-Thread 软件包 | 参与贡献 | 商业合作
[](https://pikastech.github.io/pikapython/dev/bench/) # 1.简介 PikaPython 是一个完全重写的超轻量级 python 引擎,零依赖,零配置,可以在 **Flash ≤ 64KB,RAM≤ 4KB** 的平台下运行(如 stm32g030c8 和 stm32f103c8),极易部署和扩展,具有大量的中文文档和视频资料。 PikaPython 也称 PikaScript、PikaPy。
PikaPython 具有框架式 C 模块开发工具,只要用 Python 写好调用 API ,就能够自动连接到 C 模块,非常方便快捷。不用手动处理任何全局表、宏定义、等等。
所有的工具也是全部开源的,在 tools 目录下。

PikaPython 也支持 MDK、iar、RT-studio 等常见 ide 开发,能够轻松地调试 C 模块。
# 获取 PikaPython:
## 使用在线图形化工程生成器
生成器地址:
http://pikascript.com
[](http://pikascript.com)
## 使用 Pika 包管理器[PikaPackage.exe](https://pikadoc.readthedocs.io/zh/latest/%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E4%B8%8E%E6%A8%A1%E5%9D%97%E7%AE%A1%E7%90%86.html)
1. 直接运行[PikaPackage.exe](https://pikadoc.readthedocs.io/en/latest/%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E4%B8%8E%E6%A8%A1%E5%9D%97%E7%AE%A1%E7%90%86.html), 自动下载并更新pikapython主仓库(文件在当前磁盘的/tmp/pikapython文件夹)
2. 将[requestment.txt](/bsp/stm32g070cb/pikapython/requestment.txt)放在[PikaPackage.exe](https://pikadoc.readthedocs.io/en/latest/%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E4%B8%8E%E6%A8%A1%E5%9D%97%E7%AE%A1%E7%90%86.html)同一文件夹下, 运行[pikaPackage.exe](https://pikadoc.readthedocs.io/en/latest/%E5%8C%85%E7%AE%A1%E7%90%86%E5%99%A8%E4%B8%8E%E6%A8%A1%E5%9D%97%E7%AE%A1%E7%90%86.html), 自动在当前目录下安装[内核](../../tree/master/src)、[预编译器](../../tree/master/tools/pikaCompiler)与[模块](../../tree/master/package)。
3. 已发布的模块列表:[packages.toml](/packages.toml)
# 快速上手
可使用[仿真工程](document/1.三分钟快速上手.md)快速上手,无需硬件,也可以使用官方支持的开发板[Pika派—Zero](https://item.taobao.com/item.htm?spm=a2126o.success.result.1.76224831Y0X1gO&id=654947372034),上手即玩。
[Pika派python编程游玩指南](https://pikadoc.readthedocs.io/zh/latest/Pika%20%E6%B4%BE%E5%BC%80%E5%8F%91%E6%9D%BF%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B.html)
[](https://item.taobao.com/item.htm?spm=a2126o.success.result.1.76224831Y0X1gO&id=654947372034)
开发板基于 STM32G030C8T6 小资源 MCU,仅 64kB Flash,8kB RAM 即可运行完整解释器,和完整的外设驱动(GPIO、TIME、IIC、UART、ADC、PWM、RGB、KEY、LCD)。板载 CH340 USB 转串口芯片,Type-C 接口,支持串口下载 python 脚本,板载4颗 RGB 灯,可选配[LCD屏幕](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-23991764791.12.16f97c58fsLjVk&id=660745643102)。
# 开发手册
### [点此进入文档中心](https://pikadoc.readthedocs.io/zh/latest/index.html)

# 视频教程
### [点此进入视频中心](https://space.bilibili.com/5365336/channel/seriesdetail?sid=1034902)

# 交流论坛
### [点此进入论坛](https://whycan.com/f_55.html)

## 文件目录
[src](../../tree/master/src) - 内核源码
[bsp](../../tree/master/bsp) - 裸机芯片/板卡支持
[port](../../tree/master/port) - 操作系统和包管理器支持
[test](../../tree/master/port/linux/test) - 单元测试
[document](../../tree/master/document) - 开发文档
[examples](../../tree/master/examples) - 示例脚本
[package](../../tree/master/package) - 模块目录
[pikaCompiler](../../tree/master/tools/pikaCompiler) - 使用 rust 编写的预编译器
[pikaPackageManager](../../tree/master/tools/pikaPackageManager) - 使用 go 编写的模块管理器
# 2.平台支持列表
## 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 |√ | | | | | | | |
|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|√|√|√|
## 相关开源项目
- ▶️ [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)
# 3.特性
### (1)运行环境
支持裸机运行,可运行于 **RAM ≥ 4kB** ,**FLASH ≥ 64kB** 的mcu中,如stm32g030, stm32f103c8t6,esp8266。
### (2)开发环境
支持串口下载 Python 脚本。


|
| 千帆(微信名) |
|
| [ Meco Jianting Man](https://github.com/mysterywolf) | 




|
| [liuduanfei](https://github.com/liuduanfei) |
|
| [ sjy](https://gitee.com/shanjiayang) | 
|
| 沧御 |
|
| [versaloon](https://github.com/versaloon) | 
|
| 刘延(微信名) | 
|
| [GorgonMeducer](https://github.com/GorgonMeducer) | 



|
| [unsigned](https://gitee.com/unsigned0) | 
|
| [梦程MI](https://gitee.com/dreamcmi) | 

|
| [Maximilian Gerhardt](https://github.com/maxgerhardt) |
|
| [purewind7](https://gitee.com/purewind7) | 


|
| [ onceday](https://gitee.com/onceday) | 
|
| 贡献记录 | 贡献者 |
| --- | --- |
| Donate:500¥ | [hardsofttech](https://gitee.com/hardsofttech) |
| Donate:500¥ | [edmund_wz](https://gitee.com/edmund_wz) |
| Donate:500¥ | [Meco Jianting Man](https://github.com/mysterywolf) |
| Donate:500¥ | [hardsofttech](https://gitee.com/hardsofttech) |
| re module | [eglwang](https://gitee.com/eglwang) |
| PikaMath.Quaternion() | [purewind7](https://gitee.com/purewind7) |
| contrubute to PikaCV | [purewind7](https://gitee.com/purewind7) |
| xr806(openharmony) bsp |[sjy](https://gitee.com/shanjiayang)|
| ESP32 package |沧御|
| MM32F5277E9P package |[unsigned](https://gitee.com/unsigned0)|
| mm32f5277e9p BSP |[unsigned](https://gitee.com/unsigned0)|
| Add [CMSIS-PACK](https://pikadoc.readthedocs.io/en/latest/get-start_cmsis-pack.html) | [GorgonMeducer](https://github.com/GorgonMeducer) |
| donate: air32f103 board * 20 | 合宙 [xinxi204](https://gitee.com/xinxi204) |
| contrubute to PikaMath.Math() | [onceday](https://gitee.com/onceday) |
| add support for Unix Time | [onceday](https://gitee.com/onceday) |
| contrubute to PikaStdLib.String() | [purewind7](https://gitee.com/purewind7) |
| Add [PLOOC](https://github.com/GorgonMeducer/PLOOC) support for pikapython Core | [GorgonMeducer](https://github.com/GorgonMeducer) |
| Donate:500¥ (ctypes 相关) | 蒋太平 |
| fix linux install script | [Maximilian Gerhardt](https://github.com/maxgerhardt) |
| ch582 package | [梦程MI](https://gitee.com/dreamcmi) |
| ch582 BSP | [梦程MI](https://gitee.com/dreamcmi) |
| Donate:EC600X QuecPython Develop board| 移远通信 武加玉 |
| Performance Point: 900->1400 | [GorgonMeducer](https://github.com/GorgonMeducer) |
| stm32f051r8 BSP |[unsigned](https://gitee.com/unsigned0)|
| stm32f407ze BSP |[unsigned](https://gitee.com/unsigned0)|
| devc BSP |[unsigned](https://gitee.com/unsigned0)|
| TC264D BSP |[unsigned](https://gitee.com/unsigned0)|
| PikaVM improvement | [GorgonMeducer](https://github.com/GorgonMeducer) |
| W801Device package | 刘延(微信名) |
| W806 bsp | 刘延(微信名) |
| Donate:ESP32C3 5pic,linker|启明云端 沧御|
| Donate:LS1C101 mcu 10pic, LS1c101 develop board,debuger|龙芯俱乐部 石南|
| PikaVSF OS package | [versaloon](https://github.com/versaloon) |
| ESP32C3 BSP |沧御|
| Donate:ESP32 board、ink lcd*4 | name(微信名) |
| Donate:smartloong board | 龙芯俱乐部 石南 |
| package/STM32F1 | [sjy](https://gitee.com/shanjiayang) |
| package/STM32F103RBBooter | [sjy](https://gitee.com/shanjiayang) |
| bsp/stm32f103rb | [sjy](https://gitee.com/shanjiayang) |
| QEMU ARM-2D simulation proejct | [liuduanfei](https://github.com/liuduanfei) |
| Donate:GD32E103TB2 2 pic | 信息牛(微信名) |
| Rt-thread bsp、port、module| [Meco Jianting Man](https://github.com/mysterywolf) |
| Donate:EC600S-CN 4G| 移远模块 |
| Donate:BL706 board|博流智能 [bouffalolab](https://github.com/bouffalolab)|
| Donate:CM32M101A 开发板| 孟巍(微信名) |
| Donate:APM32F030R8 board | 极海半导体 陈成 |
| Donate:APM32E103VB board | 极海半导体 陈成 |
| Donate:APEX-Link| 极海半导体 陈成 |
| corde format,add gitattributes| [Meco Jianting Man](https://github.com/mysterywolf) |
| demo/simulation-keil | 千帆(微信名) |
| demo/stm32f103zet6/demo01-led-stm32f103zet6 | [甜航](https://github.com/easyzoom) |
| demo/stm32f103zet6/demo02-led-stm32f103zet6_tworoot | [甜航](https://github.com/easyzoom) |
| demo/stm32f407zgt/demo01-led-stm32f407vgt | [甜航](https://github.com/easyzoom) |