一、介绍
zephyr支持在Linux、macOS 或 Windows开发,本篇只介绍在Windows下配置开发环境,对应的zephyr版本为3.0.99,这里使用 cmd.exe程序搭建编译环境,如果使用PowerShell 会略有不同,建议查看 Zephyr 官方介绍。
二、安装依赖项
主要依赖项的版本最低要求:
Tool | Min. Version |
---|---|
CMake | 3.20.0 |
Python | 3.6 |
Devicetree compiler | 1.4.6 |
1.安装包管理工具Chocolatey
- 以管理员身份打开一个cmd.exe窗口,输入以下命令,等待安装完成
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- 如果安