【板子申请】Ai-M61-32S开发环境搭建(win11)
一、总述
1.安装VS code
2.安装git 工具
3.小安派源码工程克隆
二、安装VS code
下载连接:https://code.visualstudio.com/
三、安装git 工具
Download – TortoiseGit – Windows Shell Interface to Git
四、小安派源码工程克隆
依次运行
- git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git
复制代码 设置环境变量
- aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
- aithinker_Ai-M6X_SDK\tools\make
- aithinker_Ai-M6X_SDK\tools\ninja
复制代码 检查是否安装正确
- PS C:\Users\yangt> 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.
- PS C:\Users\yangt> riscv64-unknown-elf-gcc -v
- Using built-in specs.
- COLLECT_GCC=F:\Aipi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin\riscv64-unknown-elf-gcc.exe
- COLLECT_LTO_WRAPPER=f:/aipi/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)
复制代码 五、编译天气站程序
在 VScode 打开 AiPi-Open-Kits 文件夹,终端输入:
make开始编译源码。 注:我在这里遇到了报错,根据在论坛上找到了解决办法,如下: 打开 /aithinker_Ai-M6X_SDK/project.build 文件,在 CP 指令前加#注释掉
六、总结 由于笔者之前以及安装了vs code以及git工具,所以没有遇到太多困难,遇到的问题也都能通过论坛解决
|