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

[复制链接]
查看475 | 回复1 | 2023-11-18 16:59:56 | 显示全部楼层 |阅读模式
本帖最后由 不断奋斗的heart 于 2023-11-18 16:59 编辑

       1. 打开git,从github中下载库文件
            
  1. git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git
复制代码
        下载成功后
         1.png
       2. 修改模块来源("github"改为"gitee")
          修改前:
          2.png
         修改后:
          3.png
         然后,在git中输入如下代码(分别执行):
  1. cd AiPi-Open-Kits/
  2. git submodule init
  3. git submodule update
复制代码
4.png
         3. 拉取子模块
             在git中输入如下代码(分别执行):
  1. cd aithinker_Ai-M6X_SDK/
  2. git submodule init
  3. git submodule update
复制代码
          5.png
           克隆使用Windows的编译工具链
            再输入
  1. git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git
复制代码
            6.png
          4. 添加环境变量
  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
复制代码
7.png
8.png

           5. 验证
            输入
  1. make -v
复制代码
           输入
  1. riscv64-unknown-elf-gcc -v
复制代码
           出现下方信息即为成功
  1. Using built-in specs.
  2. COLLECT_GCC=G:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin\riscv64-unknown-elf-gcc.exe
  3. COLLECT_LTO_WRAPPER=g:/aipi-open-kits/aithinker_ai-m6x_sdk/toolchain_gcc_t-head_windows/bin/../libexec/gcc/riscv64-unknown-elf/10.2.0/lto-wrapper.exe
  4. Target: riscv64-unknown-elf
  5. 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'
  6. Thread model: posix
  7. Supported LTO compression algorithms: zlib zstd
  8. gcc version 10.2.0 (Xuantie-900 elf newlib gcc Toolchain V2.6.1 B-20220906)
复制代码
          6.在VScode中编译源码
              通过VScode打开文件夹
               9.png
             编译源码且成功的界面
             10.png
            
            
         
164924mt5cbcdaew9z16bt.png
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则