Zephyr开发环境搭建-1-安装必需的软件

前言

由于我只在ubuntu下开发zephyr,所以所有的实践都是针对ubuntu系统的(ubuntu18.04)

Update Your Operating System

sudo apt-get update && sudo apt-get upgrade    //Ensure your host system is up to date before proceeding.

Install Requirements and Dependencies

sudo apt-get install --no-install-recommends git cmake ninja-build gperf \
  ccache dfu-util device-tree-compiler wget \
  python3-pip python3-setuptools python3-wheel xz-utils file make gcc \
  gcc-multilib

关键(针对CMake):由于Zephyr requires a recent version of CMake, 我在上面的install中没有加上cmake, 而从从CMake官网下载最新版(有二进制或者源码安装,都可以,比较方便的是用二进制安装方式安装)来安装, 因为通过sudo apt-get install安装的CMake版本可能会比较低,而官方要求CMake version 3.13.1 or higher is required

官方给出的如何在系统中存在旧版本的CMake下让Zephyr使用新版本CMake的解决办法如下(但是,最好还是删除旧版的CMake,然后安装最新版):

CMake version 3.13.1 or higher is required. Check what version you have by using cmake --version. If you have an older version, there are several ways of obtaining a more recent one:

  • Use pip: (方法1

    pip3 install --user cmake
    
  • Download and install from the pre-built binaries provided by the CMake project itself in the CMake Downloads page. For example, to install version 3.13.1 in ~/bin/cmake: (方法2

    mkdir $HOME/bin/cmake && cd $HOME/bin/cmake
    wget https://github.com/Kitware/CMake/releases/download/v3.13.1/cmake-3.13.1-Linux-x86_64.sh
    yes | sh cmake-3.13.1-Linux-x86_64.sh | cat
    echo "export PATH=$PWD/cmake-3.13.1-Linux-x86_64/bin:\$PATH" >> $HOME/.zephyrrc

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值