1.添加构建环境搭建。

This commit is contained in:
luocai 2024-05-31 00:45:46 +08:00
parent 09cb96f97b
commit 48ebf2be92

View File

@ -7,9 +7,48 @@
```
ln -s /opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1 ~/Projects/cv181x_alios/host-tools/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1
palmDetectionProcess
facePalmDetectionProcess # 处理每帧在MPP的回调函数里面
uart_msg_proc() -> cmd_exec()执行串口协议命令
./rebuild-app.sh y L015 V200 R002
sock_cmd_exec() 这个函数是干啥的?
```
## 门锁开发环境搭建
安装如下 python 环境:
```shell
sudo apt-get install lz4 unzip python3-pip
pip3 install yoctools # 安装在 ~/.local 目录下
# Ubuntu下product实际为product64
cd ~/.local/bin
ln -s product64 product
# 以下两条命令打印版本验证是否安装成功如无版本信息输出最好重启一下机器。可能安装yoctools后可能yoc、product还找不到
yoc -V
product version
# 将 python 软链接定向为 python3
cd /usr/bin
ln -s python3 python
```
原门锁构建环境应该是采用 CenterOS 搭建的,所以很多脚本使用的是 `sh`,在 Ubuntu 环境下,需要注意构建输出,一旦出现疑似脚本错误的问题,可以将脚本开头的 `#/bin/sh` 改为 `#/bin/bash` 再重试。例如脚本文件 `Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin/riscv64-unknown-elf-g++`
修改编译器位置,我习惯于将编译器独立于项目工程之外:
```makefile title="solutions/smart_doorbell/Makefile"
HOST_TOOLS := /opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
```
上述步骤执行完毕之后,即可编译打包:
```shell
./rebuild-app.sh y L015 V200 R002 # 编译烧录固件
./rebuild-app-ota.sh y L015 V200 R002 11 # 编译OTA固件11为OTA版本号
```
./rebuild-app-ota.sh y L015 V200 R002 11
```