ubuntu编译小智AI面包板esp32s3n16r8

作者:Harrandi 发布时间:May 16, 2026 分类:Linux

1.安装依赖

sudo apt update
sudo apt install git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build    ccache libffi-dev libssl-dev dfu-util libusb-1.0-0

2.克隆新版本

cd ~/esp
git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
git checkout v5.5.4
git submodule update --init --recursive

3. 安装工具链

./install.sh

4. 设置环境变量(每次新终端需要执行)

. ./export.sh

5. 验证版本

idf.py --version

未来升级

1. 进入旧版 IDF 目录(根据你的实际路径)

cd ~/esp/esp-idf

2. 切换到 v6.x.x

git fetch --all
git checkout v6.x.x
git submodule update --init --recursive

3. 清理并重新安装工具

rm -rf ~/.espressif   # 删除旧工具链
./install.sh

4. 重新设置环境

. ./export.sh

5. 验证

idf.py --version

编译

设置环境(每次新终端都要执行)

source ~/esp/esp-idf/export.sh

或者

cd ~/esp/esp-idf
. ./export.sh

配置开发板型号

idf.py set-target esp32s3   # 改成你的芯片型号

打开配置菜单(选择 Board Type)

idf.py menuconfig

进入 Xiaozhi Assistant → Board Type → 选择你的开发板

编译

idf.py build

烧录(连接开发板后)

idf.py -p /dev/ttyUSB0 flash

查看串口日志(可选)

idf.py -p /dev/ttyUSB0 monitor

记一次出错:
“ - no versions of espressif2022/image_player match ==1.1.0~1

  - project depends on espressif2022/image_player (==1.1.0~1)  ”

解决方法:

找到并打开 main/idf_component.yml

将 espressif2022/image_player: ==1.1.0~1 改为 espressif2022/image_player: ^1.1.1

将 espressif2022/esp_emote_gfx: ==1.0.0~2 改为 espressif2022/esp_emote_gfx: ^1.2.0

重新编译:

rm -rf build managed_components
idf.py fullclean
idf.py build

标签: none

评论已关闭