零基础开发小安派-Eyes-S1

[复制链接]
查看736 | 回复2 | 2023-11-16 18:52:01 | 显示全部楼层 |阅读模式
1、准备工作
开始开发之前需要安装VSCODE和GIT工具,可以参照如下连接:
2、代码克隆
在git 终端里面输入:
git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git
用文本更改为GITEE,保存。

企业微信截图_1700098553738.png


git 工具中分别执行:
cd AiPi-Open-Kits/
git submodule init
git submodule update
企业微信截图_17000949932910.png

克隆适用 Windows 的编译工具链
就在 aithinker_Ai-M6X_SDK/ 文件夹中拉取工具链,直接适用 git 工具拉取:

git clone 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



5285d658f1ea5890a19949147ab95cc.png

在此电脑,右击属性--高级命令,再再弹出界面找到 Path 选项并选择 编辑。
企业微信截图_17000975464026.png

顺便移动到最上面。
设置完成之后,重启电脑,然后验证路径是否成功设置。

在桌面按住 shift 键点击 鼠标右键 打开 PowerShell 。在 PowerShell 输入:

make -v

成功输出信息:

GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
输入:

riscv64-unknown-elf-gcc -v

成功时输出信息:


Using built-in specs.
COLLECT_GCC=D:\Desktop\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin\riscv64-unknown-elf-gcc.exe
COLLECT_LTO_WRAPPER=d:/desktop/aipi-open-kits/aithinker_ai-m6x_sdk/toolchain_gcc_t-head_windows/bin/../libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper.exe
Target: riscv64-unknown-elf
Configured with: /mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/./source/riscv/riscv-gcc/configure --target=riscv64-unknown-elf --host=i686-w64-mingw32 --with-gmp=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-mpfr=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-mpc=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-libexpat-prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-libmpfr-prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/build-Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/lib-for-gcc-mingw --with-pkgversion='Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906' CXXFLAGS='-g -O2 -DTHEAD_VERSION_NUMBER=2.6.1 ' --enable-libgcctf --prefix=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/Xuantie-900-gcc-elf-newlib-mingw-V2.6.1 --disable-shared --enable-threads=posix --enable-languages=c,c++ --without-system-zlib --enable-tls --with-newlib --with-sysroot=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/build-gcc-riscv64-unknown-elf/Xuantie-900-gcc-elf-newlib-mingw-V2.6.1/riscv64-unknown-elf --with-native-system-header-dir=/include --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libgomp --disable-nls --disable-tm-clone-registry --src=/mnt/ssd/jenkins_iotsw/slave/workspace/Toolchain/build-gnu-riscv/./source/riscv/riscv-gcc --enable-multilib --with-abi=lp64d --with-arch=rv64gcxthead 'CFLAGS_FOR_TARGET=-Os   -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-Os   -mcmodel=medany'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906)
企业微信截图_17000976425505.png

在 VScode 打开小安派仓库源码
编译 AiPi-Eyes_weather
编译通过。
0d45850187c466f925a260a2dda8034.png

更新后的文件夹。
企业微信截图_17000985319887.png






回复

使用道具 举报

WangChong | 2023-11-16 19:50:56 | 显示全部楼层
回复

使用道具 举报

bobochen | 2023-11-16 20:12:56 | 显示全部楼层
所以如下链接是啥
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则