zephyr windos编译环境安装

zephyr windos编译环境安装 

1、安装choco工具

1)以管理员身份打开Dos cmd 命令窗口

2)复制如下命令回车

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

      安装完成,输入”choco /?” 可查看使用说明及版本信息

 

 

2、zephy 环境设置(http://docs.zephyrproject.org/getting_started/installation_win.html

   在命令窗口中依次输入如下命令:

   1)choco feature enable -n allowGlobalConfirmation

   2)choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'

   3)choco install git python ninja dtc-msys2 gperf

如果出现ninja 安装失败便手动安装

 

https://github.com/ninja-build/ninja/releases 下载 ninja-win.zip, 解压到C:\ProgramData\chocolatey\bin 路径下

命令窗口输入ninja --version

 

4) 下载zephyr 源码

git clone https://github.com/zephyrproject-rtos/zephyr.git

cd zephyr

pip install --user -r scripts/requirements.txt

pip install --user -r scripts/py2-requirements.txt

 

3、安装GNU ARM Embedded c:\gccarmemb

4、编译

set ZEPHYR_TOOLCHAIN_VARIANT=gccarmemb

set GCCARMEMB_TOOLCHAIN_PATH=c:\gccarmemb

zephyr-env.cmd

cd zephyr\samples\hello_world

mkdir build & cd build

cmake -GNinja -DBOARD=nrf52_pca10040 ..

Ninja

 

End!!!

转载于:https://www.cnblogs.com/T0213-ZH/articles/8675303.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值