【中文】 针对 PR #1943 的评审建议(Y1hsiaochunnn + laride):当前市面的 ESP32-P4 几乎都是 rev v1.x / v2.x 硅片,IDF 默认 REV_MIN_301 会让 bootloader 被 bootloader.rev3.ld 链到高位 HP_SRAM,导致在存量硬件上第一条指令就 panic。 未来 ESP32-P4X(rev >= 3.x)又需要保留默认配置,因此不能在所有 P4 board 上一刀切地写死 CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y。 方案:对所有 P4 config.json 的每个现有变体,添加 REV_LESS_V3 + REV_MIN_100, 并复制一份加 `-p4x` 后缀的孪生变体(不加上述两行,保持 IDF 默认 REV_MIN_301 以支持未来 P4X 芯片)。 受影响的 6 份 config.json,共 14 个原变体,复制后新增 14 个 `-p4x` 变体: - main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json(8 -> 16 变体, 其中 7b 变体保留 32MB flash + custom 分区配置) - main/boards/waveshare/esp32-p4-wifi6-touch-lcd-3.5/config.json - main/boards/waveshare/esp32-p4-nano/config.json - main/boards/esp-p4-function-ev-board/config.json - main/boards/wireless-tag-wtp4c5mp07s/config.json - main/boards/m5stack-tab5/config.json --- [English] Per review on PR #1943 (Y1hsiaochunnn + laride): almost all ESP32-P4 silicon on the market today is rev v1.x / v2.x. IDF's default REV_MIN_301 links the bootloader via bootloader.rev3.ld into the upper HP_SRAM window, which those chips cannot execute; the CPU panics on the first opcode. Future ESP32-P4X (rev >= 3.x) still needs the IDF default, so we cannot hard-code CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y across all P4 boards. Strategy: for each existing variant in every P4 config.json, add REV_LESS_V3 + REV_MIN_100 to target current silicon, and add a `-p4x` twin variant without those two configs (keeping IDF default REV_MIN_301) for future P4X chips. Affects 6 config.json files, 14 original variants duplicated into 14 `-p4x` twins: - main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json (8 -> 16 variants; the 7b variant keeps its 32 MB flash + custom partition configs) - main/boards/waveshare/esp32-p4-wifi6-touch-lcd-3.5/config.json - main/boards/waveshare/esp32-p4-nano/config.json - main/boards/esp-p4-function-ev-board/config.json - main/boards/wireless-tag-wtp4c5mp07s/config.json - main/boards/m5stack-tab5/config.json
An MCP-based Chatbot
Introduction
👉 Handcraft your AI girlfriend, beginner's guide【bilibili】
As a voice interaction entry, the XiaoZhi AI chatbot leverages the AI capabilities of large models like Qwen / DeepSeek, and achieves multi-terminal control via the MCP protocol.
Version Notes
The current v2 version is incompatible with the v1 partition table, so it is not possible to upgrade from v1 to v2 via OTA. For partition table details, see partitions/v2/README.md.
All hardware running v1 can be upgraded to v2 by manually flashing the firmware.
The stable version of v1 is 1.9.2. You can switch to v1 by running git checkout v1. The v1 branch will be maintained until February 2026.
Features Implemented
- Wi-Fi / ML307 Cat.1 4G
- Offline voice wake-up ESP-SR
- Supports two communication protocols (Websocket or MQTT+UDP)
- Uses OPUS audio codec
- Voice interaction based on streaming ASR + LLM + TTS architecture
- Speaker recognition, identifies the current speaker 3D Speaker
- OLED / LCD display, supports emoji display
- Battery display and power management
- Multi-language support (Chinese, English, Japanese)
- Supports ESP32-C3, ESP32-S3, ESP32-P4 chip platforms
- Device-side MCP for device control (Speaker, LED, Servo, GPIO, etc.)
- Cloud-side MCP to extend large model capabilities (smart home control, PC desktop operation, knowledge search, email, etc.)
- Customizable wake words, fonts, emojis, and chat backgrounds with online web-based editing (Custom Assets Generator)
Hardware
Breadboard DIY Practice
See the Feishu document tutorial:
👉 "XiaoZhi AI Chatbot Encyclopedia"
Breadboard demo:
Supports 70+ Open Source Hardware (Partial List)
- LiChuang ESP32-S3 Development Board
- Espressif ESP32-S3-BOX3
- M5Stack CoreS3
- M5Stack AtomS3R + Echo Base
- Magic Button 2.4
- Waveshare ESP32-S3-Touch-AMOLED-1.8
- LILYGO T-Circle-S3
- XiaGe Mini C3
- CuiCan AI Pendant
- WMnologo-Xingzhi-1.54TFT
- SenseCAP Watcher
- ESP-HI Low Cost Robot Dog
Software
Firmware Flashing
For beginners, it is recommended to use the firmware that can be flashed without setting up a development environment.
The firmware connects to the official xiaozhi.me server by default. Personal users can register an account to use the Qwen real-time model for free.
👉 Beginner's Firmware Flashing Guide
Development Environment
- Cursor or VSCode
- Install ESP-IDF plugin, select SDK version 5.4 or above
- Linux is better than Windows for faster compilation and fewer driver issues
- This project uses Google C++ code style, please ensure compliance when submitting code
Developer Documentation
- Custom Board Guide - Learn how to create custom boards for XiaoZhi AI
- MCP Protocol IoT Control Usage - Learn how to control IoT devices via MCP protocol
- MCP Protocol Interaction Flow - Device-side MCP protocol implementation
- MQTT + UDP Hybrid Communication Protocol Document
- A detailed WebSocket communication protocol document
Large Model Configuration
If you already have a XiaoZhi AI chatbot device and have connected to the official server, you can log in to the xiaozhi.me console for configuration.
👉 Backend Operation Video Tutorial (Old Interface)
Related Open Source Projects
For server deployment on personal computers, refer to the following open-source projects:
- xinnan-tech/xiaozhi-esp32-server Python server
- joey-zhou/xiaozhi-esp32-server-java Java server
- AnimeAIChat/xiaozhi-server-go Golang server
- hackers365/xiaozhi-esp32-server-golang Golang server
Other client projects using the XiaoZhi communication protocol:
- huangjunsen0406/py-xiaozhi Python client
- TOM88812/xiaozhi-android-client Android client
- 100askTeam/xiaozhi-linux Linux client by 100ask
- 78/xiaozhi-sf32 Bluetooth chip firmware by Sichuan
- QuecPython/solution-xiaozhiAI QuecPython firmware by Quectel
Custom Assets Tools:
- 78/xiaozhi-assets-generator Custom Assets Generator (Wake words, fonts, emojis, backgrounds)
About the Project
This is an open-source ESP32 project, released under the MIT license, allowing anyone to use it for free, including for commercial purposes.
We hope this project helps everyone understand AI hardware development and apply rapidly evolving large language models to real hardware devices.
If you have any ideas or suggestions, please feel free to raise Issues or join our Discord or QQ group: 994694848
