发帖
2 0 0

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

kylin
注册会员

1

主题

0

回帖

81

积分

注册会员

积分
81
板子申请专区 518 2 2023-11-12 17:41:57
本帖最后由 kylin 于 2023-11-12 18:21 编辑

vscode git 之前都有装过,直接下载代码:

1. api库
1.png
2.拉取子模块
  1. cd AiPi-Open-Kits/
复制代码

[backcolor=rgba(27, 31, 35, 0.05)]修改.gitmodules文件,改成gitee
  1. url = https://gitee.com/Ai-Thinker-Open/aithinker_Ai-M6X_SDK.git
复制代码
[backcolor=rgba(27, 31, 35, 0.05)]
  1. git submodule init

  2. git submodule update  这个可能比较慢,要等久点
复制代码


3.拉取[size=1.25em]Windows 的编译工具链
[size=1.25em]进入文件夹aithinker_Ai-M6X_SDK,
git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git
成功后再拉取子模块
  1. git submodule init

  2. git submodule update  这个可能比较慢,要等久点
复制代码


[backcolor=rgba(27, 31, 35, 0.05)]4.设置环境,


因为有其他开发环境,直接改环境变量会引起其它代码编译问题,所以增加一个设置环境变量的脚本setpath.ps1
  1. # Define the path you want to check and add
  2. $PathToCheck = "F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\make;F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows\bin;F:\AiPi\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\tools\ninja;"

  3. # Get the current value of the PATH variable
  4. $CurrentPath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")

  5. $NewPath = $PathToCheck + $CurrentPath

  6. #Set the New Path
  7. [System.Environment]::SetEnvironmentVariable("PATH", $NewPath)
  8. Write-host -f Green "Added '$PathToCheck' to 'Path' Variable!"
复制代码


每次编译时运行下setpath.ps1

在目录AiPi-Open-Kits上打开powershell
测试make -v

2.png

5.下面测试编译AiPi-Eyes_weather
cd AiPi-Eyes_weather
运行 make
3.png

最后编译成功

ok.png



──── 0人觉得很赞 ────
ok.png

使用道具 举报

2023-11-12 20:18:45
插个眼给七哥看
2023-11-25 18:07:51
插个眼给园长看
您需要登录后才可以回帖 立即登录
高级模式
返回
统计信息
  • 会员数: 27951 个
  • 话题数: 39407 篇