0. 准备工具:
Git、VS Code、Rapid Environment Editor
1. 下一步
打开终端接入你想克隆源码的位置
然后输入克隆代码的命令,回车并等待代码克隆完成
- git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git
复制代码
进入 AiPi-Open-Kits 目录,并用VS Code打开目录下的 .gitmodules ,把第 3 行的 github 换成 gitee
然后回到终端执行
- git submodule init
- git submodule update
复制代码
然后进入 aithinker_Ai-M6X_SDK 目录,并执行跟上面一样的代码
- cd aithinker_Ai-M6X_SDK/
- git submodule init
- git submodule update
复制代码
在 aithinker_Ai-M6X_SDK 下克隆工具链仓库
- git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git
复制代码
2. 将编译工具加入环境变量
将下面三个路径加入Path环境变量
- aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
- aithinker_Ai-M6X_SDK\tools\make
- aithinker_Ai-M6X_SDK\tools\ninja
复制代码
新开一个终端(一定要)测试编译工具是否正常
- make -v
- riscv64-unknown-elf-gcc -v
复制代码
3. 最后测试编译项目
终端进入 AiPi-Open-Kits 下的 AiPi-Eyes_weather
输入 make 并等待编译完成
最后出现 Built target combine 就是编译完成了
这样开发环境就搭建好了
|