2021-08-25 14:10:49 +08:00
|
|
|
|
## 开发手册
|
2021-08-25 15:36:10 +08:00
|
|
|
|
[PikaScript-三分钟快速上手](doc/1.%E4%B8%89%E5%88%86%E9%92%9F%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B.md)
|
2021-08-25 14:08:04 +08:00
|
|
|
|
|
2021-08-25 14:10:49 +08:00
|
|
|
|
## stm32例程
|
2021-08-25 14:05:41 +08:00
|
|
|
|
[pikascript-stm32-demo](../../../pikascript-demo-stm32)
|
2021-08-19 08:30:41 +08:00
|
|
|
|
|
2021-08-05 14:25:01 +08:00
|
|
|
|
# 1.简介
|
2021-08-14 15:08:28 +08:00
|
|
|
|
pikascript可以为mcu裸机c开发提供面向对象的脚本绑定。
|
2021-08-02 14:03:52 +08:00
|
|
|
|
|
2021-08-22 15:22:14 +08:00
|
|
|
|
支持裸机运行,可运行于内存8Kb以上的mcu中,如stm32f103c8t6,esp32。
|
2021-08-02 14:03:52 +08:00
|
|
|
|
|
2021-08-09 09:45:59 +08:00
|
|
|
|
|
2021-08-10 11:16:22 +08:00
|
|
|
|
支持跨平台,可在linux环境开发、测试内核。
|
2021-08-02 14:03:52 +08:00
|
|
|
|
|
2021-08-05 13:54:12 +08:00
|
|
|
|
开箱即用,零配置,仅使用C标准库,几乎不使用宏,几乎不使用全局变量。
|
|
|
|
|
|
|
|
|
|
完整的单元测试。
|
|
|
|
|
|
2021-08-25 20:29:27 +08:00
|
|
|
|
栈空间少量占用,内存信息可观测。
|
2021-08-05 13:54:12 +08:00
|
|
|
|
|
|
|
|
|
尽可能的结构清晰(尽我所能)。
|
2021-08-02 14:03:52 +08:00
|
|
|
|
|
2021-08-19 08:28:03 +08:00
|
|
|
|
# 2.stm32教程视频
|
2021-08-05 14:13:23 +08:00
|
|
|
|
|
2021-08-26 16:19:19 +08:00
|
|
|
|
[手把手PikaScript教程合集](https://www.bilibili.com/video/BV1mg411L72e)
|
2021-08-11 16:00:08 +08:00
|
|
|
|
|
2021-08-05 14:25:01 +08:00
|
|
|
|
# 3.原理解析:
|
2021-08-05 14:20:07 +08:00
|
|
|
|
|
2021-08-05 15:06:52 +08:00
|
|
|
|
## 架构示意图
|
2021-08-02 14:03:52 +08:00
|
|
|
|
![K9C)%CZO)X`8VFBKCE8(9@W](https://user-images.githubusercontent.com/88232613/127806449-b476b2fd-9f40-4c53-94a0-e1e965c046c3.png)
|
|
|
|
|
|
2021-08-26 16:20:24 +08:00
|
|
|
|
## 内核
|
2021-08-05 15:57:29 +08:00
|
|
|
|
|
2021-08-26 16:19:19 +08:00
|
|
|
|
[PiKaScript 运行时内核](https://github.com/mimilib/pikascript-core)
|
2021-08-05 15:57:29 +08:00
|
|
|
|
|
2021-08-26 16:20:24 +08:00
|
|
|
|
|
|
|
|
|
## 预编译器
|
|
|
|
|
|
|
|
|
|
[pikascript-compiler-Rust](https://github.com/mimilib/pikascript-compiler-rust)
|
|
|
|
|
|
2021-08-05 15:06:52 +08:00
|
|
|
|
## 解析文章
|
2021-08-25 17:08:54 +08:00
|
|
|
|
[单片机运行python脚本,不移植micropython也行吗?](https://mp.weixin.qq.com/s?__biz=MzU4NzUzMDc1OA==&mid=2247484127&idx=1&sn=f66cff49c488e48c52570c7bb570328f&chksm=fdebd5b6ca9c5ca0707fd221c32f3ad63e94aeb6f917a92774b89ea042381ea261990f5cca3c&token=2045971639&lang=zh_CN#rd)
|
2021-08-05 14:20:07 +08:00
|
|
|
|
|
2021-08-05 15:06:52 +08:00
|
|
|
|
## 微信交流群
|
2021-08-25 17:11:05 +08:00
|
|
|
|
![微信图片_20210825171046](https://user-images.githubusercontent.com/88232613/130763024-c57106f5-0d46-43d8-99e3-c331ae2594b5.jpg)
|
2021-08-05 14:23:22 +08:00
|
|
|
|
|
2021-08-05 15:06:52 +08:00
|
|
|
|
## 官方公众号
|
2021-08-05 14:23:22 +08:00
|
|
|
|
![image](https://user-images.githubusercontent.com/88232613/128301451-f0cdecea-6457-4925-b084-42e7796a856e.png)
|
|
|
|
|
|
2021-08-05 14:25:01 +08:00
|
|
|
|
# 4.内核测试与开发
|
2021-08-05 14:23:22 +08:00
|
|
|
|
|
2021-08-20 18:37:17 +08:00
|
|
|
|
## linux下测试pikascript内核(推荐ubuntu20.04):
|
2021-08-03 22:47:42 +08:00
|
|
|
|
|
|
|
|
|
step1: 拉取项目
|
|
|
|
|
``` shell
|
2021-08-20 18:36:10 +08:00
|
|
|
|
git clone https://github.com/mimilib/pikascript
|
2021-08-22 10:18:41 +08:00
|
|
|
|
cd PikaScript
|
2021-08-03 22:47:42 +08:00
|
|
|
|
```
|
|
|
|
|
|
2021-08-26 16:23:12 +08:00
|
|
|
|
step2: 编译项目
|
2021-08-03 22:47:42 +08:00
|
|
|
|
```
|
|
|
|
|
sh init.sh # 第一次编译前运行,之后就不用运行了
|
|
|
|
|
sh make.sh # 编译项目
|
|
|
|
|
```
|
|
|
|
|
|
2021-08-26 16:23:12 +08:00
|
|
|
|
step3: 运行单元测试
|
2021-08-03 22:47:42 +08:00
|
|
|
|
``` shell
|
2021-08-26 16:23:12 +08:00
|
|
|
|
sh test
|
2021-08-03 22:47:42 +08:00
|
|
|
|
```
|
2021-08-04 18:48:26 +08:00
|
|
|
|
|
2021-08-26 16:23:12 +08:00
|
|
|
|
step4: 运行基准测试
|
|
|
|
|
``` shell
|
|
|
|
|
sh test-banchmark
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
step5: 运行demo
|
|
|
|
|
``` shell
|
|
|
|
|
./build/src/boot/demo06-pikamain/pikascript_demo06-pikamain
|
2021-08-26 16:24:03 +08:00
|
|
|
|
```
|
2021-08-26 16:23:12 +08:00
|
|
|
|
|
2021-08-26 16:23:47 +08:00
|
|
|
|
step6: 提交修改
|
|
|
|
|
``` shell
|
|
|
|
|
sh commit.sh
|
|
|
|
|
```
|