本帖最后由 chln 于 2023-11-11 09:56 编辑
感谢 版主 抽空看我的帖子
预先善其事,必先利其器
# 目录
0. 板子环境介绍
1. 代码编写工具:vscode及其插件安装
2. 项目管理工具:*git安装和源码拉取*
3. 程序编译烧录:天气站程序(烧录因为没有板子,所以没有成功)
## 0. 板子环境介绍
毋庸置疑,官方no.1:https://docs.ai-thinker.com/ai_m61
环境:win10
## 1. 代码编写工具:vscode及其插件安装
vscode下载:https://docs.ai-thinker.com/_media/vscodeusersetup-x64-1.81.0.zip
vscode安装:https://code.visualstudio.com/learn/get-started/basics
汉化:如果英语可以不用汉化
插件安装:左下角设置图标-Extensions
C/C++(必须)
Doxygen Documentation Generator(注释工具,可选)
## 2. 项目管理工具:git安装和源码拉取
git下载:https://docs.ai-thinker.com/_media/git-2.41.0.3-64-bit.zip
git安装:参考git官方文档:https://github.com/git-guides/install-git
源码拉取:总共文件大小在4.4G
我这里在D盘根目录拉取源码:
cmd命令行工具:
D:
git clone https://github.com/Ai-Thinker-Open/AiPi-Open-Kits.git
cd ./AiPi-Open-Kits
git submodule init
git submodule update
cd ./aithinker_Ai-M6X_SDK
git submodule init
git submodule update
git clone https://github.com/bouffalolab/toolchain_gcc_t-head_windows.git
注:github需要访问通畅
总共文件大小在4.4G
环境变量添加:
D:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\make
D:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\ninja
D:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
注:保证环境变量顺序
验证环境变量:
打开powershell:
make -v
riscv64-unknown-elf-gcc -v
## 3. 程序编译烧录:天气站程序(烧录因为没有板子,所以没有成功)
打开vscode,打开源码AIPI-OPEN-Kits下AiPi-Eyes_weather,右键在终端中打开,然后make编译
注:vscode在变量设置完后重启一下,让vscode找到系统的变量
编译成功标志
烧录:
make flash COMX=COMxx
注:感谢大佬的安装过程:http://bbs.ai-thinker.com/forum.php?mod=viewthread&tid=282&extra=page%3D2&_dsign=7fea3002
|