本帖最后由 kylin 于 2023-11-12 18:21 编辑
vscode git 之前都有装过,直接下载代码:
1. api库
2.拉取子模块
[backcolor=rgba(27, 31, 35, 0.05)]修改.gitmodules文件,改成gitee
- url = https://gitee.com/Ai-Thinker-Open/aithinker_Ai-M6X_SDK.git
复制代码 [backcolor=rgba(27, 31, 35, 0.05)]
- git submodule init
- git submodule update 这个可能比较慢,要等久点
复制代码
3.拉取[size=1.25em]Windows 的编译工具链
[size=1.25em]进入文件夹aithinker_Ai-M6X_SDK,
git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git
成功后再拉取子模块
- git submodule init
- git submodule update 这个可能比较慢,要等久点
复制代码
[backcolor=rgba(27, 31, 35, 0.05)]4.设置环境,
因为有其他开发环境,直接改环境变量会引起其它代码编译问题,所以增加一个设置环境变量的脚本setpath.ps1
- # Define the path you want to check and add
- $PathToCheck = "F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\make;F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin;F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\ninja;"
-
- # Get the current value of the PATH variable
- $CurrentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
-
- $NewPath = $PathToCheck + $CurrentPath
- #Set the New Path
- [System.Environment]::SetEnvironmentVariable("PATH", $NewPath)
- Write-host -f Green "Added '$PathToCheck' to 'Path' Variable!"
复制代码
每次编译时运行下setpath.ps1
在目录AiPi-Open-Kits上打开powershell
测试make -v
5.下面测试编译AiPi-Eyes_weather
cd AiPi-Eyes_weather
运行 make
最后编译成功
|