2021-10-07 09:02:09 +08:00
|
|
|
|
|
2021-09-23 00:19:27 +08:00
|
|
|
|
<img align="left" src="https://emojis.slackmojis.com/emojis/images/1563480763/5999/meow_party.gif" width="60" height="60"/>
|
|
|
|
|
|
2021-10-10 12:18:30 +08:00
|
|
|
|
[![CI](https://github.com/pikasTech/pikascript/actions/workflows/CI.yml/badge.svg)](https://github.com/pikasTech/pikascript/actions/workflows/CI.yml)
|
2021-10-09 10:33:03 +08:00
|
|
|
|
|
2021-09-23 00:21:00 +08:00
|
|
|
|
# 来颗Star求求了~ Star please~
|
2021-11-18 13:36:08 +08:00
|
|
|
|
|
|
|
|
|
![QQ截图20211118133254](https://user-images.githubusercontent.com/88232613/142357922-faf6b13a-8dd7-4076-b88d-e1ac335dc79e.png)
|
2021-09-23 00:16:49 +08:00
|
|
|
|
|
2021-10-24 00:05:52 +08:00
|
|
|
|
# 1.简介
|
|
|
|
|
|
|
|
|
|
PikaScript是一个完全重写的超轻量级python引擎,零依赖,零配置,可以在少于4KB的RAM下运行(如stm32g030c8和stm32f103c8),极易部署和扩展。
|
|
|
|
|
|
2021-11-13 15:51:26 +08:00
|
|
|
|
大量的中文文档、视频资料。
|
|
|
|
|
|
2021-10-24 00:05:52 +08:00
|
|
|
|
![output_Kgj52R](https://user-images.githubusercontent.com/88232613/132940452-d07d766c-5aa7-4187-96f2-66b02984e82c.gif)
|
|
|
|
|
|
|
|
|
|
<img src="https://user-images.githubusercontent.com/88232613/137866679-642e4e74-c373-4880-9d97-20dfefeafc18.png" width="500"/>
|
|
|
|
|
|
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/138021445-13643518-b0a3-4872-a290-5dec27697837.png)
|
|
|
|
|
|
2021-11-09 13:32:55 +08:00
|
|
|
|
# 获取PikaScript:
|
|
|
|
|
|
|
|
|
|
## 使用Pika包管理器[PikaPackage.exe](../../raw/master/tools/pikaPackageManager/pikaPackage.exe)
|
|
|
|
|
|
|
|
|
|
1. 直接运行[PikaPackage.exe](../../raw/master/tools/pikaPackageManager/pikaPackage.exe), 自动下载并更新pikaScript主仓库(文件在当前磁盘的/tmp/pikaScript文件夹)
|
|
|
|
|
|
|
|
|
|
2. 将[requestment.txt](/bsp/stm32g030c8/pikascript/requestment.txt)放在[PikaPackage.exe](../../raw/master/tools/pikaPackageManager/pikaPackage.exe)同一文件夹下, 运行[pikaPackage.exe](../../raw/master/tools/pikaPackageManager/pikaPackage.exe), 自动在当前目录下安装[内核](../../tree/master/src)、[预编译器](../../tree/master/tools/pikaCompiler)与[模块](../../tree/master/package)。
|
|
|
|
|
|
|
|
|
|
3. 已发布的模块列表:[packages.toml](/packages.toml)
|
|
|
|
|
|
2021-11-11 15:02:32 +08:00
|
|
|
|
# 快速上手
|
2021-11-11 14:42:59 +08:00
|
|
|
|
|
2021-11-11 15:02:32 +08:00
|
|
|
|
可使用[仿真工程](document/1.三分钟快速上手.md)快速上手,无需硬件,也可以使用官方支持的开发板[Pika派—Zero](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4023-23991764790.10.16f97c58fsLjVk&id=654947372034),上手即玩。
|
2021-11-11 14:42:59 +08:00
|
|
|
|
|
2021-11-11 15:02:32 +08:00
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/141252834-93011ca7-f84b-4192-8e61-0e242796f62c.png)
|
2021-11-11 14:42:59 +08:00
|
|
|
|
|
2021-11-11 15:02:32 +08:00
|
|
|
|
开发板基于STM32G030C8T6小资源MCU,仅64kB Flash,8kB RAM即可运行完整解释器,和完整的外设驱动(GPIO、TIME、IIC、RGB、KEY、LCD、RGB)。板载CH340 USB转串口芯片,Type-C接口,支持串口下载python脚本,板载4颗RGB灯,可选配[LCD屏幕](https://item.taobao.com/item.htm?spm=a1z10.3-c.w4002-23991764791.12.16f97c58fsLjVk&id=660745643102)。
|
2021-11-11 14:42:59 +08:00
|
|
|
|
|
2021-10-23 23:48:33 +08:00
|
|
|
|
# 视频教程
|
|
|
|
|
|
2021-11-17 17:28:28 +08:00
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/142173892-35e33f36-413c-4422-8470-b873b7c3bd71.png)
|
|
|
|
|
|
2021-10-23 23:48:33 +08:00
|
|
|
|
## 入门篇 - 面向单片机Python编程用户
|
|
|
|
|
|
|
|
|
|
[PikaScript入门-单片机python编程和环境配置](https://www.bilibili.com/video/BV1mg411L72e)
|
|
|
|
|
|
2021-11-06 10:12:55 +08:00
|
|
|
|
[Pika派开发板手把手单片机python编程01——模块安装和GPIO类](https://www.bilibili.com/video/BV1kg411K7W2)
|
|
|
|
|
|
2021-11-13 21:28:51 +08:00
|
|
|
|
[Pika派开发板手把手单片机python编程02——固件升级](https://www.bilibili.com/video/BV1c44y1v7Jd)
|
|
|
|
|
|
|
|
|
|
[Pika派开发板手把手单片机python编程03——固件启动方式](https://www.bilibili.com/video/BV1xY411x7Uf)
|
|
|
|
|
|
2021-10-23 23:48:33 +08:00
|
|
|
|
## 中级篇 - 面向驱动开发者
|
|
|
|
|
|
2021-11-13 21:30:58 +08:00
|
|
|
|
[PikaScript中级 部署PikaScript RISC-V CH32V103R8](https://www.bilibili.com/video/BV1Cq4y1G7Tj)
|
2021-10-23 23:48:33 +08:00
|
|
|
|
|
2021-11-13 21:30:58 +08:00
|
|
|
|
[PikaScript中级 部署PikaScript 国产MCU CM32M101A](https://www.bilibili.com/video/BV1jv411u7EJ)
|
2021-10-25 11:35:13 +08:00
|
|
|
|
|
2021-10-28 23:38:26 +08:00
|
|
|
|
[PikaScript中级 驱动模块开发01 最简单的模块](https://www.bilibili.com/video/BV1aP4y1L7pi)
|
2021-10-28 22:39:04 +08:00
|
|
|
|
|
|
|
|
|
[PikaScript中级 驱动模块开发02 CH32V103 LED](https://www.bilibili.com/video/BV1Jr4y117Z8)
|
|
|
|
|
|
2021-10-23 23:48:33 +08:00
|
|
|
|
## 进阶篇 - 面向编译器爱好者和开源项目维护者
|
|
|
|
|
|
|
|
|
|
[PikaScript进阶-字节码与虚拟机](https://www.bilibili.com/video/BV1J3411y7tX/)
|
|
|
|
|
|
|
|
|
|
[PikaScript进阶-Github自动测试-Github Actions CI](https://www.bilibili.com/video/BV1o3411C76q/)
|
|
|
|
|
|
|
|
|
|
[PikaScript进阶-Googletest测试框架](https://www.bilibili.com/video/BV1UF411Y7Z6/)
|
|
|
|
|
|
|
|
|
|
[PikaScript进阶-数据结构源码精讲](https://www.bilibili.com/video/BV1Ky4y157nW/)
|
2021-10-06 08:08:08 +08:00
|
|
|
|
|
2021-11-09 13:32:55 +08:00
|
|
|
|
# 开发手册
|
2021-10-03 19:20:02 +08:00
|
|
|
|
|
2021-11-09 13:32:55 +08:00
|
|
|
|
[1. PikaScript-三分钟快速上手](document/1.三分钟快速上手.md)
|
2021-10-03 19:20:20 +08:00
|
|
|
|
|
2021-11-09 13:32:55 +08:00
|
|
|
|
[2. PikaScript-架构与原理](https://mp.weixin.qq.com/s?__biz=MzU4NzUzMDc1OA==&mid=2247484127&idx=1&sn=f66cff49c488e48c52570c7bb570328f&chksm=fdebd5b6ca9c5ca0707fd221c32f3ad63e94aeb6f917a92774b89ea042381ea261990f5cca3c&token=2045971639&lang=zh_CN#rd)
|
2021-10-03 19:20:02 +08:00
|
|
|
|
|
2021-11-16 23:50:21 +08:00
|
|
|
|
[3. PikaScript-十分钟快速部署](document/2.十分钟快速部署.md)
|
2021-10-05 09:58:39 +08:00
|
|
|
|
|
2021-11-09 13:32:55 +08:00
|
|
|
|
[4. PikaScript-标准开发流程](document/3.PikaScript标准开发流程.md)
|
|
|
|
|
|
|
|
|
|
[5. PikaScript-Demo展示](document/5.我就要用最便宜的单片机来跑python,还要用Keil开发,怎么地吧.md)
|
|
|
|
|
|
|
|
|
|
[6. Arm-2D GUI引擎和pikascript联合仿真](document/6.用Python玩ARM%202D,认真的嘛.md)
|
2021-10-03 19:11:56 +08:00
|
|
|
|
|
2021-10-01 09:13:31 +08:00
|
|
|
|
## 文件目录
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[src](../../tree/master/src) - 内核源码
|
2021-10-04 01:13:45 +08:00
|
|
|
|
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[bsp](../../tree/master/bsp) - 裸机芯片/板卡支持
|
2021-10-04 01:13:45 +08:00
|
|
|
|
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[port](../../tree/master/port) - 操作系统支持
|
2021-10-01 09:13:43 +08:00
|
|
|
|
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[document](../../tree/master/document) - 开发文档
|
2021-10-01 09:13:43 +08:00
|
|
|
|
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[examples](../../tree/master/examples) - 示例脚本
|
2021-10-01 09:13:43 +08:00
|
|
|
|
|
2021-10-04 01:21:48 +08:00
|
|
|
|
[package](../../tree/master/package) - 模块目录
|
2021-10-04 01:14:52 +08:00
|
|
|
|
|
2021-10-04 09:42:46 +08:00
|
|
|
|
[pikaCompiler](../../tree/master/tools/pikaCompiler) - 使用rust编写的预编译器
|
2021-10-01 09:13:43 +08:00
|
|
|
|
|
2021-10-04 09:42:46 +08:00
|
|
|
|
[pikaPackageManager](../../tree/master/tools/pikaPackageManager) - 使用go编写的模块管理器
|
2021-09-23 00:17:12 +08:00
|
|
|
|
|
2021-09-18 22:14:31 +08:00
|
|
|
|
# 2.驱动适配进度
|
2021-11-02 09:51:31 +08:00
|
|
|
|
|MCU/Board|bsp|gpio|uart|pwm|adc|i2c|spi|rgb|oled|
|
|
|
|
|
|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|[PikaPi Zero](https://item.taobao.com/item.htm?spm=a230r.1.14.1.4f2e27a8R0qWJn&id=654947372034&ns=1&abbucket=15#detail)|√|√|√|√|√|√| |√|√|
|
|
|
|
|
|stm32g030c8|√|√|√|√|√|√| | | |
|
|
|
|
|
|stm32g070cB|√|√|√|√|√| | | | |
|
|
|
|
|
|stm32f103c8|√|√|√|√|√| | | | |
|
2021-11-02 09:54:39 +08:00
|
|
|
|
|ch32v103r8t6|√|√| | | | | | | |
|
2021-11-02 09:51:31 +08:00
|
|
|
|
|cm32m101a|√| | | | | | | | |
|
2021-09-18 22:14:17 +08:00
|
|
|
|
# 3.特性
|
2021-09-07 08:55:06 +08:00
|
|
|
|
### (1)运行环境
|
2021-09-07 08:54:06 +08:00
|
|
|
|
|
2021-09-07 19:03:58 +08:00
|
|
|
|
支持裸机运行,可运行于 **RAM ≥ 4kB** ,**FLASH ≥ 32kB** 的mcu中,如stm32g030, stm32f103c8t6,esp8266。
|
2021-08-26 16:28:09 +08:00
|
|
|
|
|
2021-09-07 08:55:06 +08:00
|
|
|
|
### (2)开发环境
|
2021-09-27 11:27:11 +08:00
|
|
|
|
支持串口下载Python脚本。
|
|
|
|
|
|
2021-09-27 11:28:35 +08:00
|
|
|
|
<img src="https://user-images.githubusercontent.com/88232613/134841230-85de6734-8467-4245-93a5-d452b5022b42.gif" width="400" alt="微信交流群"/><br/>
|
2021-09-07 08:54:06 +08:00
|
|
|
|
|
2021-09-06 22:48:51 +08:00
|
|
|
|
支持Keil、IAR、rt-thread studio、segger embedded studio等IDE开发。
|
|
|
|
|
|
|
|
|
|
支持CMake、makeFile、Scons等构建工具
|
2021-09-06 20:22:17 +08:00
|
|
|
|
|
2021-09-06 20:29:42 +08:00
|
|
|
|
零依赖,零配置,开箱即用,极易集成进已有的C工程。
|
2021-09-06 20:26:35 +08:00
|
|
|
|
|
2021-09-06 20:25:49 +08:00
|
|
|
|
极易拓展自定义的C原生函数。
|
|
|
|
|
|
2021-09-07 08:54:06 +08:00
|
|
|
|
支持跨平台,可在linux环境开发内核。
|
|
|
|
|
|
2021-09-07 08:55:06 +08:00
|
|
|
|
### (3)语法特性
|
2021-09-07 08:54:06 +08:00
|
|
|
|
|
2021-08-27 10:15:35 +08:00
|
|
|
|
使用python3标准语法的子集。
|
|
|
|
|
|
2021-10-04 09:42:46 +08:00
|
|
|
|
在编译时支持python类和方法定义,完整支持封装、继承、多态、模块功能 - 基于[Pika预编译器](../../tree/master/tools/pikaCompiler)。
|
2021-08-27 10:11:19 +08:00
|
|
|
|
|
2021-10-04 09:42:46 +08:00
|
|
|
|
在运行时支持python方法调用、变量定义、对象构造、对象释放、控制流(if\while) - 基于[Pika运行时内核](../../tree/master/src/package/pikascript/pikascript-core)。
|
2021-08-09 09:45:59 +08:00
|
|
|
|
|
2021-10-25 16:18:23 +08:00
|
|
|
|
|语法|编译时|运行时|
|
|
|
|
|
|---|---|---|
|
|
|
|
|
|类定义|√| |
|
|
|
|
|
|类继承|√| |
|
2021-11-02 10:33:26 +08:00
|
|
|
|
|方法定义|√|√|
|
|
|
|
|
|方法重载|√|√|
|
2021-10-25 16:18:23 +08:00
|
|
|
|
|方法调用|√|√|
|
|
|
|
|
|模块导入|√|√|
|
|
|
|
|
|参数定义|√|√|
|
|
|
|
|
|参数赋值|√|√|
|
|
|
|
|
|对象新建|√|√|
|
|
|
|
|
|对象销毁|√|√|
|
|
|
|
|
|对象嵌套|√|√|
|
|
|
|
|
|
2021-10-25 16:19:35 +08:00
|
|
|
|
#### 操作符
|
2021-10-25 16:18:23 +08:00
|
|
|
|
|
2021-11-02 10:35:51 +08:00
|
|
|
|
| + | - | * | / | == | > | < | >= | <= |
|
|
|
|
|
|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|√|√|√|√|√|√|√| | |
|
2021-10-25 16:18:23 +08:00
|
|
|
|
|
2021-10-25 16:19:35 +08:00
|
|
|
|
#### 控制流
|
2021-10-25 16:18:23 +08:00
|
|
|
|
|
|
|
|
|
|if|while|for|
|
|
|
|
|
|--- |--- |--- |
|
|
|
|
|
|√|√| |
|
|
|
|
|
|
2021-09-07 08:55:06 +08:00
|
|
|
|
### (4)源码规范
|
2021-08-02 14:03:52 +08:00
|
|
|
|
|
2021-09-06 20:32:46 +08:00
|
|
|
|
注重源码可读性,命名规范,标准统一,完全不使用宏,几乎不使用全局变量。
|
2021-08-05 13:54:12 +08:00
|
|
|
|
|
2021-08-26 16:28:09 +08:00
|
|
|
|
完整的googletest单元测试。
|
2021-08-05 13:54:12 +08:00
|
|
|
|
|
2021-10-06 08:07:12 +08:00
|
|
|
|
# 4.交流与技术支持:
|
2021-08-05 14:20:07 +08:00
|
|
|
|
|
2021-10-02 08:49:35 +08:00
|
|
|
|
## 微信交流群
|
2021-09-09 21:06:10 +08:00
|
|
|
|
|
2021-10-02 08:49:35 +08:00
|
|
|
|
![微信截图_20210917133247](https://user-images.githubusercontent.com/88232613/133729804-e1d0406b-a859-4ebc-b335-477e9c03810e.png)
|
|
|
|
|
|
|
|
|
|
### 群已经满啦,加我QQ拉你进群~ qq: 645275593
|
2021-08-05 14:23:22 +08:00
|
|
|
|
|
2021-08-30 10:36:07 +08:00
|
|
|
|
## Tencent QQ: 645275593
|
|
|
|
|
|
2021-10-23 23:49:40 +08:00
|
|
|
|
## Tencent QQ Group:
|
|
|
|
|
|
|
|
|
|
<img src="https://user-images.githubusercontent.com/88232613/136304186-e49610e4-ce01-4524-99b6-b56842d56411.png" width="300" alt="微信交流群"/><br/>
|
|
|
|
|
|
2021-08-30 10:36:07 +08:00
|
|
|
|
## E-mail: 645275593@qq.com
|
|
|
|
|
|
2021-10-06 08:07:12 +08:00
|
|
|
|
# 5.贡献者
|
2021-09-09 20:37:30 +08:00
|
|
|
|
| 内容 | 贡献者 |
|
|
|
|
|
| --- | --- |
|
2021-11-02 09:46:32 +08:00
|
|
|
|
| 基于QEMU的ARM-2D仿真工程 | [liuduanfei](https://github.com/liuduanfei) |
|
2021-10-10 09:54:24 +08:00
|
|
|
|
| 捐赠:GD32E103TB芯片2片 | 信息牛(微信名) |
|
2021-10-10 09:53:43 +08:00
|
|
|
|
| Rt-thread 支持包模板| [Meco Jianting Man](https://github.com/mysterywolf) |
|
2021-10-05 09:05:47 +08:00
|
|
|
|
| 捐赠:移远EC600S-CN 4G模块 | 移远模块 |
|
2021-09-28 18:39:40 +08:00
|
|
|
|
| 捐赠:博流BL706 开发板|博流智能 [bouffalolab](https://github.com/bouffalolab)|
|
2021-09-22 11:45:01 +08:00
|
|
|
|
| 捐赠:中国移动CM32M101A 开发板| 孟巍(微信名) |
|
2021-09-13 15:07:12 +08:00
|
|
|
|
| 捐赠:APM32F030R8 开发板 | 极海半导体 陈成 |
|
|
|
|
|
| 捐赠:APM32E103VB 开发板 | 极海半导体 陈成 |
|
2021-09-13 18:16:02 +08:00
|
|
|
|
| 捐赠:APEX-Link仿真器 | 极海半导体 陈成 |
|
2021-09-24 16:06:34 +08:00
|
|
|
|
| 源码格式化,增加git属性文件 | [Meco Jianting Man](https://github.com/mysterywolf) |
|
2021-09-13 15:07:12 +08:00
|
|
|
|
| demo/simulation-keil | 千帆(微信名) |
|
2021-09-09 20:36:51 +08:00
|
|
|
|
| demo/stm32f103zet6/demo01-led-stm32f103zet6 | [甜航](https://github.com/easyzoom) |
|
2021-09-09 20:38:11 +08:00
|
|
|
|
| demo/stm32f103zet6/demo02-led-stm32f103zet6_tworoot | [甜航](https://github.com/easyzoom) |
|
2021-09-09 20:38:45 +08:00
|
|
|
|
| demo/stm32f407zgt/demo01-led-stm32f407vgt | [甜航](https://github.com/easyzoom) |
|
2021-09-13 15:07:12 +08:00
|
|
|
|
|
2021-10-06 08:07:12 +08:00
|
|
|
|
# 6.内核测试与开发
|
2021-09-13 15:07:12 +08:00
|
|
|
|
|
2021-10-01 09:09:43 +08:00
|
|
|
|
## linux下测试pikascript内核(推荐ubuntu20.04):
|
|
|
|
|
|
|
|
|
|
step1: 拉取项目
|
|
|
|
|
``` shell
|
2021-10-01 09:10:17 +08:00
|
|
|
|
git clone https://github.com/pikastech/pikascript
|
2021-10-04 09:42:46 +08:00
|
|
|
|
cd pikascript/src
|
2021-10-01 09:09:43 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
step2: 编译项目
|
|
|
|
|
```
|
|
|
|
|
sh init.sh # 第一次编译前运行,之后就不用运行了
|
|
|
|
|
sh make.sh # 编译项目
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
step3: 运行单元测试
|
|
|
|
|
``` shell
|
|
|
|
|
sh test.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
step4: 运行基准测试
|
|
|
|
|
``` shell
|
|
|
|
|
sh test-banchmark.sh
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
step5: 运行demo
|
|
|
|
|
``` shell
|
2021-10-04 09:42:46 +08:00
|
|
|
|
./build/src/boot/demo06-pikamain/pikascript_demo06-pikamain
|
2021-10-01 09:09:43 +08:00
|
|
|
|
```
|
|
|
|
|
|
2021-10-10 09:51:42 +08:00
|
|
|
|
# 7.Demo展示
|
2021-09-13 09:47:39 +08:00
|
|
|
|
|
|
|
|
|
## Demo 01 万物起源点个灯
|
|
|
|
|
|
|
|
|
|
![mmexport1631351506111](https://user-images.githubusercontent.com/88232613/132943903-b3558929-a107-4a99-bdc4-1b3fd3f7172b.png)
|
|
|
|
|
|
|
|
|
|
![Hnet-image (2)](https://user-images.githubusercontent.com/88232613/132943428-f2b365ca-140e-42f4-936c-db6a7d9f8dee.gif)
|
|
|
|
|
|
|
|
|
|
## Demo 02 串口测试
|
|
|
|
|
|
|
|
|
|
![mmexport1631351902469](https://user-images.githubusercontent.com/88232613/132944132-90898355-de94-4d81-990b-7b85d4a4d08a.png)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![Hnet-image (3)](https://user-images.githubusercontent.com/88232613/132943365-0f7059b3-4f9d-4989-a5ec-2cce72b0cc96.gif)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Demo 03 读个ADC试试
|
|
|
|
|
|
|
|
|
|
![mmexport1631351527609](https://user-images.githubusercontent.com/88232613/132944180-a805c8f8-40d5-45ff-ae2a-a0fe8f9db1ab.png)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![mmexport1631351523907](https://user-images.githubusercontent.com/88232613/132944185-0a01b1ba-8cf7-4f9f-9d73-fe9cbcd52f0b.png)
|
|
|
|
|
|
|
|
|
|
|
2021-09-23 14:14:14 +08:00
|
|
|
|
## Demo 04 PWM输出
|
|
|
|
|
|
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/134461673-975498f4-09de-4f3a-866d-53e6fa1307b1.png)
|
|
|
|
|
|
|
|
|
|
## Demo 05 RGB流水灯
|
|
|
|
|
|
2021-09-23 14:16:08 +08:00
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/134461950-2153c738-0661-452f-956a-65a88fb71592.png)
|
|
|
|
|
|
2021-10-10 09:51:42 +08:00
|
|
|
|
这几个Demo占用的RAM最大值只有3.56K,把1K的堆栈也算上就是4.56K,Flash最大占用是30.4K,以STM32F103C8T6的20K RAM和64K Flash为标准,RAM才用掉不到25%,Flash才用掉不到50%。
|
2021-09-23 14:14:14 +08:00
|
|
|
|
|
2021-10-10 09:51:42 +08:00
|
|
|
|
我们可以简单对比一下micropython的常用芯片STM32F405RG和这次跑PikaScript的芯片STM32G070CB
|
2021-09-13 09:47:39 +08:00
|
|
|
|
|
|
|
|
|
## RAM资源对比
|
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/132944731-a55ece1d-061f-4b91-ba87-bd6547be96a7.png)
|
|
|
|
|
|
|
|
|
|
## Flash资源对比
|
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/132944745-e9cf598d-e75f-40bb-873e-911819d535b7.png)
|
|
|
|
|
|
|
|
|
|
## 参考价对比(以2021年9月11日立创商城10片售价为参考)
|
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/132944757-2b5cfda8-f93f-4456-8d7f-4e4767954056.png)
|
|
|
|
|
|
|
|
|
|
## 拓展能力如何呢?
|
|
|
|
|
|
|
|
|
|
除了设备驱动之外,为mcu开发自定义的python脚本绑定在pikascript的开发框架下非常轻松,下面两个Demo就是自定义的C模块拓展,这个Demo基于ARM-2D图像驱动库开发了一些python脚本接口。
|
|
|
|
|
|
|
|
|
|
## 几个小方块~
|
|
|
|
|
![Hnet-image (7)](https://user-images.githubusercontent.com/88232613/132945282-bfd310df-8063-456d-b90c-6b798a2c8ed5.gif)
|
|
|
|
|
|
|
|
|
|
## 几个旋转太阳~
|
|
|
|
|
![Hnet-image (6)](https://user-images.githubusercontent.com/88232613/132945107-e473a2cc-9fbc-47f9-aaed-a28d3ad1048c.gif)
|
|
|
|
|
|