【板子申请】Ai-M61-32S开发环境搭建(win11)

[复制链接]
查看332 | 回复1 | 2023-11-20 23:00:04 | 显示全部楼层 |阅读模式
【板子申请】Ai-M61-32S开发环境搭建(win11)

一、总述
1.安装VS code
2.安装git 工具
3.小安派源码工程克隆
二、安装VS code
屏幕截图 2023-11-20 224448.png
下载连接:https://code.visualstudio.com/
三、安装git 工具

屏幕截图 2023-11-20 224540.png

Download – TortoiseGit – Windows Shell Interface to Git

四、小安派源码工程克隆
依次运行
  1. git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git

复制代码
设置环境变量
屏幕截图 2023-11-20 225905.png

  1. aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin
  2. aithinker_Ai-M6X_SDK\tools\make
  3. aithinker_Ai-M6X_SDK\tools\ninja
复制代码
检查是否安装正确
屏幕截图 2023-11-20 225124.png

  1. PS C:\Users\yangt> make -v
  2. GNU Make 4.2.1
  3. Built for x86_64-w64-mingw32
  4. Copyright (C) 1988-2016 Free Software Foundation, Inc.
  5. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  6. This is free software: you are free to change and redistribute it.
  7. There is NO WARRANTY, to the extent permitted by law.
  8. PS C:\Users\yangt> riscv64-unknown-elf-gcc -v
  9. Using built-in specs.
  10. COLLECT_GCC=F:\Aipi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin\riscv64-unknown-elf-gcc.exe
  11. 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
  12. Target: riscv64-unknown-elf
  13. 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'
  14. Thread model: posix
  15. Supported LTO compression algorithms: zlib zstd
  16. gcc version 10.2.0 (Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906)
复制代码
五、编译天气站程序
在 VScode 打开 AiPi-Open-Kits 文件夹,终端输入:

make​
开始编译源码。
屏幕截图 2023-11-11 214529.png
注:我在这里遇到了报错,根据在论坛上找到了解决办法,如下:
打开 /aithinker_Ai-M6X_SDK/project.build 文件,在 CP 指令前加#注释掉
六、总结
由于笔者之前以及安装了vs code以及git工具,所以没有遇到太多困难,遇到的问题也都能通过论坛解决


屏幕截图 2023-11-11 214758.png
回复

使用道具 举报

爱笑 | 2023-11-22 14:23:52 | 显示全部楼层
通过
用心做好保姆工作
回复

使用道具 举报

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

本版积分规则