Zephyr 官网
https://www.zephyrproject.org/
简介
Zephyr 是一个为了IoT设备使用的RTOS, 是 Linux Foundation 开发的。
看到有几个好处:
1.架构和Linux非常相似,使用起来很顺手
2.Apache license, 限制少,适合商用应用
SDK环境搭建
Follow 官方的文档
https://www.zephyrproject.org/doc/getting_started/installation_linux.html
逐步安装就可以,因为交叉编译器的原因,目前只能在64位电脑上安装SDK。(32位上会安装失败)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git make gcc g++ ncurses-dev doxygen dfu-util device-tree-compiler python3-ply python3-pip
wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.1/zephyr-sdk-0.9.1-setup.run
chmod +x zephyr-sdk--setup.run
./zephyr-sdk--setup.run
需要选择安装目录,选择自己的用户目录即可
export ZEPHYR_GCC_VARIANT=zephyr
export ZEPHYR_SDK_INSTALL_DIR=/home/xxx/zephyr-sdk
;;需要在源代码目录下执行下面命令
pip3 install –user -r scripts/requirements.txt
源代码
git clone https://github.com/zephyrproject-rtos/zephyr.gitzephyr-project
编译
cd zephyr-project
source zephyr-env