1.安装vs code
2.利用命令在git中克隆源码
git clone [https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git](https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git)
运行上述代码克隆源码,该指令会将源码直接克隆到运行git bash的路径下,需要更改路径可以将路径加在后面
如:
git clone [https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git](https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git) D:\downloads
3.修改子模块来源,拉取SDK,并初始化,更新相关模块
依次运行下列代码
cd AiPi-Open-Kits/
git submodule init
git submodule update
cd aithinker_Ai-M6X_SDK/
git submodule init
git submodule update
4.克隆windows的编译工具链
该工具链需要克隆到aithinker_Ai-M6X_SDK/ 路径下,运行前要确保在该路径下
git clone [https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git](https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git)
5.配置系统环境变量
在系统环境变量中将
aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
aithinker_Ai-M6X_SDK\tools\make
aithinker_Ai-M6X_SDK\tools\ninja
这三条环境变量加入,并将make的那个环境变量置顶
![XED{H@3WE@`)UO7OS31Z@{Q.png XEDH@3WE@`[email]UO7OS31Z@Q.png[/email]](data/attachment/forum/202311/14/195407qh0mvs2e1h26mmt6.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300)
编译天气站程序
选中AiPi-Eyes_weather 的文件夹,右键选择进入终端,在终端中运行
make
等待运行完成即可

至此完成开发环境的搭建 |