本文主要是介绍Zephyr Windows开发环境搭建,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Zephyr
如果有错误或未及时更新,请以官网文档为主
官网:https://docs.zephyrproject.org/latest/develop/getting_started/index.htm
文章目录
- Zephyr
- 下载安装
- Chocolatey
- 安装插件
- Zephyr SDK
- 获取Zephyr工程
下载安装
Chocolatey
这是一个类似于在Linux系统下 yum 和 apt 那样的包管理器
官网:https://chocolatey.org/install
在管理员权限下powershell输入命令安装Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
安装成功后查询版本
choco -v
成功如下
安装插件
全局关闭确认,避免安装软件时询问
choco feature enable -n allowGlobalConfirmation
Cmake Git Python 等所需工具
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install ninja gperf python311 git dtc-msys2 wget 7zip
Zephyr SDK
官网: https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.5-1/zephyr-sdk-0.16.5-1_windows-x86_64.7z
不科学上网根本下不完,分享一个国内网盘
百度网盘:https://pan.baidu.com/s/1Ot9ZvyKSB4mNlndLiEl-rQ?pwd=1122
下载解压后找到 setup.cmd 用 powershell 执行
.\setup.cmd
成功如下
Zephyr SDK 0.16.5-1 Setup
** NOTE ** You only need to run this script once after extracting the Zephyr SDK distribution bundle archive.
Install host tools [Y,N]?Y Register Zephyr SDK CMake package [Y,N]?Y
Installing host tools … SKIPPED: Windows host tools are not
available yet.Registering Zephyr SDK CMake package … Zephyr-sdk
(D:/YingLiWork/zephyr-sdk-0.16.5-1_windows-x86_64/zephyr-sdk-0.16.5-1/cmake)
has been added to the user package registry in:
HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr-sdkAll done.
Press any key to exit …
获取Zephyr工程
1、管理员权限powershell安装west
pip3 install -U west
2、普通用户powershell 获取project
west update 时间会很长 重试几次确定没有失败
cd %HOMEPATH%
west init zephyrproject
cd zephyrproject
west update
3、导出cmake工具包
west zephyr-export
4、安装requirements.txt所需依赖项
pip3 install -r zephyr\scripts\requirements.txt
这篇关于Zephyr Windows开发环境搭建的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!