# zephyr-demo **Repository Path**: jiang_xing/zephyr-demo ## Basic Information - **Project Name**: zephyr-demo - **Description**: 学习zephyr笔记 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-24 - **Last Updated**: 2026-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 说明 使用`esp32s3_devkitc`这个开发板作为测试学习目标 ### 虚拟机安装 ```bash sudo apt install open-vm-tools open-vm-tools-desktop ``` ### 设置git代理 ```bash git config --global url."https://edgeone.gh-proxy.org/https://github.com/".insteadOf https://github.com/ ``` ### 配置python国内源 ```bash pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ ``` ### 安装工具库等 ```bash sudo apt install git cmake ninja-build gperf ccache dfu-util \ device-tree-compiler wget python3 python3-pip \ python3-venv python3-dev python3-setuptools \ xz-utils file make gcc gcc-multilib g++-multilib \ libsdl2-dev libmagic1 libusb-1.0-0-dev ``` ### 不支持aarch64 ```bash sudo apt install build-essential git cmake ninja-build gperf ccache dfu-util \ device-tree-compiler wget \ python3 python3-pip python3-venv python3-dev python3-setuptools \ xz-utils file libsdl2-dev libmagic1 libusb-1.0-0-dev ``` ### 创建工程路径 ```bash mkdir -p /opt/zephyr/zephyr-project ``` ### 设置python的虚拟环境 ```bash python3 -m venv /opt/zephyr/zephyr-venv ``` ### 使能python环境 ```bash source /opt/zephyr/zephyr-venv/bin/activate ``` ### 安装west ```bash pip install west ``` ### 初始化zephyr ```bash cd /opt/zephyr/zephyr-project west init . ``` ### 更新所有模块(很久) ```bash west update ``` ### 导出cmake ```bash west zephyr-export ``` ### 安装Python依赖 ```bash west packages pip --install ``` ### 安装zephyr-sdk ```bash cd /opt/zephyr wget -c https://edgeone.gh-proxy.orghttps://github.com/zephyrproject-rtos/sdk-ng/releases/download/v1.0.1/zephyr-sdk-1.0.1_linux-x86_64_gnu.tar.xz tar xvf zephyr-sdk-1.0.1_linux-x86_64_gnu.tar.xz cd zephyr-sdk-1.0.1 ./setup.sh ``` ### 编译测试 ```bash west build -b qemu_riscv32 samples/cpp/hello_world west build -t run ``` ### esp32s3编译测试 ```bash west build -b esp32s3_devkitc/esp32s3/procpu samples/hello_world west flash ``` ```bash *** Booting Zephyr OS build v4.4.0-3085-gbcf31c20f01f *** Hello World! esp32s3_devkitc/esp32s3/procpu ``` ### 串口权限问题 ```bash sudo gpasswd dialout -a $USER ``` ### esp32的WiFi与蓝牙支持 ```bash cd /opt/zephyr/zephyr-project/zephyr west blobs fetch hal_espressif ``` ### 快速编译 快速编译说明.md