-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update build os doc and optimize all doc title
- Loading branch information
Showing
114 changed files
with
224 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: MaixPy Audio Record | ||
title: MaixCAM MaixPy Audio Record | ||
update: | ||
- date: 2024-05-20 | ||
author: lxowalle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Add extra Python packages. | ||
title: MaixCAM MaixPy Add extra Python packages. | ||
--- | ||
|
||
## Introduction | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: MaixCAM MaixPy 读取加速度计和姿态解算 | ||
--- | ||
|
||
对于 MaixCAM-Pro,板载了一个 6 轴加速度计,可以****** | ||
|
||
TODO: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Using Thermal Infrared Image Sensors with MaixCAM and MaixPy | ||
|
||
Currently, the official hardware product is not yet available. If you only need low resolution, you can purchase a serial or I2C module from online platforms like Taobao and drive it yourself. This document will be updated when the official high-resolution module is released. | ||
|
||
For thermal infrared camera modules, you might consider options such as [K210 + MLX90640 Infrared Thermal Imager](https://neucrack.com/p/189) or [Heimann HTPA 32x32d Thermal Infrared](https://neucrack.com/p/199). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Using TOF Modules for Distance Measurement and Terrain Detection with MaixCAM and MaixPy | ||
|
||
Sipeed offers [two additional TOF modules](https://wiki.sipeed.com/hardware/zh/maixsense/index.html) that can be used for distance measurement. These modules can be purchased and used with serial communication for your projects. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Using ADC in MaixPy | ||
title: Using ADC in MaixCAM MaixPy | ||
update: | ||
- date: 2024-06-11 | ||
author: iawak9lkm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# MaixPy Using GPIO | ||
# MaixCAM MaixPy Using GPIO | ||
|
||
## Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Using PWM in MaixPy | ||
# Using PWM in MaixCAM MaixPy | ||
|
||
## Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Using SPI in MaixPy | ||
title: Using SPI in MaixCAM MaixPy | ||
update: | ||
- date: 2024-06-11 | ||
author: iawak9lkm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Using Watchdog Timer in MaixPy | ||
# Using Watchdog Timer in MaixCAM MaixPy | ||
|
||
## Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,51 @@ | ||
--- | ||
title: Building the System for MaixCAM | ||
title: Compiling a System for MaixCAM MaixPy | ||
--- | ||
|
||
## Customizing and Compiling the System | ||
## Why Customize the System? | ||
|
||
You can download the latest system suitable for MaixCAM from [https://github.com/sipeed/MaixPy/releases](https://github.com/sipeed/MaixPy/releases). | ||
Typically, you can download the latest system for MaixCAM directly from [this link](https://github.com/sipeed/MaixPy/releases). However, there are some scenarios where you might need to customize the system: | ||
|
||
For the latest base system, download it from [https://github.com/sipeed/LicheeRV-Nano-Build/releases](https://github.com/sipeed/LicheeRV-Nano-Build/releases). Please note that this system cannot be directly flashed to MaixCAM as it may damage the screen. | ||
* For example, if you are mass-producing 1,000 products and want each to have your own application that automatically starts on boot, without configuring each one individually, you can modify the `builtin_files` and package a system. Once this system is flashed onto the boards, they will all include your custom files, eliminating the need to copy them again after booting. | ||
* If the official system does not include the software packages or drivers you need, you can compile your own system and select the packages you want to include. | ||
|
||
For system source code and compilation instructions, refer to [https://github.com/sipeed/LicheeRV-Nano-Build](https://github.com/sipeed/LicheeRV-Nano-Build). It is recommended to use the Docker compilation method mentioned in the README to avoid compilation issues (note that the compiled system cannot be directly flashed to MaixCAM as it may damage the screen). | ||
## Obtaining the Base System | ||
|
||
## Copying Files for MaixCAM | ||
|
||
After compilation, you will get an img file. For MaixCAM, additional files need to be added to this img file. Download the [compressed package](https://github.com/sipeed/MaixPy/releases/download/v4.3.2/sys_builtin_files_2024.6.19.tar.xz), extract it, and save the script from the appendix as `update_img.sh`. Copy the `img` file, then execute `./update_img.sh path_to_sys_builtin_files path_to_copied_img`. This `img` can now be used for flashing to MaixCAM. | ||
|
||
However, note that the compressed package is of version `v4.3.2` and not the latest version. Adjust its contents according to your needs. Additionally, MaixPy is in the `usr/lib` directory, which can also be manually updated. | ||
|
||
## Appendix `update_img.sh`: | ||
|
||
```shell | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
source_dir=$1 | ||
img_file=$2 | ||
mount_root=img_root | ||
The principle is to use a system from [this link](https://github.com/sipeed/LicheeRV-Nano-Build/releases) as the base (note that this system cannot be directly flashed onto MaixCAM as it may damage the screen), then copy the MaixCAM-specific files into the base system and repackage it into a system usable by MaixCAM. | ||
|
||
img_file=$(readlink -f "$img_file") | ||
THISDIR=$(dirname $(realpath $0)) | ||
If you don't need to customize the base system, you can directly download the latest system image from [here](https://github.com/sipeed/LicheeRV-Nano-Build/releases). | ||
|
||
if [ -z $img_file ] | ||
then | ||
echo "usage: $0 new_rootfs_dir image_file" | ||
fi | ||
If the base system doesn't meet your requirements, such as needing to add or remove some software packages and drivers, follow the instructions in the [LicheeRV-Nano-Build repository](https://github.com/sipeed/LicheeRV-Nano-Build) README to compile the system. It's recommended to use Docker for compilation to avoid environment issues and to use `bash` instead of `zsh`. | ||
|
||
if [ ! -e $mount_root ] | ||
then | ||
mkdir -pv $mount_root | ||
fi | ||
Remember, the compiled system should not be flashed directly onto MaixCAM, as it might damage the screen. | ||
|
||
set -eux | ||
|
||
PART=2 | ||
|
||
PART_OFFSET=$(partx -s $img_file | head -n 3 | tail -n 1 | awk '{print $2}') | ||
PART_OFFSET=$((PART_OFFSET * 512)) # sector size is 512 | ||
## Copying Files for MaixCAM | ||
|
||
echo "PART: $PART" | ||
echo "PART OFFSET: $PART_OFFSET" | ||
Prepare the following: | ||
|
||
# some old version fuse2fs not support offset | ||
$THISDIR/fuse2fs -o fakeroot -o offset=$PART_OFFSET $img_file $mount_root | ||
* The base system, which is a `.img` or `.img.xz` file. | ||
* Additional files for MaixCAM can be downloaded from the [MaixPy release page](https://github.com/sipeed/MaixPy/releases). Download the latest `builtin_files.tar.xz`. | ||
> If you need to add custom files to the system, you can extract the files and add them to the appropriate directory. For example, if you want a `cat.jpg` file to be in the `/root` directory after flashing, simply place `cat.jpg` in the `root` directory. | ||
* Download or clone the MaixPy source code locally. | ||
* Compile MaixPy to obtain the `.whl` installation package, or you can download the latest installation package from the [MaixPy release page](https://github.com/sipeed/MaixPy/releases). | ||
|
||
# copy root files | ||
echo "copy root files now" | ||
find $source_dir -mindepth 1 -maxdepth 1 -type d ! -name "boot" -exec cp -r {} $mount_root \; | ||
sync | ||
echo "copy root files done" | ||
In the `MaixPy/tools/os` directory, run the following command: | ||
|
||
# umount | ||
umount $mount_root | ||
```shell | ||
./gen_os.sh <base_os_filepath> <maixpy_whl_filepath> <builtin_files_dir_path> <os_version_str> [skip_build_apps] | ||
``` | ||
|
||
echo "copy boot files now" | ||
# Change to source directory | ||
cd "$source_dir/boot" || exit | ||
Here’s what each parameter means: | ||
* **base_os_filepath**: The path to the base system, in `.img` or `.img.xz` format. | ||
* **maixpy_whl_filepath**: The MaixPy package, in `.whl` format. | ||
* **builtin_files_dir_path**: The custom files for MaixCAM, which can be downloaded from the MaixPy release page. | ||
* **os_version_str**: The system version, which should follow a format like `maixcam-2024-08-16-maixpy-v4.4.21`. | ||
* **skip_build_apps**: Skip compiling built-in applications. Set to 1 to skip, otherwise it will compile and copy apps from MaixCDK and MaixPy into the system. | ||
|
||
# Iterate through all files in the source directory | ||
for file in *; do | ||
# Check if the file is a regular file | ||
if [ -f "$file" ]; then | ||
# Copy individual file to the target directory | ||
mcopy -o -i "$img_file@@1s" "$file" ::/ | ||
echo "Copied $file to $img_file boot partition" | ||
fi | ||
done | ||
Example command: | ||
|
||
sync | ||
echo "copy boot files done" | ||
```shell | ||
./gen_os.sh '/home/xxx/.../LicheeRV-Nano-Build/install/soc_sg2002_licheervnano_sd/images/2024-08-13-14-43-0de38f.img' ../../dist/MaixPy-4.4.21-py3-none-any.whl '/home/xxx/.../sys_builtin_files' maixcam-2024-08-15-maixpy-v4.4.21 | ||
``` | ||
|
||
After waiting for the built-in apps to compile and copy, you should find a `maixcam-2024-08-15-maixpy-v4.4.21.img.xz` system image in the `MaixPy/tools/os/tmp` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: Adding a C/C++ Module to MaixPy | ||
title: Adding a C/C++ Module to MaixCAM MaixPy | ||
--- | ||
|
||
## Introduction | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: MaixPy Video Record | ||
title: MaixCAM MaixPy Video Record | ||
update: | ||
- date: 2024-05-20 | ||
author: lxowalle | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Title: MaixPy Human Keypoint Pose Detection | ||
# MaixCAM MaixPy Human Keypoint Pose Detection | ||
|
||
## Introduction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: MaixPy Camera Usage | ||
title: MaixCAM MaixPy Camera Usage | ||
update: | ||
- date: 2024-04-03 | ||
author: neucrack | ||
|
Oops, something went wrong.