---映射到本地 pip install flask cd /workspace python3 web.py --port=5000
小智1.9.0 正常使用 小智2.0.2 正常使用
win10 部分 wget http://127.0.0.1:5000/browse/xiaozhi_1.9.0/rom/bootloader.bin wget http://127.0.0.1:5000/browse/xiaozhi_1.9.0/rom/partition-table.bin wget http://127.0.0.1:5000/browse/xiaozhi_1.9.0/rom/ota_data_initial.bin wget http://127.0.0.1:5000/browse/xiaozhi_1.9.0/rom/srmodels.bin wget http://127.0.0.1:5000/browse/xiaozhi_1.9.0/rom/xiaozhi.bin
esp32s3 部分 esptool --chip esp32s3 --port COM57 -b 2000000 --before default-reset --after hard-reset write-flash --flash-mode dio --flash_size 8MB --flash-freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0xd000 ota_data_initial.bin 0x10000 srmodels.bin 0xb0000 xiaozhi.bin
2.0.2 git clone --branch v2.0.2 https://github.com/78/xiaozhi-esp32.git xiaozhi_2.0.2 cd xiaozhi_2.0.2 git switch -c v2.0.2 rm -rf .git
apt install -y python3.11-venv export IDF_TOOLS_PATH=/workspace/esp-idf-tools cd /workspace/idf54/esp-idf-5.4 ./install.sh esp32s3 esp32 . ./export.sh cd /workspace/xiaozhi_2.0.2 idf.py set-target esp32s3
2.0.3 git clone --branch v2.0.3 https://github.com/78/xiaozhi-esp32.git xiaozhi_2.0.3 cd xiaozhi_2.0.3 git switch -c v2.0.3 rm -rf .git
apt install -y python3.11-venv export IDF_TOOLS_PATH=/workspace/esp-idf-tools cd /workspace/idf54/esp-idf-5.4 ./install.sh esp32s3 esp32 . ./export.sh cd /workspace/xiaozhi_2.0.3 idf.py set-target esp32s3
esptool --chip esp32s3 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0xd000 ota_data_initial.bin 0x20000 xiaozhi.bin 0x800000 generated_assets.bin
---公用部分 cd /workspace mkdir idf54 cd idf54 git clone -b release/v5.4 --recursive https://github.com/espressif/esp-idf.git
mv esp-idf esp-idf-5.4 cd esp-idf-5.4 rm -rf .git
---init.sh apt install -y python3.11-venv export IDF_TOOLS_PATH=/workspace/esp-idf-tools cd /workspace/idf54/esp-idf-5.4 ./install.sh esp32s3 esp32 . ./export.sh cd /workspace/tv-pro_xiaozhi idf.py set-target esp32s3 time idf.py build
---小智部分 cd /workspace git clone git clone https://github.com/78/xiaozhi-esp32.git cd xiaozhi-esp32 rm -rf .git
idf.py set-target esp32s3 #执行后, 要等一会
idf.py menuconfig
编译配置 选择Serial flasher config 修改Flash size为8MB,
返回首页,选择Partition Table为8M.csv
返回首页,选择Xiaozhi Assistant->Board Type选择面包板新版接线(WiFi)+LCD,LCD Type选择ST7789,分辨率240*240,7PIN
返回首页,选择Component config->Audio Codec Device Configuration,取消勾选Enable backward compatibility for the I2C driver
idf.py build
sh rom.sh
下载 esptool --chip esp32s3 --port COM57 -b 2000000 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 8MB --flash_freq 80m 0x0 bootloader.bin 0x8000 partition-table.bin 0xd000 ota_data_initial.bin 0x10000 srmodels.bin 0xb0000 xiaozhi.bin
修改唤醒词 idf.py menuconfig
修改 WebSocket API idf.py menuconfig
export IDF_TOOLS_PATH=/workspace/esp-idf-tools cd /workspace/idf53/esp-idf-5.3 ./install.sh esp32s3 esp32 . ./export.sh cd /workspace/tv-pro_xiaozhi
export IDF_TOOLS_PATH=/workspace/esp-idf-tools cd /workspace/idf53/esp-idf-5.3 . ./export.sh cd /workspace/tv-pro_xiaozhi
---处理大于256M文件的方法 查找超过250M的文件 find . -type f -size +250M -exec ls -lh {} ;
.gitignore添加
git filter-repo --path PLATFORMIO_CORE_DIR/.cache/downloads/53d31fba820a1d534536a32a0dd4d25cafa435a9 --invert-paths --force
git push --force 如果报不存在地址则
git remote -v git remote add origin https://cnb.cool/zerolone2/idf54 若需修改已配置的远程地址,使用 git remote set-url origin <新URL>。
git push --force origin main
使用 git filter-repo 移除历史中的大文件 推荐用 git filter-repo(比 git filter-branch 更高效): 安装 git filter-repo(Debian/Ubuntu 示例): bash sudo apt install git-filter-repo
移除历史中的大文件(替换为实际文件路径): bash git filter-repo --path /path/to/large_file.bin --invert-paths
--path:指定要移除的文件路径 --invert-paths:保留除指定路径外的所有内容 添加文件到 .gitignore 同情况 1 的步骤 2,确保未来不会再次提交该文件。 强制推送修改后的历史 由于修改了历史记录,需强制推送覆盖远程: bash git push --force origin 分支名 # 注意:团队协作时需通知他人同步修改