vscode已安装

小安派 源码工程 克隆
git clone [https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git](https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git)

在拉取SDK之前,需要修改一下子模块的来源,不然可能会拉取失败。
进入AiPi-Open-Kits 中,用文本打开.gitmodules 文件url 参数中的 github.com 改成gitee.com :

在Api-Open-kits执行下列命令
git submodule init
git submodule update

拉取M61 SDK中的子模块
cd aithinker_Ai-M6X_SDK/
git submodule init
git submodule update
克隆适用Windows 的编译工具链
就在aithinker_Ai-M6X_SDK/ 文件夹中拉取工具链,直接适用git 工具拉取:
git clone [https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git](https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git)

编译工具路径设置
所有都拉取完成之后,需要把三个路径加入到电脑的环境变量当中,分别是:
aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
aithinker_Ai-M6X_SDK\tools\make
aithinker_Ai-M6X_SDK\tools\ninja

%ANPAI%\toolchain_gcc_t-head_windows\bin
%ANPAI%\tools\make
%ANPAI%\tools\ninja

验证是否成功设置
建议先重启
在桌面按住 shift 键点击鼠标右键 打开PowerShell 。在PowerShell 输入:
make -v

如果包没法通过gitmodule拉取就手动拉取
输入
riscv64-unknown-elf-gcc -v

编译AiPi-Eyes_weather

编译成功 |