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

[复制链接]
查看342 | 回复1 | 2023-11-10 23:08:47 | 显示全部楼层 |阅读模式

git拉取代码

我这里出现了报错提示 fatal: this operation must be run in a work tree

先进入目录,执行 git checkout 可以看到文件都出来了(无报错可跳过这步)

Z:\>git clone https://gitee.com/Ai-Thinker-Open/AiPi-Open-Kits.git
Cloning into 'AiPi-Open-Kits'...
remote: Enumerating objects: 3580, done.
remote: Counting objects: 100% (3580/3580), done.
remote: Compressing objects: 100% (2130/2130), done.
remote: Total 3580 (delta 1676), reused 3173 (delta 1270), pack-reused 0
Receiving objects: 100% (3580/3580), 88.38 MiB | 6.67 MiB/s, done.
Resolving deltas: 100% (1676/1676), done.
fatal: this operation must be run in a work tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'


Z:\>cd AiPi-Open-Kits

Z:\AiPi-Open-Kits>git checkout
Updating files: 100% (2597/2597), done.
Your branch is up to date with 'origin/master'.

Snipaste_2023-11-10_21-42-29.jpg

把模块从github切换到gitee上面

Snipaste_2023-11-10_21-49-28.jpg

拉取子模块

Z:\AiPi-Open-Kits>git submodule init
Submodule 'aithinker_Ai-M6X_SDK' (https://gitee.com/Ai-Thinker-Open/aithinker_Ai-M6X_SDK.git) registered for path 'aithinker_Ai-M6X_SDK'

Z:\AiPi-Open-Kits>git submodule update
Cloning into 'Z:/AiPi-Open-Kits/aithinker_Ai-M6X_SDK'...
Submodule path 'aithinker_Ai-M6X_SDK': checked out 'c7f51ba430060b4ad4e187d623335e7ed6d9c0b9'

Z:\AiPi-Open-Kits>cd aithinker_Ai-M6X_SDK

Z:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK>git submodule init
Submodule 'toolchain' (https://e.coding.net/axk/ai-m6xsdkzujian/toolchain.git) registered for path 'toolchain'
Submodule 'tools' (https://e.coding.net/axk/ai-m6xsdkzujian/tools.git) registered for path 'tools'

Z:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK>git submodule update
Cloning into 'Z:/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/toolchain'...
Cloning into 'Z:/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/tools'...
Submodule path 'toolchain': checked out '909f681d649ae7c986f39e9f57a1be4b867d4c7c'
Submodule path 'tools': checked out '29d4defeb943aa90b1b9fbef724b5e760e7ffa9f'

拉取Windows 的编译工具链

Z:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK>git clone https://gitee.com/bouffalolab/toolchain_gcc_t-head_windows.git
Cloning into 'toolchain_gcc_t-head_windows'...
remote: Enumerating objects: 2493, done.
remote: Counting objects: 100% (785/785), done.
remote: Compressing objects: 100% (401/401), done.
remote: Total 2493 (delta 427), reused 558 (delta 300), pack-reused 1708
Receiving objects: 100% (2493/2493), 170.71 MiB | 8.52 MiB/s, done.
Resolving deltas: 100% (1179/1179), done.
fatal: this operation must be run in a work tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'


Z:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK>cd toolchain_gcc_t-head_windows

Z:\AiPi-Open-Kits\aithinker_Ai-M6X_SDK\toolchain_gcc_t-head_windows>git checkout
Updating files: 100% (2334/2334), done.
Your branch is up to date with 'origin/master'.

设置环境变量

我这里为了缩短path变量长度,增加了一个中间变量

Snipaste_2023-11-10_22-10-36.jpg

测试环境

重新打开一个PowerShell来测试环境

Snipaste_2023-11-10_22-54-33.jpg


编译项目

因为环境变量我添加到了用户变量中,VS默认就是管理员用户启动,无法识别到环境变量,我就直接在powerShell里面直接编译了

切换到 AiPi-Eyes_weather 目录,直接运行 make 启动编译

Snipaste_2023-11-10_23-03-30.jpg

可以看到 Built target combine 提示编译成功

Snipaste_2023-11-10_22-14-57.jpg
回复

使用道具 举报

bzhou830 | 2023-11-11 11:14:49 | 显示全部楼层
恭喜搭建成功
选择去发光,而不是被照亮
回复 支持 反对

使用道具 举报

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

本版积分规则