From 5d616dcf1b0265175417c055b90e93a14387c76e Mon Sep 17 00:00:00 2001 From: Neucrack Date: Thu, 9 May 2024 17:54:01 +0800 Subject: [PATCH] update maixpy doc --- README.md | 4 +- docs/doc/en/basic/maixvision.md | 6 +- docs/doc/en/projects/README.md | 38 ++++ docs/doc/en/projects/line_tracking_robot.md | 5 + docs/doc/en/sidebar.yaml | 226 +++++++++++--------- docs/doc/en/source_code/build.md | 26 ++- docs/doc/zh/basic/maixvision.md | 7 +- docs/doc/zh/projects/README.md | 41 ++++ docs/doc/zh/projects/line_tracking_robot.md | 5 + docs/doc/zh/sidebar.yaml | 224 ++++++++++--------- docs/doc/zh/source_code/build.md | 28 ++- 11 files changed, 392 insertions(+), 218 deletions(-) create mode 100644 docs/doc/en/projects/README.md create mode 100644 docs/doc/en/projects/line_tracking_robot.md create mode 100644 docs/doc/zh/projects/README.md create mode 100644 docs/doc/zh/projects/line_tracking_robot.md diff --git a/README.md b/README.md index 06b305ad..75b9c043 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,9 @@ And we provide new powerful hardware platform **[MaixCAM](https://wiki.sipeed.co | --- | --- | ------- | | - 1GHz RISC-V(Linux)/ARM A53
- 700MHz RISCV-V(RTOS)
- 25~300MHz 8051(LowPower) | 1Tops@INT8 NPU, support BF16
support YOLOv5 YOLOv8 etc.| 256MB DDR3 | -| Connecting | Peripheral | MultiMedia | Price | +| Connecting | Peripheral | MultiMedia | Buy | | ----------- | ----- | --- | ---- | -| USB2.0/WiFi6/BLE5.4 | IIC/PWM/SPI/UART/WDT/ADC | - 4M Camera
- 2.3" 552x368 Touchscreen
- H.264/H.265/MJPEG codec | [¥169/¥249](https://wiki.sipeed.com/store) | +| USB2.0/WiFi6/BLE5.4 | IIC/PWM/SPI/UART/WDT/ADC | - 4M Camera
- 2.3" 552x368 Touchscreen
- H.264/H.265/MJPEG codec | [Sipeed Official Store](https://wiki.sipeed.com/store) | Chip register level open, more detalils: [MaixCAM](https://wiki.sipeed.com/maixcam) diff --git a/docs/doc/en/basic/maixvision.md b/docs/doc/en/basic/maixvision.md index 13fc5d6b..636e84ea 100644 --- a/docs/doc/en/basic/maixvision.md +++ b/docs/doc/en/basic/maixvision.md @@ -4,12 +4,16 @@ title: MaixVision - MaixPy Programming + Graphical Block Programming ## Introduction -MaixVision is a developer programming tool specifically designed for the Maix ecosystem, supporting MaixPy programming and graphical block programming. It also supports online running, debugging, and real-time image preview, allowing the synchronization of the device display screen for easy debugging and development. +[MaixVision](https://wiki.sipeed.com/maixvision) is a developer programming tool specifically designed for the Maix ecosystem, supporting MaixPy programming and graphical block programming. It also supports online running, debugging, and real-time image preview, allowing the synchronization of the device display screen for easy debugging and development. It also supports packaging applications and installing them on devices, making it convenient for users to generate and install applications with a single click. Additionally, it integrates some handy development tools, such as file management, threshold editors, QR code generators, and more. +## Download + +Visit [MaixVision home page](https://wiki.sipeed.com/maixvision) to download. + ## Using MaixPy Programming and Online Running By following the steps in the [Quick Start](../README.md), we can easily use MaixPy programming and run programs online. diff --git a/docs/doc/en/projects/README.md b/docs/doc/en/projects/README.md new file mode 100644 index 00000000..ab3de069 --- /dev/null +++ b/docs/doc/en/projects/README.md @@ -0,0 +1,38 @@ +--- +title: Practical Projects with MaixPy, Introduction and Collection +--- + +## Introduction + +Here we provide some common practical project examples for community members to refer to and replicate for use. This also helps to inspire everyone to create more and better applications and projects. + +There are several ways to find projects implemented with MaixPy: + +## MaixPy Official Documentation + +You can find practical projects in the documentation on the left, such as "Line Following Car." + +If you have a good project or a recommended project, you can also contribute by adding it to the documentation. + + +## MaixHub Project Sharing Square + +Projects can be found in the [MaixHub Project Sharing](https://maixhub.com/share?type=project) section. + +High-quality shares will also be linked to the MaixPy official documentation. + +You can also share your project-making methods, which will receive official rewards (guaranteed) and cash tips from community members (usually, high-quality projects that meet urgent needs are more likely to be tipped). + +Recommend Projects: +* maixcam deploy yolov5s model: https://maixhub.com/share/23 + + + +## MaixHub App Sharing + +In addition to project sharing, you can also find directly runnable applications at the [MaixHub App Store](https://maixhub.com/app), some of which might be written in MaixPy. If the author has provided the source code or written detailed tutorials, these can also be referred to. + +Recommend Projects: +* Simple HTTP Streaming Server: https://maixhub.com/app/19 +* Desktop Computer Performance Monitor: https://maixhub.com/app/13 +* Safety Helmet Detection Model Application: https://maixhub.com/app/10 diff --git a/docs/doc/en/projects/line_tracking_robot.md b/docs/doc/en/projects/line_tracking_robot.md new file mode 100644 index 00000000..7b8f8458 --- /dev/null +++ b/docs/doc/en/projects/line_tracking_robot.md @@ -0,0 +1,5 @@ +--- +title: MaixPy Line Tracking Robot (/Car) +--- + + diff --git a/docs/doc/en/sidebar.yaml b/docs/doc/en/sidebar.yaml index c7ddc47c..3e228221 100644 --- a/docs/doc/en/sidebar.yaml +++ b/docs/doc/en/sidebar.yaml @@ -2,128 +2,144 @@ items: - file: README.md label: Quick Start - file: faq.md - label: FAQ + label: FAQ - label: Base -- file: basic/os.md - label: Burning system -- file: basic/app_usage.md - label: App uses -- file: basic/maixpy_upgrade.md - label: Update MaixPy -- file: basic/maixvision.md - label: MaixVision uses -- file: basic/python.md - label: Python syntax -- file: basic/linux_basic.md - label: Linux fundamentals -- file: basic/python_pkgs.md - label: Add python packages -- file: basic/app.md - label: Apps development + collapsed: false + items: + - file: basic/os.md + label: Burning system + - file: basic/app_usage.md + label: App uses + - file: basic/maixpy_upgrade.md + label: Update MaixPy + - file: basic/maixvision.md + label: MaixVision uses + - file: basic/python.md + label: Python syntax + - file: basic/linux_basic.md + label: Linux fundamentals + - file: basic/python_pkgs.md + label: Add python packages + - file: basic/app.md + label: Apps development - label: Basic images and algorithms -- file: vision/display.md - label: Screen uses -- file: vision/camera.md - label: Camera uses -- file: vision/image_ops.md - label: Image control -- file: vision/find_blobs.md - label: Finding color blocks -- file: vision/line_tracking.md - label: Line tracking -- file: vision/qrcode.md - label: QRcode identity -- file: vision/apriltag.md - label: AprilTag identity + items: + - file: vision/display.md + label: Screen uses + - file: vision/camera.md + label: Camera uses + - file: vision/image_ops.md + label: Image control + - file: vision/find_blobs.md + label: Finding color blocks + - file: vision/line_tracking.md + label: Line tracking + - file: vision/qrcode.md + label: QRcode identity + - file: vision/apriltag.md + label: AprilTag identity - label: AI Vision -- file: vision/ai.md - label: AI vision knowledge -- file: vision/classify.md - label: AI object classify -- file: vision/yolov5.md - label: YOLOv5 object detect -- file: vision/face_recognition.md - label: Face detect -- file: vision/body_key_points.md - label: Human critical point detection -- file: vision/self_learn_classifier.md - label: Self-learning classifier -- file: vision/self_learn_detector.md - label: Self-learning detector -- file: vision/object_track.md - label: Object tracking and counting -- file: vision/ocr.md - label: OCR -- file: vision/maixhub_train.md - label: MaixHub online AI training -- file: vision/custmize_model.md - label: Custom model + items: + - file: vision/ai.md + label: AI vision knowledge + - file: vision/classify.md + label: AI object classify + - file: vision/yolov5.md + label: YOLOv5 object detect + - file: vision/face_recognition.md + label: Face detect + - file: vision/body_key_points.md + label: Human critical point detection + - file: vision/self_learn_classifier.md + label: Self-learning classifier + - file: vision/self_learn_detector.md + label: Self-learning detector + - file: vision/object_track.md + label: Object tracking and counting + - file: vision/ocr.md + label: OCR + - file: vision/maixhub_train.md + label: MaixHub online AI training + - file: vision/custmize_model.md + label: Custom model - label: AI audio -- file: audio/record.md - label: Audio record -- file: audio/play.md - label: Play audio -- file: audio/classifier.md - label: AI voice classifier -- file: audio/keyword.md - label: Keyword recognize -- file: audio/recognize.md - label: Real-time voice recognize -- file: audio/synthesis.md - label: Speech synthesis + items: + - file: audio/record.md + label: Audio record + - file: audio/play.md + label: Play audio + - file: audio/classifier.md + label: AI voice classifier + - file: audio/keyword.md + label: Keyword recognize + - file: audio/recognize.md + label: Real-time voice recognize + - file: audio/synthesis.md + label: Speech synthesis - label: Video -- file: video/record.md - label: Video record -- file: video/play.md - label: Play video -- file: video/jpeg_streaming.md - label: JPEG stream -- file: video/rtsp.md - label: RTSP stream + items: + - file: video/record.md + label: Video record + - file: video/play.md + label: Play video + - file: video/jpeg_streaming.md + label: JPEG stream + - file: video/rtsp.md + label: RTSP stream - label: On-chip peripherals -- file: peripheral/gpio.md - label: GPIO -- file: peripheral/uart.md - label: UART -- file: peripheral/i2c.md - label: I2C -- file: peripheral/pwm.md - label: PWM -- file: peripheral/spi.md - label: SPI -- file: peripheral/wdt.md - label: WDT watchdog + items: + - file: peripheral/gpio.md + label: GPIO + - file: peripheral/uart.md + label: UART + - file: peripheral/i2c.md + label: I2C + - file: peripheral/pwm.md + label: PWM + - file: peripheral/spi.md + label: SPI + - file: peripheral/wdt.md + label: WDT watchdog - label: Off-chip modules -- file: modules/acc.md - label: Accelerometer -- file: modules/temp_hum.md - label: Temperature and humidity -- file: modules/tof.md - label: TOF -- file: modules/thermal_cam.md - label: Thermal imaging + items: + - file: modules/acc.md + label: Accelerometer + - file: modules/temp_hum.md + label: Temperature and humidity + - file: modules/tof.md + label: TOF + - file: modules/thermal_cam.md + label: Thermal imaging + +- label: Porjects + items: + - file: projects/README.md + label: Intro & Collection + - file: projects/line_tracking_robot.md + label: Line tracking robot - label: Advanced -- file: source_code/contribute.md - label: Contribute -- file: source_code/build.md - label: Build source code -- file: source_code/faq.md - label: MaixPy Source FAQ -- file: source_code/add_c_module.md - label: Write in C/C++ -- file: source_code/maixcdk.md - label: MaixCDK develop -- file: pro/compile_os.md - label: Build firmware + items: + - file: source_code/contribute.md + label: Contribute + - file: source_code/build.md + label: Build source code + - file: source_code/faq.md + label: MaixPy Source FAQ + - file: source_code/add_c_module.md + label: Write in C/C++ + - file: source_code/maixcdk.md + label: MaixCDK develop + - file: pro/compile_os.md + label: Build firmware diff --git a/docs/doc/en/source_code/build.md b/docs/doc/en/source_code/build.md index 4cb23aa9..02283ee2 100644 --- a/docs/doc/en/source_code/build.md +++ b/docs/doc/en/source_code/build.md @@ -5,14 +5,33 @@ title: MaixPy develop source code guide ## Get source code ```shell +mkdir -p ~/maix +cd ~/maix git clone https://github.com/sipeed/MaixPy -cd MaixPy ``` -## Build and pack to wheel +## Getting MaixCDK Source Code + +The MaixPy project depends on MaixCDK. You need to clone it first and place it in a directory on your computer (do not place it under the MaixPy directory). + +```shell +cd ~/maix +git clone https://github.com/sipeed/MaixCDK +``` + +Then, you need to set the environment variable MAIXCAK_PATH to specify the path to MaixCDK, which can be added in ~/.bashrc or ~/.zshrc (depending on your shell): + +```shell +export MAIXCAK_PATH=~/maix/MaixCDK +``` +Only after successfully setting the environment variable can MaixPy locate the MaixCDK source code. + + +## Build and pack to wheel ```shell +cd ~/maix/MaixPy python setup.py bdist_wheel maixcam ``` @@ -23,6 +42,9 @@ After build success, you will find wheel file in `dist` directory, use `pip inst > `python setup.py bdist_wheel maixcam --skip-build` will not execute build command and only pack wheel, so you can use `maixcdk menuconfig` and `maixcdk build` first to customize building. +> Additionally, if you are debugging APIs and need to install frequently, using pip can be slow. You can compile and then copy the maix directory directly to the /usr/lib/python3.11/site-packages directory on your device to overwrite the old files. + + ## Build manually ```shell diff --git a/docs/doc/zh/basic/maixvision.md b/docs/doc/zh/basic/maixvision.md index edd4fc64..61646146 100644 --- a/docs/doc/zh/basic/maixvision.md +++ b/docs/doc/zh/basic/maixvision.md @@ -5,12 +5,17 @@ title: MaixVision -- MaixPy 编程 + 图形化积木编程 ## 简介 -MaixVision 是专为 Maix 生态打造的一款开发者编程工具,支持 MaixPy 编程和图形化积木编程,同时支持在线运行和调试,以及实时预览图像,可以同步设备显示屏的图像,方便调试和开发。 +[MaixVision](https://wiki.sipeed.com/maixvision) 是专为 Maix 生态打造的一款开发者编程工具,支持 MaixPy 编程和图形化积木编程,同时支持在线运行和调试,以及实时预览图像,可以同步设备显示屏的图像,方便调试和开发。 以及支持打包应用和安装应用到设备,方便用户一键生成、安装应用。 同时还集成一些方便开发的小工具,比如文件管理,阈值编辑器,二维码生成等等。 +## 下载 + +访问 [MaixVision 主页](https://wiki.sipeed.com/maixvision) 下载。 + + ## 使用 MaixPy 编程和在线运行 按照[快速开始](../README.md)的步骤连接设备,我们可以很方便地使用 MaixPy 编程和在线运行。 diff --git a/docs/doc/zh/projects/README.md b/docs/doc/zh/projects/README.md new file mode 100644 index 00000000..f8459f91 --- /dev/null +++ b/docs/doc/zh/projects/README.md @@ -0,0 +1,41 @@ +--- +title: MaixPy 项目实战 介绍和汇总 +--- + +## 简介 + +这里提供一些常见的项目实战示例,方便社区成员可以参考复现使用,也方便激发大家的灵感做出更多更好的应用和项目出来。 + +要找到用 MaixPy 实现的相关的项目,有几种方式: + +## MaixPy 官方文档 + +也就是本文档左边目录可以找到的项目实战,比如`小车巡线`。 + +如果你有好的项目,或者好的项目推荐,也可以贡献文档添加进来。 + + +## MaixHub 项目分享广场 + + +在[MaixHub 项目分享](https://maixhub.com/share?type=project) 栏目可以找到项目分享。 + +有高质量的分享也会被链接到 MaixPy 官方文档。 + +你也可以分享你的项目制作方法,会获得官方(必获得)以及社区成员的现金打赏(通常高质量能解决急需需求的更容易被打赏)。 + + +推荐项目: +* maixcam部署yolov5s 自定义模型: https://maixhub.com/share/23 + + +## MaixHub 应用分享 + +除了项目分享以外,还可以在[MaixHub 应用商店](https://maixhub.com/app) 找到可以直接运行的应用,有部分应用可能是用 MaixPy 编写的,如果作者提供了源码或者写了详细的教程也都可以参考。 + + +推荐项目: + +* 简易HTTP串流服务器: https://maixhub.com/app/19 +* 桌面电脑性能监视器: https://maixhub.com/app/13 +* 安全帽检测模型应用: https://maixhub.com/app/10 diff --git a/docs/doc/zh/projects/line_tracking_robot.md b/docs/doc/zh/projects/line_tracking_robot.md new file mode 100644 index 00000000..06893cb9 --- /dev/null +++ b/docs/doc/zh/projects/line_tracking_robot.md @@ -0,0 +1,5 @@ +--- +title: MaixPy 小车巡线 +--- + + diff --git a/docs/doc/zh/sidebar.yaml b/docs/doc/zh/sidebar.yaml index def1a290..4152540b 100644 --- a/docs/doc/zh/sidebar.yaml +++ b/docs/doc/zh/sidebar.yaml @@ -5,125 +5,141 @@ items: label: FAQ 常见问题 - label: 基础 -- file: basic/os.md - label: 升级和烧录系统 -- file: basic/app_usage.md - label: 应用使用说明 -- file: basic/maixpy_upgrade.md - label: 更新 MaixPy -- file: basic/maixvision.md - label: MaixVision 使用 -- file: basic/python.md - label: Python 语法 -- file: basic/linux_basic.md - label: Linux 基础知识 -- file: basic/python_pkgs.md - label: 添加额外的 Python 包 -- file: basic/app.md - label: 应用开发和商店 + collapsed: false + items: + - file: basic/os.md + label: 升级和烧录系统 + - file: basic/app_usage.md + label: 应用使用说明 + - file: basic/maixpy_upgrade.md + label: 更新 MaixPy + - file: basic/maixvision.md + label: MaixVision 使用 + - file: basic/python.md + label: Python 语法 + - file: basic/linux_basic.md + label: Linux 基础知识 + - file: basic/python_pkgs.md + label: 添加额外的 Python 包 + - file: basic/app.md + label: 应用开发和商店 - label: 基础图像和算法 -- file: vision/display.md - label: 屏幕使用 -- file: vision/camera.md - label: 摄像头使用 -- file: vision/image_ops.md - label: 基本图像操作 -- file: vision/find_blobs.md - label: 寻找色块 -- file: vision/line_tracking.md - label: 寻找直线 -- file: vision/qrcode.md - label: 二维码识别 -- file: vision/apriltag.md - label: AprilTag 识别 + items: + - file: vision/display.md + label: 屏幕使用 + - file: vision/camera.md + label: 摄像头使用 + - file: vision/image_ops.md + label: 基本图像操作 + - file: vision/find_blobs.md + label: 寻找色块 + - file: vision/line_tracking.md + label: 寻找直线 + - file: vision/qrcode.md + label: 二维码识别 + - file: vision/apriltag.md + label: AprilTag 识别 - label: AI 视觉 -- file: vision/ai.md - label: AI 视觉基本知识 -- file: vision/classify.md - label: AI 物体分类 -- file: vision/yolov5.md - label: YOLOv5 物体检测 -- file: vision/face_recognition.md - label: 人脸识别 -- file: vision/body_key_points.md - label: 人体关键点检测 -- file: vision/self_learn_classifier.md - label: 自学习分类器 -- file: vision/self_learn_detector.md - label: 自学习检测器 -- file: vision/object_track.md - label: 物体轨迹跟踪和计数 -- file: vision/ocr.md - label: OCR 文字识别 -- file: vision/maixhub_train.md - label: MaixHub 在线 AI 模型训练 -- file: vision/custmize_model.md - label: 自定义(离线训练转换)模型 + items: + - file: vision/ai.md + label: AI 视觉基本知识 + - file: vision/classify.md + label: AI 物体分类 + - file: vision/yolov5.md + label: YOLOv5 物体检测 + - file: vision/face_recognition.md + label: 人脸识别 + - file: vision/body_key_points.md + label: 人体关键点检测 + - file: vision/self_learn_classifier.md + label: 自学习分类器 + - file: vision/self_learn_detector.md + label: 自学习检测器 + - file: vision/object_track.md + label: 物体轨迹跟踪和计数 + - file: vision/ocr.md + label: OCR 文字识别 + - file: vision/maixhub_train.md + label: MaixHub 在线 AI 模型训练 + - file: vision/custmize_model.md + label: 自定义(离线训练转换)模型 - label: AI 听觉 -- file: audio/record.md - label: 录音 -- file: audio/play.md - label: 播放音频 -- file: audio/classifier.md - label: AI 声音分类器 -- file: audio/keyword.md - label: 关键词识别 -- file: audio/recognize.md - label: 语音实时识别 -- file: audio/synthesis.md - label: 语音合成 + items: + - file: audio/record.md + label: 录音 + - file: audio/play.md + label: 播放音频 + - file: audio/classifier.md + label: AI 声音分类器 + - file: audio/keyword.md + label: 关键词识别 + - file: audio/recognize.md + label: 语音实时识别 + - file: audio/synthesis.md + label: 语音合成 - label: 视频 -- file: video/record.md - label: 录像 -- file: video/play.md - label: 播放视频 -- file: video/jpeg_streaming.md - label: JPEG 串流 -- file: video/rtsp.md - label: RTSP 串流 + items: + - file: video/record.md + label: 录像 + - file: video/play.md + label: 播放视频 + - file: video/jpeg_streaming.md + label: JPEG 串流 + - file: video/rtsp.md + label: RTSP 串流 - label: 片上外设 -- file: peripheral/gpio.md - label: GPIO 和 点灯 -- file: peripheral/uart.md - label: UART 串口使用 -- file: peripheral/i2c.md - label: I2C 使用 -- file: peripheral/pwm.md - label: PWM 使用 -- file: peripheral/spi.md - label: SPI 使用 -- file: peripheral/wdt.md - label: WDT 看门狗使用 + items: + - file: peripheral/gpio.md + label: GPIO 和 点灯 + - file: peripheral/uart.md + label: UART 串口使用 + - file: peripheral/i2c.md + label: I2C 使用 + - file: peripheral/pwm.md + label: PWM 使用 + - file: peripheral/spi.md + label: SPI 使用 + - file: peripheral/wdt.md + label: WDT 看门狗使用 - label: 片外模块 -- file: modules/acc.md - label: 加速度计使用 -- file: modules/temp_hum.md - label: 温湿度传感器 -- file: modules/tof.md - label: TOF 测距 -- file: modules/thermal_cam.md - label: 热成像摄像头 + items: + - file: modules/acc.md + label: 加速度计使用 + - file: modules/temp_hum.md + label: 温湿度传感器 + - file: modules/tof.md + label: TOF 测距 + - file: modules/thermal_cam.md + label: 热成像摄像头 + +- label: 项目实战 + items: + - file: projects/README.md + label: 介绍和汇总 + - file: projects/line_tracking_robot.md + label: 小车巡线 - label: 进阶 -- file: source_code/contribute.md - label: 贡献文档和代码 -- file: source_code/build.md - label: 构建 MaixPy 源码 -- file: source_code/faq.md - label: MaixPy 源码 FAQ -- file: source_code/add_c_module.md - label: 使用 C/C++ 写一个模块 -- file: source_code/maixcdk.md - label: 使用 MaixCDK 开发 -- file: pro/compile_os.md - label: 编译系统 + items: + - file: source_code/contribute.md + label: 贡献文档和代码 + - file: source_code/build.md + label: 构建 MaixPy 源码 + - file: source_code/faq.md + label: MaixPy 源码 FAQ + - file: source_code/add_c_module.md + label: 使用 C/C++ 写一个模块 + - file: source_code/maixcdk.md + label: 使用 MaixCDK 开发 + - file: pro/compile_os.md + label: 编译系统 diff --git a/docs/doc/zh/source_code/build.md b/docs/doc/zh/source_code/build.md index 7eba87ac..b58c62ad 100644 --- a/docs/doc/zh/source_code/build.md +++ b/docs/doc/zh/source_code/build.md @@ -5,22 +5,44 @@ title: MaixPy 开发源代码指南 ## 获取源代码 ```shell +mkdir -p ~/maix +cd ~/maix git clone https://github.com/sipeed/MaixPy -cd MaixPy ``` +## 获取 MaixCDK 源码 + +MaixPy 项目依赖于 MaixCDK,需要先克隆它,放到电脑的某个目录(勿放在 MaixPy 目录下) + +```shell +cd ~/maix +git clone https://github.com/sipeed/MaixCDK +``` + +然后需要设置环境变量 `MAIXCAK_PATH` 指定 MaixCDK 的路径,可以在 `~/.bashrc` 或者`~/.zshrc`(根据你使用的shell决定)添加: + +```shell +export MAIXCAK_PATH=~/maix/MaixCDK +``` + +只有在成功设置环境变量后, MaixPy 才能找到 MaixCDK 源码。 + ## 构建并打包成 wheel 文件 ```shell +cd ~/maix/MaixPy python setup.py bdist_wheel maixcam ``` -`maixcam` 可以被替换为其他板卡配置, 请查看 [setup.py]([./configs](https://github.com/sipeed/MaixPy/blob/main/setup.py)) 中的 `platform_names` 变量。 +`maixcam` 可以被替换为其他板卡配置, 请查看 `MaixPy/platforms` 目录。 -构建成功后, 你会在 `dist` 目录中找到 wheel 文件, 使用 `pip install -U MaixPy****.wheel` 在你的设备上安装或升级。 +构建成功后, 你会在 `dist` 目录中找到 wheel 文件, 传输到设备(开发板),在设备终端中使用 `pip install -U MaixPy****.wheel` 在你的设备上安装或升级。 > `python setup.py bdist_wheel maixcam --skip-build` 不会执行构建命令, 只会打包 wheel 文件, 因此你可以先使用 `maixcdk menuconfig` 和 `maixcdk build` 来自定义构建。 +> 另外如果你是在调试 API,需要频繁安装,使用 pip 安装会比较慢,可以直接编译后拷贝 `maix` 目录到设备的 `/usr/lib/python3.11/site-packages`目录下覆盖旧的文件即可。 + + ## 手动构建 ```shell