diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d95d45..9f83de3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ Versioning and Conventional Commits. ### Added -- Per-board hardware and usage documentation for all thirteen profiles, with a linked board - index, current build commands, and profile-specific feature and validation limits. +- Per-board hardware, input, configuration, build and flashing instructions for all thirteen + profiles, with a linked board documentation index. - CoreS3-only process-gray pixel-glasses UI, with 23 expressions, four 9 px terminal rows, a 10 px signature and fixed 32 px six-digit pairing codes on its 320x240 display. Automatic faces follow READY/conversation phases; four MCP emotions use bounded holds, @@ -76,6 +76,11 @@ Versioning and Conventional Commits. ### Changed +- Refresh the Chinese and English Wi-Fi provisioning prompts while preserving 20 ms mono Opus/Ogg. + +- Refresh the 22 Chinese and English pairing prompt and digit recordings. Preserve the 20 ms + mono Opus/Ogg format. + Historical SDK commit IDs below refer to the [agent-studio-device-firmware history](https://github.com/AgoraIO-Community/agent-studio-device-firmware/commits/main/). diff --git a/README.md b/README.md index c90922d..60b285b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Circular-4 with XIAO ESP32S3, and SenseCAP Watcher. ## Supported Boards -Per-board hardware notes and build instructions are listed in the +Per-board hardware configuration, controls and build/flash instructions are listed in the [board documentation index](components/mybot_platform/boards/README.md). | Board profile | Audio | Display and input | Storage | diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index b642ef7..f0af3fe 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -30,22 +30,10 @@ It does not replace third-party terms. This file is informational and is not leg | Espressif knob 1.1.0 | Apache-2.0 | `components/knob` | | Espressif CMake utilities 0.5.0 | Apache-2.0 | `components/cmake_utilities` | | M5Stack M5PM1 1.0.7 | MIT | `components/m5pm1` | -| Announcement assets and Ogg parser | MIT | `components/mybot_platform/assets/locales`, `components/mybot_platform/src/services/announcement/ogg_opus_decoder.c` | | Source Han Sans UI glyph subset | SIL Open Font License 1.1 | `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_fonts.c`, `components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_FONT_LICENSE.txt` | | Noto Color Emoji rasterized glyphs | SIL Open Font License 1.1 | `components/mybot_platform/assets/ui/noto_emoji`, `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_assets.c` | -| Shared LVGL view | MIT | `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc`, `components/mybot_platform/src/internal/display/lvgl_view.h` | -| CoreS3 pixel-glasses renderer, geometry/mask generators | MIT; expression helpers/policy retain their file-level Apache-2.0 notices | `components/mybot_platform/src/drivers/display/renderers/lvgl/pixel_glasses_view.cc`, pixel geometry/masks/generators and private expression support | | MyBot Terminal bitmap subsets derived from DejaVu Sans Mono Bold | Bitstream Vera font terms, with public-domain DejaVu changes | `components/mybot_platform/src/drivers/display/renderers/lvgl/pixel_fonts.c`, `TERMINAL_FONT_LICENSE.txt` | | Project-maintained shared LVGL panel adapters | Apache-2.0 unless file SPDX says otherwise | `components/mybot_platform/src/drivers/display/adapters/lvgl/st7789_lvgl_adapter.cc`, `components/mybot_platform/src/drivers/display/adapters/lvgl/shared_lvgl_adapter.cc` | -| Board documentation adapted from xiaozhi-esp32 hardware references | MIT; project-maintained profile descriptions are Apache-2.0 | The board READMEs indexed in `components/mybot_platform/boards/README.md` | -| M5Stack CoreS3-derived implementation | MIT | Paths listed under MIT Attributions | -| ReSpeaker Flex XVF3800-derived implementation (`b060243`) | MIT | Paths listed under MIT Attributions | -| SenseCAP Watcher-derived implementation | MIT | Paths listed under MIT Attributions | -| M5Stack StickS3-derived implementation | MIT | Paths listed under MIT Attributions | -| Waveshare AMOLED 1.75/1.75C-derived implementation | MIT | Paths listed under MIT Attributions | -| Waveshare AMOLED 2.16 profile/panel | MIT | Paths listed under MIT Attributions | -| Bread Compact Wi-Fi LCD input (local AtomEchoS3R template) | MIT | `components/mybot_platform/boards/bread-compact-wifi-lcd/bread_input.c` | -| ESP-VoCat-derived implementation | MIT | Paths listed under MIT Attributions | | ESP-IDF | Apache-2.0 plus component-specific terms | External development SDK | The built-in LVGL UI fonts retain their separate Montserrat OFL and Font Awesome terms at @@ -73,136 +61,20 @@ before publishing source archives, firmware images, mirrors, or releases contain If authorization is unavailable, exclude the library from public artifacts and require users to supply an authorized package locally. -## MIT Attributions - - -The board READMEs for AtomEchoS3R, ESP-VoCat, the Waveshare AMOLED profiles, CoreS3, -StickS3, SenseCAP Watcher and the Zhengchen profiles adapt hardware material from the -MIT-licensed xiaozhi-esp32 project. Their instructions describe this repository's current -profiles and supported features. The original copyright and full MIT permission notice -are retained in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`. -The Bread Compact Wi-Fi LCD, Xingzhi Cube and ReSpeaker Flex descriptions are -project-maintained documentation of the checked-in profiles. The board index links -these documents and their actual configuration files. - - -The adapted platform implementations listed below can be inspected at the published -[ESP32 implementation baseline][esp32-platform-baseline]. This snapshot preserves the delivered -code and its file-level notices; the original project and copyright attributions remain below. +## Component Notices The pinned esp-wifi-connect manifest declares MIT but its 3.2.2 archive omitted the license file. `components/esp-wifi-connect/LICENSE` is the byte-identical MIT text later published by that upstream project in commit `347682fa013b52f863052ad4b1a793ca3cabff17`. -The announcement assets and Ogg parsing implementation retain the MIT copyright of Shenzhen Xinzhi -Future Technology Co., Ltd. and Project Contributors. The assets originate from xiaozhi-esp32 and -their license is retained at `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`. - -The following M5Stack CoreS3 integration files contain substantial portions derived from -MIT-licensed xiaozhi-esp32 hardware and driver material. They use the MIT SPDX identifier and the -full permission text in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/m5stack-core-s3/` -- `components/mybot_platform/src/drivers/audio/cores3_codec_audio.c` -- `components/mybot_platform/src/drivers/display/panels/ili9342/ili9342_panel.c` -- `components/mybot_platform/src/internal/display/ili9342_panel.h` -- `components/mybot_platform/src/drivers/display/adapters/lvgl/ili9342_lvgl_adapter.cc` -- `components/mybot_platform/src/drivers/input/ft6336_touch.c` - -The shared LVGL view adapts the status/content/notification layout from the MIT-licensed -xiaozhi-esp32 display implementation. The original copyright and complete permission notice -are retained in `components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_LICENSE.txt`. -Its generated Source Han Sans glyph subset retains Adobe's copyright and SIL OFL 1.1 text in -`components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_FONT_LICENSE.txt`; it is not MIT-licensed. - -CoreS3's pixel-glasses display implementation and generators adapt the BK7259 pixel-glasses -renderer family for the ESP32 display API and 320x240 geometry. -The MIT renderer/geometry/generator notices and existing display permission text in -`components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_LICENSE.txt` are retained; -expression helper and policy files retain their Apache-2.0 SPDX notices. The delivered -[pixel-glasses resource guide](components/mybot_platform/src/drivers/display/renderers/lvgl/PIXEL_GLASSES_SOURCES.md) -identifies the renderer, geometry, masks and generators. - -The CoreS3 MyBot Terminal subsets are renamed derivatives of DejaVu Sans Mono Bold, preserving -the Bitstream copyright/trademark notice, font permission conditions and public-domain status of -DejaVu changes in `components/mybot_platform/src/drivers/display/renderers/lvgl/TERMINAL_FONT_LICENSE.txt`. -Font data is not covered by the renderer's MIT declaration. The existing Source Han Sans 20 px -subset is reused for Chinese guidance under its SIL OFL 1.1 license. Other board profiles retain -their existing font and emoji notices. - -The ReSpeaker Flex hardware mapping, AIC3104 initialization, XVF3800 control and button polling, -and I2S conversion are derived in part from the MIT-licensed -`github.com/qiuyanli1990/respeaker-flex-circle-Agora-mybot` reference at commit -`b06024382eb104c998aead4841e1df647193065b`. The following paths remain covered by its MIT terms; -the complete copyright and permission notice is retained in -`components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao/` -- `components/mybot_platform/src/drivers/audio/xvf3800_audio.c` -- `partitions/v2/8m.csv` - -The SenseCAP Watcher hardware mapping, codec integration, SPD2010 display integration, and partition -layout are derived in part from MIT-licensed xiaozhi-esp32 material. The following paths remain covered by its MIT terms; -the complete copyright and permission notice is retained in -`components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/sensecap-watcher/` -- `components/mybot_platform/src/drivers/audio/sensecap_codec_audio.c` -- `components/mybot_platform/src/drivers/display/panels/spd2010/spd2010_panel.c` -- `partitions/v2/32m-sensecap.csv` - -The M5Stack StickS3 hardware mapping, M5PM1 sequencing, ES8311 integration, and ST7789P3 display -configuration are derived in part from MIT-licensed xiaozhi-esp32 material. The following paths remain -covered by its MIT terms; the complete copyright and permission notice is retained in -`components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/m5stack-stick-s3/` -- `components/mybot_platform/src/drivers/audio/es8311_codec_audio.c` -- `components/mybot_platform/src/drivers/display/adapters/lvgl/st7789_lvgl_adapter.cc` -- `components/mybot_platform/src/drivers/display/panels/st7789/st7789_panel.c` - -The ST7789 panel lifecycle was extracted from the existing local adapter and retains its MIT -SPDX identifier, copyright, and permission notice. - The vendored M5PM1 production sources retain the upstream M5Stack MIT license in `components/m5pm1/LICENSE`. -The Waveshare ESP32-S3 Touch AMOLED 1.75 and 1.75C hardware mappings, AXP2101 sequence, CO5300 -initialization, CST9217 integration, and codec routing are derived in part from MIT-licensed -xiaozhi-esp32 material. The following paths remain covered by its MIT terms; -the complete copyright and permission notice is retained in -`components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75-common/` -- `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75/` -- `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c/` -- `components/mybot_platform/src/drivers/audio/amoled175_codec_audio.c` -- `components/mybot_platform/src/drivers/display/panels/co5300/co5300_panel.c` - -The Waveshare AMOLED 2.16 profile owns independent Board and 480-pixel panel variants derived -from this MIT integration, reusing its audio/input drivers and the shared LVGL view. Its pin mapping -and 480x480 zero-gap panel geometry use the xiaozhi-esp32 hardware reference. The adapted profile -and panel are available in the [ESP32 implementation baseline][esp32-platform-baseline]. -The profile retains the MIT SPDX identifier -and the complete notice in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/esp32-s3-touch-amoled-2.16/` -- `components/mybot_platform/src/drivers/display/panels/co5300/co5300_480_panel.c` - -The ESP-VoCat PCB detection, hardware mapping, ST77916 initialization, CST816S input behavior, and -codec routing are derived in part from MIT-licensed xiaozhi-esp32 material. The following paths remain -covered by its MIT terms; the complete copyright and permission notice is retained in -`components/mybot_platform/assets/LICENSE.xiaozhi-esp32`: - -- `components/mybot_platform/boards/esp-vocat/` -- `components/mybot_platform/src/drivers/audio/vocat_codec_audio.c` -- `components/mybot_platform/src/drivers/display/panels/st77916/st77916_panel.c` - -The Bread Compact Wi-Fi LCD Boot input is adapted from the existing local MIT AtomEchoS3R input -implementation at `components/mybot_platform/boards/atom-echos3r/atom_echos3r_input.c`. Its -copyright and MIT SPDX identifier are retained in -`components/mybot_platform/boards/bread-compact-wifi-lcd/bread_input.c`; the complete permission -notice is retained in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`. +The CoreS3 pixel-glasses renderer and geometry generators use the file-level terms in their +sources. The terminal font subsets retain the Bitstream Vera terms and public-domain DejaVu +changes in `components/mybot_platform/src/drivers/display/renderers/lvgl/TERMINAL_FONT_LICENSE.txt`. +Source Han Sans UI glyphs retain the SIL OFL 1.1 terms in +`components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_FONT_LICENSE.txt`. ## Vendored SDK Notice @@ -211,28 +83,7 @@ The SDK's public headers and core sources are pinned to The exact trees and reproducible archive checksum are recorded in [VENDORED_SOURCES.md](VENDORED_SOURCES.md). -The original SDK license and third-party notice are retained unchanged under -`components/mybot_stack/mybot_sdk/mybot/`. That notice may describe packages used by other SDK targets; -it is preserved as part of the immutable SDK snapshot and does not redefine this firmware's dependency set. +The SDK license and platform-specific third-party notice are retained under +`components/mybot_stack/mybot_sdk/mybot/`. Every component license file and file-level SPDX/copyright notice remains in force. - -## Hardware References - -The Xingzhi Cube pin mapping, ST7789 SPI mode, RTC GPIO21 power hold, and reference speaker rate -use xiaozhi-esp32 hardware reference material. The selected values are recorded in the delivered -`components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/board_config.h` and the -[ESP32 implementation baseline][esp32-platform-baseline]. The Board lifecycle is project-maintained -Apache-2.0 code. The port adds no vendored component or upstream application service; reused -drivers retain their existing file-level SPDX and copyright notices. The reference's complete MIT -copyright and permission text is retained in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`. - -The Bread Compact Wi-Fi LCD fixed ST7789 240x320 and separate-I2S pin mapping and 24 kHz -reference speaker rate use xiaozhi-esp32 hardware reference material. The selected values are -recorded in the delivered `components/mybot_platform/boards/bread-compact-wifi-lcd/board_config.h` -and the [ESP32 implementation baseline][esp32-platform-baseline]. -The N16R8 memory profile is the selected firmware hardware contract and still requires real-device -confirmation. Its Board lifecycle, pin header, and build metadata are project-maintained Apache-2.0; -reused drivers and the adapted Boot input retain their existing MIT notices. - -[esp32-platform-baseline]: https://github.com/AgoraIO-Community/agora-esp32-devkit/tree/1bc740a8f4c5e3ba188071d50a1623d9fe328294 diff --git a/VENDORED_SOURCES.md b/VENDORED_SOURCES.md index 147febb..462ddde 100644 --- a/VENDORED_SOURCES.md +++ b/VENDORED_SOURCES.md @@ -30,7 +30,6 @@ redistribution terms are documented separately in [THIRD_PARTY_NOTICES.md](THIRD | `components/knob` | ESP Component Registry `espressif/knob` | 1.1.0, commit `5f9cb98ae4d0e8153c4b4d1accf471214e5b6fe8` | | `components/cmake_utilities` | ESP Component Registry `espressif/cmake_utilities` | 0.5.0 | | `components/m5pm1` | ESP Component Registry `m5stack/m5pm1` | 1.0.7, content hash `731f79d0629e245787440f5419aac5d7a82befeb25f97689d6a2d0331a24a72d` | -| `components/mybot_platform/assets/locales` | [agora-r1-devkit announcement assets](https://github.com/AgoraIO-Community/agora-r1-devkit/tree/2f95ffa5075413ec0752b8cf5a08e8b200267ce0/projects/mybot/assets/locales) | commit `2f95ffa5075413ec0752b8cf5a08e8b200267ce0`; the 24 delivered files are byte-identical to this asset set, with the two `success.ogg` files omitted | | `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_fonts.c`, `components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_FONT_LICENSE.txt` | `github.com/lvgl/lvgl`, `scripts/built_in_font/SourceHanSansSC-Normal.otf` | LVGL 9.5.0 source font SHA-256 `1ee89e1669362dee13851129c0a8a791a87521eb4148e5efbf5d26596738e25b`; generated 20 px, 4 bpp static UI subset | | `components/mybot_platform/assets/ui/noto_emoji`, `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_assets.c` | Noto Color Emoji font glyphs rasterized by `github.com/78/noto-fonts`, `png/noto-color-emoji_64` | 2.0.0, commit `d45dbc64052d57048f20ab1770074172ce9eb53b`; per-image SHA-256 values and glyph provenance in `components/mybot_platform/assets/ui/noto_emoji/SOURCES.json` | @@ -50,13 +49,6 @@ using this repository's `MYBOT_BOARD` selector and `scripts/build_all.py` build Firmware capabilities and validation limits follow the current profiles and the English and Chinese root READMEs. -The AtomEchoS3R, ESP-VoCat, Waveshare AMOLED, CoreS3, StickS3, SenseCAP Watcher and Zhengchen -pages adapt MIT-licensed xiaozhi-esp32 hardware reference material. The upstream MIT -notice is retained in `components/mybot_platform/assets/LICENSE.xiaozhi-esp32`. -Bread Compact Wi-Fi LCD, Xingzhi Cube and ReSpeaker Flex have project-maintained profile -descriptions. The adapted pages are maintained for this firmware; they are not unchanged -copies of another application's build or feature documentation. - | Board profile | Delivered description | | --- | --- | | `atom-echos3r` | [README](components/mybot_platform/boards/atom-echos3r/README.md) | @@ -84,21 +76,11 @@ are not included by these references. | Paths | Derivation or hardware reference | Delivered implementation or pinned input | | --- | --- | --- | -| `components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc`, `components/mybot_platform/src/internal/display/lvgl_view.h` | MIT-licensed xiaozhi-esp32 display and LVGL theme layout | [ESP32 implementation baseline][esp32-platform-baseline] | | CoreS3 `components/mybot_platform/src/drivers/display/renderers/lvgl/pixel_glasses_view.cc`, expression geometry/masks/generators, `pixel_expressions.c`, and private expression headers/policy | BK7259 pixel-glasses renderer family, retaining MIT/Apache-2.0 file notices | [ESP32 implementation baseline][esp32-platform-baseline]; adapted to the ESP32 display API and CoreS3 320x240 geometry | | CoreS3 terminal subsets in `components/mybot_platform/src/drivers/display/renderers/lvgl/pixel_fonts.c` and `TERMINAL_FONT_LICENSE.txt` | DejaVu Sans Mono Bold, renamed MyBot Terminal | Source TTF SHA-256 `3a3c502eeff669a231549e80df9f7c49de109bafe303170409e905d0b31a38fe`; 9 px terminal and 10 px signature subsets, with retained Bitstream Vera terms | | `components/mybot_platform/src/drivers/display/adapters/lvgl/shared_lvgl_adapter.cc`, `components/mybot_platform/src/internal/display/display_panel.h` | Project-maintained shared adapter for ST7789, CO5300, SPD2010, and ST77916 panels | Uses the board panel drivers; no new upstream source | | `components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao`, `components/mybot_platform/src/drivers/audio/xvf3800_audio.c`, `partitions/v2/8m.csv` | `github.com/qiuyanli1990/respeaker-flex-circle-Agora-mybot` | commit `b06024382eb104c998aead4841e1df647193065b` | -| `components/mybot_platform/boards/sensecap-watcher`, `components/mybot_platform/src/drivers/audio/sensecap_codec_audio.c`, `components/mybot_platform/src/drivers/display/panels/spd2010/spd2010_panel.c`, `partitions/v2/32m-sensecap.csv` | MIT-licensed xiaozhi-esp32 hardware/driver material | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/m5stack-stick-s3`, `components/mybot_platform/src/drivers/audio/es8311_codec_audio.c`, `components/mybot_platform/src/drivers/display/adapters/lvgl/st7789_lvgl_adapter.cc`, `components/mybot_platform/src/drivers/display/panels/st7789/st7789_panel.c` (panel lifecycle extracted from the existing local adapter) | MIT-licensed xiaozhi-esp32 hardware/driver material | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/zhengchen-1.54tft-wifi/board_config.h` (hardware mapping verification only) | xiaozhi-esp32 hardware reference | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/board_config.h` (hardware mapping, SPI mode, RTC power hold, and reference speaker-rate verification only) | xiaozhi-esp32 hardware reference | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/bread-compact-wifi-lcd/board_config.h` (fixed 240x320 ST7789/simplex-I2S hardware mapping and reference speaker-rate verification only) | xiaozhi-esp32 hardware reference | [ESP32 implementation baseline][esp32-platform-baseline] | | `components/mybot_platform/boards/bread-compact-wifi-lcd/bread_input.c` | Existing local `components/mybot_platform/boards/atom-echos3r/atom_echos3r_input.c` MIT template | Project-local adaptation for Boot GPIO0; retains MIT copyright and permission notice | -| `components/mybot_platform/boards/atom-echos3r/board_config.h` (hardware mapping verification only) | xiaozhi-esp32 hardware reference | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75-common`, `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75`, `components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c`, `components/mybot_platform/src/drivers/audio/amoled175_codec_audio.c`, `components/mybot_platform/src/drivers/display/panels/co5300/co5300_panel.c` | MIT-licensed xiaozhi-esp32 hardware/driver material | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/esp32-s3-touch-amoled-2.16`, `components/mybot_platform/src/drivers/display/panels/co5300/co5300_480_panel.c` (independent variants of the existing 1.75 integration; hardware facts checked against the 2.16 reference) | xiaozhi-esp32 hardware reference; existing MIT 1.75 integration | [ESP32 implementation baseline][esp32-platform-baseline] | -| `components/mybot_platform/boards/esp-vocat`, `components/mybot_platform/src/drivers/audio/vocat_codec_audio.c`, `components/mybot_platform/src/drivers/display/panels/st77916/st77916_panel.c` | MIT-licensed xiaozhi-esp32 hardware/driver material | [ESP32 implementation baseline][esp32-platform-baseline] | | `components/mybot_platform/boards/esp-vocat/board_config.h` (hardware mapping verification only) | `github.com/espressif/esp-brookesia` | commit `b22c488f50bafe53342c8e171081bd736396ef58` | [esp32-platform-baseline]: https://github.com/AgoraIO-Community/agora-esp32-devkit/tree/1bc740a8f4c5e3ba188071d50a1623d9fe328294 diff --git a/components/mybot_platform/assets/LICENSE.xiaozhi-esp32 b/components/mybot_platform/assets/LICENSE.xiaozhi-esp32 deleted file mode 100644 index e90b554..0000000 --- a/components/mybot_platform/assets/LICENSE.xiaozhi-esp32 +++ /dev/null @@ -1,22 +0,0 @@ -MIT License - -Copyright (c) 2025 Shenzhen Xinzhi Future Technology Co., Ltd. -Copyright (c) 2025 Project Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/components/mybot_platform/assets/README.md b/components/mybot_platform/assets/README.md index 9367a81..e2dfcda 100644 --- a/components/mybot_platform/assets/README.md +++ b/components/mybot_platform/assets/README.md @@ -8,12 +8,24 @@ pairing prompt, and spoken digits `0` through `9`. Only the locale selected by `CONFIG_MYBOT_LANGUAGE_*` is embedded in a firmware image. The audio is decoded to 16 kHz mono signed-16 PCM in PSRAM when the SDK opens an announcement sound. -The copied assets use 20 ms Opus packets. Replacements must retain that packet duration, a mono +The local `wificonfig.ogg` in each locale plays when Wi-Fi provisioning starts. + +The assets use 20 ms Opus packets. Replacements must retain that packet duration, a mono OpusHead stream, and a valid final granule position so playback can trim pre-skip and end padding. -The announcement audio is distributed under the accompanying -[MIT license](LICENSE.xiaozhi-esp32). Its attribution is retained there and in the repository -third-party notice. +To encode replacement pairing prompts or digits, use 16 kHz mono signed-16 little-endian PCM +and FFmpeg with libopus. Substitute the local input PCM and output Ogg paths: + +```sh +ffmpeg -nostdin -hide_banner -loglevel error \ + -f s16le -ar 16000 -ac 1 -i input.pcm -map_metadata -1 \ + -c:a libopus -b:a 24000 -vbr off -compression_level 10 \ + -application voip -frame_duration 20 -flags:a +bitexact -fflags +bitexact \ + -f ogg -y output.ogg +``` + +Firmware builds embed the checked-in Ogg files directly; FFmpeg and the PCM files are not build +dependencies. Host decoding checks do not establish real-device playback quality. ## CoreS3 UI images @@ -24,7 +36,7 @@ constant ARGB8888 arrays in `src/drivers/display/renderers/lvgl/lvgl_assets.c`. arrays only when an LVGL UI option is enabled; no runtime PNG decoder is needed. These rasterized Noto Color Emoji font glyphs retain the font's -[SIL Open Font License 1.1](ui/noto_emoji/LICENSE.txt), separately from the audio's MIT terms. +[SIL Open Font License 1.1](ui/noto_emoji/LICENSE.txt). [SOURCES.json](ui/noto_emoji/SOURCES.json) records the pinned source package, original font provenance, per-file SHA-256 values, and conversion details. Run the generator with `--check` to verify that the source hashes and generated arrays match. diff --git a/components/mybot_platform/assets/locales/en-US/0.ogg b/components/mybot_platform/assets/locales/en-US/0.ogg index 29beac5..c1bbcae 100644 Binary files a/components/mybot_platform/assets/locales/en-US/0.ogg and b/components/mybot_platform/assets/locales/en-US/0.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/1.ogg b/components/mybot_platform/assets/locales/en-US/1.ogg index 72d93c6..07f301d 100644 Binary files a/components/mybot_platform/assets/locales/en-US/1.ogg and b/components/mybot_platform/assets/locales/en-US/1.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/2.ogg b/components/mybot_platform/assets/locales/en-US/2.ogg index a7c640d..df291d2 100644 Binary files a/components/mybot_platform/assets/locales/en-US/2.ogg and b/components/mybot_platform/assets/locales/en-US/2.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/3.ogg b/components/mybot_platform/assets/locales/en-US/3.ogg index cc9a80f..b0e896e 100644 Binary files a/components/mybot_platform/assets/locales/en-US/3.ogg and b/components/mybot_platform/assets/locales/en-US/3.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/4.ogg b/components/mybot_platform/assets/locales/en-US/4.ogg index d1d7c64..2bd2a16 100644 Binary files a/components/mybot_platform/assets/locales/en-US/4.ogg and b/components/mybot_platform/assets/locales/en-US/4.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/5.ogg b/components/mybot_platform/assets/locales/en-US/5.ogg index db4570d..efbbd58 100644 Binary files a/components/mybot_platform/assets/locales/en-US/5.ogg and b/components/mybot_platform/assets/locales/en-US/5.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/6.ogg b/components/mybot_platform/assets/locales/en-US/6.ogg index 11e6628..1b39260 100644 Binary files a/components/mybot_platform/assets/locales/en-US/6.ogg and b/components/mybot_platform/assets/locales/en-US/6.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/7.ogg b/components/mybot_platform/assets/locales/en-US/7.ogg index a84d517..fa8caa7 100644 Binary files a/components/mybot_platform/assets/locales/en-US/7.ogg and b/components/mybot_platform/assets/locales/en-US/7.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/8.ogg b/components/mybot_platform/assets/locales/en-US/8.ogg index c7ed034..2587041 100644 Binary files a/components/mybot_platform/assets/locales/en-US/8.ogg and b/components/mybot_platform/assets/locales/en-US/8.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/9.ogg b/components/mybot_platform/assets/locales/en-US/9.ogg index fb74617..f0accfd 100644 Binary files a/components/mybot_platform/assets/locales/en-US/9.ogg and b/components/mybot_platform/assets/locales/en-US/9.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/prompt.ogg b/components/mybot_platform/assets/locales/en-US/prompt.ogg index de32223..8d633f2 100644 Binary files a/components/mybot_platform/assets/locales/en-US/prompt.ogg and b/components/mybot_platform/assets/locales/en-US/prompt.ogg differ diff --git a/components/mybot_platform/assets/locales/en-US/wificonfig.ogg b/components/mybot_platform/assets/locales/en-US/wificonfig.ogg index 216e948..865dbe0 100644 Binary files a/components/mybot_platform/assets/locales/en-US/wificonfig.ogg and b/components/mybot_platform/assets/locales/en-US/wificonfig.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/0.ogg b/components/mybot_platform/assets/locales/zh-CN/0.ogg index e4f4a2b..60cae6e 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/0.ogg and b/components/mybot_platform/assets/locales/zh-CN/0.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/1.ogg b/components/mybot_platform/assets/locales/zh-CN/1.ogg index 7f067dd..52d52b0 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/1.ogg and b/components/mybot_platform/assets/locales/zh-CN/1.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/2.ogg b/components/mybot_platform/assets/locales/zh-CN/2.ogg index 7da007c..979939d 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/2.ogg and b/components/mybot_platform/assets/locales/zh-CN/2.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/3.ogg b/components/mybot_platform/assets/locales/zh-CN/3.ogg index 75bb667..9b91228 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/3.ogg and b/components/mybot_platform/assets/locales/zh-CN/3.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/4.ogg b/components/mybot_platform/assets/locales/zh-CN/4.ogg index 41460ec..d7f0453 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/4.ogg and b/components/mybot_platform/assets/locales/zh-CN/4.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/5.ogg b/components/mybot_platform/assets/locales/zh-CN/5.ogg index 81587c5..1c357d4 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/5.ogg and b/components/mybot_platform/assets/locales/zh-CN/5.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/6.ogg b/components/mybot_platform/assets/locales/zh-CN/6.ogg index b6f8aaf..74c9f23 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/6.ogg and b/components/mybot_platform/assets/locales/zh-CN/6.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/7.ogg b/components/mybot_platform/assets/locales/zh-CN/7.ogg index 49b79c5..3cb664e 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/7.ogg and b/components/mybot_platform/assets/locales/zh-CN/7.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/8.ogg b/components/mybot_platform/assets/locales/zh-CN/8.ogg index 806ca51..2e1088d 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/8.ogg and b/components/mybot_platform/assets/locales/zh-CN/8.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/9.ogg b/components/mybot_platform/assets/locales/zh-CN/9.ogg index 5e3c40e..b77ea06 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/9.ogg and b/components/mybot_platform/assets/locales/zh-CN/9.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/prompt.ogg b/components/mybot_platform/assets/locales/zh-CN/prompt.ogg index f496e93..19ed2f3 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/prompt.ogg and b/components/mybot_platform/assets/locales/zh-CN/prompt.ogg differ diff --git a/components/mybot_platform/assets/locales/zh-CN/wificonfig.ogg b/components/mybot_platform/assets/locales/zh-CN/wificonfig.ogg index 4eeeb77..87dc810 100644 Binary files a/components/mybot_platform/assets/locales/zh-CN/wificonfig.ogg and b/components/mybot_platform/assets/locales/zh-CN/wificonfig.ogg differ diff --git a/components/mybot_platform/boards/README.md b/components/mybot_platform/boards/README.md index 7c1ba04..c74f59d 100644 --- a/components/mybot_platform/boards/README.md +++ b/components/mybot_platform/boards/README.md @@ -1,37 +1,60 @@ # Board documentation / 板卡说明 -All 13 supported board profiles have documentation for the hardware configuration and firmware -features implemented by `agora-esp32-devkit`. See the [English build guide](../../../README.md#build) -or [中文构建说明](../../../README.zh-CN.md#构建) for environment setup and build options. +These documents describe the board profiles implemented by `agora-esp32-devkit`. Pins, power sequencing, +drivers and build constraints are defined by the checked-in `board.cmake`, `board_config.h` and +`sdkconfig.defaults` files. Use ESP-IDF v5.5.2 and select a board with `MYBOT_BOARD`. -各板型说明按本仓库的 `board.cmake`、`board_config.h` 和 `sdkconfig.defaults` 整理。 -`MYBOT_BOARD` 是手动构建时的板型选择入口;自动脚本在工程根目录运行: +以下说明对应本工程已实现的 13 个板型。硬件配置、输入行为、构建约束和验证状态以当前 +板级代码及本工程文档为准。不同尺寸、芯片或硬件版本的板卡不能仅凭外观共用固件。 + +| Board profile | 板卡说明 | 显示 | 视频 | +| --- | --- | --- | --- | +| `atom-echos3r` | [README](atom-echos3r/README.md) | 无屏幕 | 无 | +| `bread-compact-wifi-lcd` | [README](bread-compact-wifi-lcd/README.md) | 240×320 ST7789 | 无 | +| `esp-vocat` | [README](esp-vocat/README.md) | ST77916 触摸屏 | 无 | +| `esp32-s3-touch-amoled-1.75` | [README](esp32-s3-touch-amoled-1.75/README.md) | CO5300 AMOLED 触摸屏 | 无 | +| `esp32-s3-touch-amoled-1.75c` | [README](esp32-s3-touch-amoled-1.75c/README.md) | CO5300 AMOLED 触摸屏 | 无 | +| `esp32-s3-touch-amoled-2.16` | [README](esp32-s3-touch-amoled-2.16/README.md) | 480×480 CO5300 AMOLED 触摸屏 | 无 | +| `m5stack-core-s3` | [README](m5stack-core-s3/README.md) | ILI9342 触摸屏 | GC0308,上传 1 fps | +| `m5stack-stick-s3` | [README](m5stack-stick-s3/README.md) | 135×240 ST7789P3 | 无 | +| `respeaker-flex-xvf3800-circular4-xiao` | [README](respeaker-flex-xvf3800-circular4-xiao/README.md) | 无屏幕 | 无 | +| `sensecap-watcher` | [中文](sensecap-watcher/README.md) / [English](sensecap-watcher/README_en.md) | SPD2010 | 无 | +| `xingzhi-cube-1.54tft-wifi` | [README](xingzhi-cube-1.54tft-wifi/README.md) | 240×240 ST7789 | 无 | +| `zhengchen-1.54tft-ml307` | [README](zhengchen-1.54tft-ml307/README.md) | ST7789 | 无 | +| `zhengchen-1.54tft-wifi` | [README](zhengchen-1.54tft-wifi/README.md) | ST7789 | 无 | + +## 构建 + +在工程根目录激活 ESP-IDF v5.5.2,并指定板型: ```sh -python3 scripts/build_all.py --board --language both +. /path/to/esp-idf/export.sh +test "$(idf.py --version)" = "ESP-IDF v5.5.2" +python3 scripts/build_all.py --board m5stack-core-s3 --language both ``` -默认生成目录为 `build/build-<板型>-<语言>[-video]/`,合并产物位于 `releases/`。 -CoreS3 默认启用视频并带 `-video` 后缀,其余板型关闭视频。Watcher 必须保留工厂 NVS, -使用其说明中的分段烧录步骤。脚本的目录清理和归属检查见根构建指南。 - -| Board profile | 文档 | 当前配置说明 | -| --- | --- | --- | -| `atom-echos3r` | [README](atom-echos3r/README.md) | ES8311、GPIO41 按键、无屏 | -| `bread-compact-wifi-lcd` | [README](bread-compact-wifi-lcd/README.md) | ST7789、独立 I2S、Boot 按键 | -| `esp-vocat` | [README](esp-vocat/README.md) | ES7210/ES8311、ST77916 与触摸 | -| `esp32-s3-touch-amoled-1.75` | [README](esp32-s3-touch-amoled-1.75/README.md) | CO5300 AMOLED 与触摸 | -| `esp32-s3-touch-amoled-1.75c` | [README](esp32-s3-touch-amoled-1.75c/README.md) | 独立 1.75C profile | -| `esp32-s3-touch-amoled-2.16` | [README](esp32-s3-touch-amoled-2.16/README.md) | 480×480 CO5300 AMOLED | -| `m5stack-core-s3` | [README](m5stack-core-s3/README.md) | 像素眼镜 UI,默认摄像头视频 | -| `m5stack-stick-s3` | [README](m5stack-stick-s3/README.md) | ST7789、ES8311 与主按键 | -| `respeaker-flex-xvf3800-circular4-xiao` | [README](respeaker-flex-xvf3800-circular4-xiao/README.md) | Circular-4、XVF3800 与 AIC3104,无屏 | -| `sensecap-watcher` | [中文](sensecap-watcher/README.md) / [English](sensecap-watcher/README_en.md) | SPD2010、编码器与工厂数据保护 | -| `xingzhi-cube-1.54tft-wifi` | [README](xingzhi-cube-1.54tft-wifi/README.md) | ST7789、独立 I2S 与音量按键 | -| `zhengchen-1.54tft-ml307` | [README](zhengchen-1.54tft-ml307/README.md) | ST7789、独立 I2S,当前使用 Wi-Fi | -| `zhengchen-1.54tft-wifi` | [README](zhengchen-1.54tft-wifi/README.md) | ST7789、独立 I2S 与音量按键 | - -硬件参考资料及文档来源见 -[VENDORED_SOURCES.md](../../../VENDORED_SOURCES.md#board-reference-documents),许可归属见 -[THIRD_PARTY_NOTICES.md](../../../THIRD_PARTY_NOTICES.md)。构建结果与实机验证状态分别记录在 -[平台移植说明](../../../docs/BOARD_PORTING.zh-CN.md)中。 +脚本默认编译中英文版本,构建目录在 `build/`,合并固件在 `releases/`;常规构建会先清理 +脚本管理的生成目录,增量构建使用 `--no-clean`。仅英文使用 `--language en-US`,仅中文 +使用 `--language zh-CN`。有屏幕的板型自动使用 LVGL;只有 CoreS3 具备视频能力,脚本默认 +开启,音频对照固件可使用 `--video off`。 + +手动构建时,为每块板指定独立目录和 sdkconfig: + +```sh +idf.py -B build/m5stack-core-s3 \ + -DMYBOT_BOARD=m5stack-core-s3 \ + -DSDKCONFIG=build/m5stack-core-s3/sdkconfig build +idf.py -B build/m5stack-core-s3 -p PORT flash monitor +``` + +手动构建使用当前 sdkconfig 的视频选项;上面的命令不自动开启视频。SenseCAP Watcher 的 +工厂分区保留与烧录步骤见其专用说明。 + +## 输入、配网与验证 + +设备首次启动无 Wi-Fi 凭据时自动配网;长按配网输入会先停止 SDK,再进入配网流程, +联网后重新启动 SDK。各板的配网输入、短按/触摸和音量输入见对应 README。 + +文档依据代码描述已实现能力,不代表每块硬件均已实机验证。已有验证记录和限制见 +[平台移植说明](../../../docs/BOARD_PORTING.zh-CN.md),构建/烧录完整说明见 +[中文项目文档](../../../README.zh-CN.md#构建)或 [English guide](../../../README.md#build)。 diff --git a/components/mybot_platform/boards/atom-echos3r/README.md b/components/mybot_platform/boards/atom-echos3r/README.md index e63e1f1..67163c7 100644 --- a/components/mybot_platform/boards/atom-echos3r/README.md +++ b/components/mybot_platform/boards/atom-echos3r/README.md @@ -1,45 +1,53 @@ # M5Stack AtomEchoS3R -本目录是 agora-esp32-devkit 的 `atom-echos3r` 板级 profile,面向 -ESP32-S3-PICO-1-N8R8 与 ES8311 音频硬件。该 profile 无屏幕,不编入 LVGL。 +本工程的板型 ID 为 `atom-echos3r`,使用无屏音频 profile。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 存储 | 8 MB QIO Flash、80 MHz 8 MB Octal PSRAM | -| 分区 | 根目录 `partitions/v2/8m.csv` | -| ES8311 I2C0 | SDA GPIO45、SCL GPIO0;7 位地址 `0x18` | -| I2S 音频 | MCLK GPIO11、BCLK GPIO17、WS GPIO3、DIN GPIO4、DOUT GPIO48 | -| 扬声器功放 | GPIO18 使能 | -| 用户按键 | GPIO41,当前按低电平有效配置 | +| SoC | ESP32-S3 | +| Flash | 8 MB,QIO | +| PSRAM | 8 MB,Octal,80 MHz | +| 分区 | [partitions/v2/8m.csv](../../../../partitions/v2/8m.csv),双 OTA 分区 | +| 控制台 | ESP-IDF 默认 UART0,板级配置未覆盖控制台类型 | +| 音频 | ES8311 采集/播放,GPIO18 控制功放;SDK 使用 16 kHz 单声道 signed-16 PCM | +| 输入 | 当前代码映射 GPIO41 为低电平有效用户按键,映射与极性仍需真机确认 | +| 显示 | 无屏幕,不编译 LVGL | +| 摄像头 | 当前 profile 未提供视频接口,不支持开启视频 | -音频接口使用 16 kHz、单声道、signed 16-bit PCM。引脚定义见 -[board_config.h](board_config.h),构建约束见 [board.cmake](board.cmake) 与 -[sdkconfig.defaults](sdkconfig.defaults)。 +I2C0 使用 SDA GPIO45、SCL GPIO0,ES8311 的 7-bit 地址为 `0x18`。 +I2S0 为 MCLK GPIO11、BCLK GPIO17、WS GPIO3、DIN GPIO4、DOUT GPIO48。 +GPIO0 已用于 I2C 时钟,不作为配网按键。 -## 构建 +当前代码以 GPIO41 短按开始/结束对话、长按 3 秒进入配网;该板不依赖语音唤醒启动对话。 +无已保存的 Wi-Fi 信息时自动创建配置热点并播放对应语言的提示音,运行状态和配对码可通过 +串口日志查看。音量逻辑值保存到 NVS,初始默认值为 70;ES8311 硬件音量按逻辑值的 60% 映射。 -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +## 构建与烧录 + +在仓库根目录使用 ESP-IDF v5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board atom-echos3r --language both ``` -中间构建目录为 `build/build-atom-echos3r-<语言>/`,默认生成根目录 `releases/atom-echos3r-zh-CN.bin` 与 -`releases/atom-echos3r-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +输出 `releases/atom-echos3r-zh-CN.bin` 和对应英文固件。 +构建脚本的清理行为见[板卡索引](../README.md)。 -## 使用与验证边界 +直接构建中文固件并烧录时,使用独立目录;将串口替换为本机设备: -未保存 Wi-Fi 凭据时,设备创建配置热点并播放对应语言的配网提示音。短按 GPIO41 用户按键 -开始或结束对话,长按 3 秒先停止 SDK,再进入配网。当前未接入本地唤醒词,不要求通过 -语音唤醒操作设备。 +```sh +idf.py -B build/atom-echos3r \ + -DMYBOT_BOARD=atom-echos3r \ + -DSDKCONFIG=build/atom-echos3r/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults" build +idf.py -B build/atom-echos3r -p /dev/ttyUSB0 flash monitor +``` -GPIO41 用户按键映射、极性及 16 kHz 双向音频质量仍需真机验证。构建成功不代表已经完成 -这些硬件验证;无屏状态可结合串口日志与语音提示确认。 +## 验证范围 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +GPIO41 按键映射、极性、16 kHz 采集及播放质量尚未通过本工程真机验收。 +构建成功不能代替这些测试。详见[平台移植文档](../../../../docs/BOARD_PORTING.zh-CN.md) +及[项目说明](../../../../README.zh-CN.md)。 diff --git a/components/mybot_platform/boards/bread-compact-wifi-lcd/README.md b/components/mybot_platform/boards/bread-compact-wifi-lcd/README.md index 9cee408..40b53d3 100644 --- a/components/mybot_platform/boards/bread-compact-wifi-lcd/README.md +++ b/components/mybot_platform/boards/bread-compact-wifi-lcd/README.md @@ -1,34 +1,72 @@ # Bread Compact Wi-Fi LCD -本说明根据本工程的 [board.cmake](board.cmake)、[board_config.h](board_config.h) 和 -[sdkconfig.defaults](sdkconfig.defaults) 整理;参考工程没有该板型的独立 README。 +本工程的板型 ID 为 `bread-compact-wifi-lcd`,对应 ESP32-S3 N16R8 与 240×320 ST7789 的 +固定接线组合。接线和能力由本目录的 [board_config.h](board_config.h)、 +[board.cmake](board.cmake)、[board.c](board.c) 和 +[sdkconfig.defaults](sdkconfig.defaults) 定义。 -## 硬件配置 +## 硬件与已接入功能 -| 项目 | 当前 profile | +| 项目 | 当前实现 | | --- | --- | -| MCU | ESP32-S3,N16R8 配置 | +| 主控 | ESP32-S3 N16R8 profile | | Flash | 16 MB,QIO | | PSRAM | 8 MB,Octal,80 MHz | -| 显示 | ST7789,240×320,SPI;GPIO42 PWM 背光 | -| 音频 | 麦克风与扬声器使用独立 I2S,16 kHz 单声道 | -| 输入 | GPIO0 Boot 按键,无独立音量键、无触摸 | -| 网络 | Wi-Fi | -| 分区 | `partitions/v2/16m.csv` | +| 分区 | [16 MB 分区表](../../../../partitions/v2/16m.csv),双 OTA 应用分区及 8 MB assets 分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台配置,使用 UART0 | +| 音频 | 独立麦克风/扬声器 I2S,16 kHz 单声道;软件音量及 NVS 持久化 | +| 显示 | ST7789,240×320,SPI3 mode 0,40 MHz;共享 LVGL UI | +| 输入 | 单个 Boot 按键;无独立音量键、无触摸输入 | +| 网络 / 视频 | Wi-Fi;未接入摄像头,不支持开启 `CONFIG_MYBOT_ENABLE_VIDEO` | -麦克风 WS/BCLK/DIN 分别为 GPIO4/5/6,扬声器 DOUT/BCLK/WS 分别为 GPIO7/15/16。 -显示引脚及方向配置见 `board_config.h`。当前 profile 没有摄像头支持。 +## 引脚与上电行为 -## 构建 +| 功能 | 引脚 | +| --- | --- | +| 麦克风 I2S1 RX | WS GPIO4、BCLK GPIO5、DIN GPIO6 | +| 扬声器 I2S0 TX | DOUT GPIO7、BCLK GPIO15、WS GPIO16 | +| Boot | GPIO0,低电平有效 | +| LCD | MOSI GPIO47、SCLK GPIO21、CS GPIO41、DC GPIO40、RESET GPIO45 | +| 背光 | GPIO42,LEDC 5 kHz、13-bit PWM,默认 60% | + +板级初始化先设置 PWM 背光为关闭,再初始化面板、显示启动页并注册常驻按键。面板使用 +RGB 顺序、零偏移、不镜像并启用颜色反转。本 profile 没有 GPIO 电源保持,也不驱动 +GPIO48 LED 或 GPIO18 灯输出;其他尺寸、不同接线或共享 I2S 时钟的硬件需使用独立 profile。 + +SDK 音频边界为 16 kHz、单声道、signed-16 PCM;物理标准 I2S 使用 32-bit mono left slot, +由公共 raw I2S 驱动完成转换。播放通过公共 PCM 缓冲连续送入 I2S,初始软件音量默认 70, +后续从 NVS 恢复;本板没有实体音量加减键。 + +## 配网与操作 + +- 短按 Boot:就绪时开始对话,对话中结束对话。 +- 长按 Boot 3 秒:请求配网;应用先停止 SDK,再进入配网模式。按键在 SDK 停止期间 + 仍可触发配网请求。 + +没有 Wi-Fi 凭据时自动进入配网。LCD 显示实际热点名称 `mybot-xxxx`,长文字自动滚动; +连接该热点后访问 `http://192.168.4.1` 配置 Wi-Fi。进入配网时播放对应语言提示音,取得 +可用 IP 后才启动 SDK。 -在工程根目录激活 ESP-IDF v5.5.2 后执行: +## 构建与烧录 + +在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: ```sh python3 scripts/build_all.py --board bread-compact-wifi-lcd --language both ``` -默认合并产物为 `releases/bread-compact-wifi-lcd-zh-CN.bin` 和 -`releases/bread-compact-wifi-lcd-en-US.bin`。 +合并固件输出为 `releases/bread-compact-wifi-lcd-zh-CN.bin` 和对应的 `en-US.bin`。 +批量脚本默认清理其专用构建和输出目录,详见[构建说明](../../../../README.zh-CN.md#构建)。 + +使用独立构建目录和 sdkconfig 的手动构建、烧录示例,将 `PORT` 替换为本机串口设备: + +```sh +idf.py -B build/bread-compact-wifi-lcd \ + -DMYBOT_BOARD=bread-compact-wifi-lcd \ + -DSDKCONFIG=build/bread-compact-wifi-lcd/sdkconfig build +idf.py -B build/bread-compact-wifi-lcd -p PORT flash monitor +``` -构建与烧录的完整说明见[项目文档](../../../../README.zh-CN.md#构建)。当前板型的 -实机验证状态见[平台移植文档](../../../../docs/BOARD_PORTING.zh-CN.md)。 +该固定 profile 的中英文构建支持已在 ESP-IDF v5.5.2 验证,真机验证尚未完成。目标设备仍需 +核对模组与检测容量、屏幕颜色/方向、PWM 背光、音频速度/音调、全双工交互及重复配网。 +验收范围见[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/esp-vocat/README.md b/components/mybot_platform/boards/esp-vocat/README.md index 55af461..41401f5 100644 --- a/components/mybot_platform/boards/esp-vocat/README.md +++ b/components/mybot_platform/boards/esp-vocat/README.md @@ -1,51 +1,74 @@ -# Espressif ESP-VoCat 喵伴 +# ESP-VoCat -本目录是 agora-esp32-devkit 的 `esp-vocat` 板级 profile。硬件资料见 -[ESP-VoCat 开源硬件项目](https://oshwhub.com/esp-college/echoear);硬件具备的器件与算法能力 -不等于本固件已实现的功能。 +本目录提供 `agora-esp32-devkit` 的 `esp-vocat` 板型配置,支持 PCB V1.0 和 V1.2。 +两个版本使用相同的固件,启动时先探测硬件版本,再初始化音频、显示和输入。 +硬件资料见 [ESP-VoCat 开源硬件项目](https://oshwhub.com/esp-college/echoear)。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、16 MB QIO Flash、80 MHz Octal PSRAM | -| 分区 | 根目录 `partitions/v2/16m.csv` | -| 音频 | ES7210 采集、ES8311 播放,16 kHz 单声道 signed 16-bit PCM | -| 公共 I2C0 | SDA GPIO2、SCL GPIO1;ES8311 `0x18`、ES7210 `0x40`、CST816S `0x15` | -| I2S | MCLK GPIO42、BCLK GPIO40、WS GPIO39、DOUT GPIO41 | -| 显示 | 360 × 360 ST77916 QSPI 圆屏,共享 LVGL UI | -| 输入 | CST816S 触摸中断 GPIO10、Boot GPIO0 | -| 控制台 | USB Serial/JTAG,避免 UART0 与板载外设引脚冲突 | +| 芯片 | ESP32-S3 | +| 存储 | 16 MB QIO Flash;80 MHz Octal PSRAM,实际容量以启动日志为准 | +| 分区 | `partitions/v2/16m.csv`,双 OTA 应用分区与资源分区 | +| 控制台 | 原生 USB Serial/JTAG;关闭 UART0 控制台,避免与外设引脚冲突 | +| 音频 | ES7210 采集、ES8311 播放;SDK 接口为 16 kHz、单声道、16 位 PCM | +| 显示 | 360 × 360 ST77916 圆屏,40 MHz QSPI,共享 LVGL 界面 | +| 输入 | CST816S 触摸、GPIO0 Boot 按键 | +| 网络 | Wi-Fi,支持首次自动配网和长按重新配网 | +| 视频 | 未集成摄像头采集,不支持 `CONFIG_MYBOT_ENABLE_VIDEO` | -初始化时探测兼容的 PCB 版本:V1.0 使用 DIN GPIO15、PA GPIO4、GPIO3 低有效 LCD reset; -V1.2 使用 DIN GPIO3、PA GPIO15、GPIO47 高有效 LCD reset。无法探测 ES8311 时初始化失败, -不会盲选引脚。完整定义见 [board_config.h](board_config.h)、[board.cmake](board.cmake) 与 -[sdkconfig.defaults](sdkconfig.defaults)。发布设备仍需确认实际 PSRAM 容量和 PCB 引脚映射。 +公共 I2C0 使用 SDA GPIO2、SCL GPIO1。I2S 使用 MCLK GPIO42、BCLK GPIO40、 +WS GPIO39、DOUT GPIO41;DIN、功放使能和屏幕复位由 PCB 版本决定: -## 构建 +| PCB 版本 | I2S DIN | 功放使能 | ST77916 reset | +| --- | --- | --- | --- | +| V1.0 | GPIO15 | GPIO4 | GPIO3,低有效 | +| V1.2 | GPIO3 | GPIO15 | GPIO47,高有效 | -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +GPIO9 以低电平启用外设电源。初始化时先将 GPIO48 拉低并探测 ES8311,失败后拉高重试; +两次均失败则终止硬件初始化,不使用默认版本继续启动。QSPI 使用 CLK GPIO18、CS GPIO14、 +D0-D3 GPIO46/GPIO13/GPIO11/GPIO12,背光为 GPIO44,触摸中断为 GPIO10。 + +采集和播放共享两槽 I2S 时钟,直接运行在 16 kHz:采集只提取主麦 slot,播放将 SDK +单声道复制到两个物理输出 slot。音量可持久化,未保存过时默认值为 70。 + +## 操作与配网 + +就绪时轻触屏幕或短按 Boot 开始对话,对话中再次操作结束对话。长按屏幕或 Boot 约 3 秒 +请求重新配网;应用先停止 SDK,再进入配网流程,联网成功后重新启动。 +未保存 Wi-Fi 信息时自动进入配网,屏幕显示热点名称并播放提示音;按屏幕提示连接热点 +完成配置。 + +CST816S 使用中断触发读取,仅在按住时定时检查长按,不持续轮询空闲触摸。当前配置关闭 +触摸 ID 寄存器读取,以兼容不响应该寄存器的固件批次。 + +## 编译与烧录 + +在工程根目录使用 ESP-IDF 5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board esp-vocat --language both ``` -中间构建目录为 `build/build-esp-vocat-<语言>/`,默认生成根目录 `releases/esp-vocat-zh-CN.bin` 与 -`releases/esp-vocat-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +脚本自动启用 LVGL,生成 `releases/esp-vocat-zh-CN.bin` 和 +`releases/esp-vocat-en-US.bin`,默认清理脚本管理的 `build/` 和 `releases/`。 -当前 UI 由板级配置自动启用,无需下载额外 UI 资源包。 +需要独立构建、烧录并查看控制台时,可使用: -## 使用与验证边界 +```sh +idf.py -B build/esp-vocat \ + -DMYBOT_BOARD=esp-vocat \ + -DSDKCONFIG=build/esp-vocat/sdkconfig build flash monitor +``` -短触屏幕或短按 Boot 开始/结束对话;长触或长按 3 秒进入配网。当前只向 SDK 提供主麦克风 -采集通道,未接入第二麦克风、播放参考通道、本地 AEC、本地唤醒词或声源定位。 +使用原生 USB 数据接口并打开硬件电源;如需指定端口,在命令中增加 `-p` 参数。 +其他板型必须使用不同的构建目录和 sdkconfig。 -电量、IMU、PCB 电容控制、SD 卡、LED、摄像头扩展、关机与低功耗尚未接入。PCB V1.0 有固件 -无法修复的已知硬件供电稳定性问题。本 profile 尚未完成真机验证,编译成功不能替代电源、 -触摸、显示和双向音频验证。 +## 支持边界 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +第二麦克风、播放参考通道、本地 AEC、电量计、IMU、电容控制、SD 卡、LED、关机和低功耗 +尚未集成。硬件能力不等同于本工程已实现的功能。 +两个 PCB 版本的电源、引脚映射、音频和触摸均需在对应实物上验证;构建通过不能替代真机测试。 +完整说明见[工程文档](../../../../README.zh-CN.md)和[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75/README.md b/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75/README.md index 943e01b..676132f 100644 --- a/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75/README.md +++ b/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75/README.md @@ -1,49 +1,70 @@ -# Waveshare ESP32-S3-Touch-AMOLED-1.75 +# ESP32-S3-Touch-AMOLED-1.75 -本目录是 agora-esp32-devkit 的 `esp32-s3-touch-amoled-1.75` 板级 profile,面向 -[Waveshare ESP32-S3-Touch-AMOLED-1.75](https://www.waveshare.com/esp32-s3-touch-amoled-1.75.htm)。 -本版本与 1.75C 引脚不同,需按实际板型选择固件。 +本目录提供 `agora-esp32-devkit` 的 `esp32-s3-touch-amoled-1.75` 板型配置。 +硬件资料见 [Waveshare 产品页](https://www.waveshare.com/esp32-s3-touch-amoled-1.75.htm)。 +本 profile 用于原始 1.75 版,不能与 1.75C 或 2.16 的固件交叉烧录。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、16 MB QIO Flash、80 MHz 8 MB Octal PSRAM | -| 分区 | 根目录 `partitions/v2/16m.csv` | -| 音频 | ES7210 采集、ES8311 播放,16 kHz 单声道 signed 16-bit PCM | -| 公共 I2C0 | SDA GPIO15、SCL GPIO14;AXP2101 `0x34`、ES8311 `0x18`、ES7210 `0x40`、CST9217 `0x5a` | -| I2S | MCLK GPIO42、BCLK GPIO9、WS GPIO45、DIN GPIO10、DOUT GPIO8;PA GPIO46 | -| 显示 | 466 × 466 CO5300 QSPI AMOLED,显示偏移 (6, 0),共享 LVGL UI | -| 显示 reset / 触摸 reset | GPIO39 / GPIO40 | -| 输入 | CST9217 中断 GPIO11、Boot GPIO0 | -| TCA9554 | 在 `0x20` 可选探测 | +| 芯片 | ESP32-S3 | +| 存储 | 16 MB QIO Flash;8 MB Octal PSRAM,80 MHz | +| 分区 | `partitions/v2/16m.csv`,双 OTA 应用分区与资源分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台设置,默认 UART0 | +| 电源 | AXP2101 初始化;GPIO46 控制扬声器功放 | +| 音频 | ES7210 采集、ES8311 播放;SDK 接口为 16 kHz、单声道、16 位 PCM | +| 显示 | 466 × 466 CO5300 AMOLED,40 MHz QSPI,显示偏移 `(6, 0)`,共享 LVGL 界面 | +| 输入 | CST9217 触摸、GPIO0 Boot 按键 | +| 网络 | Wi-Fi,支持首次自动配网和长按重新配网 | +| 视频 | 未集成摄像头采集,不支持 `CONFIG_MYBOT_ENABLE_VIDEO` | -完整引脚与配置见 [board_config.h](board_config.h)、[board.cmake](board.cmake) 与 -[sdkconfig.defaults](sdkconfig.defaults)。此 profile 与 1.75C 复用公共板级生命周期、音频和 -输入实现,但分别保留自身的 MCLK、reset 与器件配置。 +公共 I2C0 使用 SDA GPIO15、SCL GPIO14,先完成 AXP2101 上电,再挂接屏幕、触摸和音频设备。 +本板可选探测地址 `0x20` 的 TCA9554,未发现该器件时可以继续初始化。 -## 构建 +| 信号 | GPIO | +| --- | --- | +| I2S MCLK / BCLK / WS / DOUT / DIN | 42 / 9 / 45 / 8 / 10 | +| QSPI CLK / CS / D0-D3 | 38 / 12 / 4、5、6、7 | +| CO5300 reset | 39 | +| CST9217 reset / INT | 40 / 11 | + +采集和播放共享两槽 16 kHz 标准 I2S;采集提取主麦 slot,播放将 SDK 单声道复制到两个物理 +输出 slot。音量可持久化,未保存过时默认值为 70。屏幕使用 RGB565 局部 DMA 刷新,传输 +起止边界保持偶数像素,不分配完整 framebuffer。 + +## 操作与配网 + +就绪时轻触屏幕或短按 Boot 开始对话,对话中再次操作结束对话。长按屏幕或 Boot 约 3 秒 +请求重新配网;应用先停止 SDK,再进入配网流程,联网成功后重新启动。 +未保存 Wi-Fi 信息时自动进入配网,屏幕显示热点名称并播放提示音;按屏幕提示连接热点 +完成配置。触摸与 Boot 由板级常驻模块管理,SDK 停止期间仍可请求配网。 -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +## 编译与烧录 + +在工程根目录使用 ESP-IDF 5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board esp32-s3-touch-amoled-1.75 --language both ``` -中间构建目录为 `build/build-esp32-s3-touch-amoled-1.75-<语言>/`,默认生成根目录 `releases/esp32-s3-touch-amoled-1.75-zh-CN.bin` 与 -`releases/esp32-s3-touch-amoled-1.75-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +脚本自动启用 LVGL,生成 `releases/esp32-s3-touch-amoled-1.75-zh-CN.bin` 和 +`releases/esp32-s3-touch-amoled-1.75-en-US.bin`,默认清理脚本管理的 `build/` 和 `releases/`。 + +需要独立构建、烧录并查看控制台时,可使用: -## 使用与验证边界 +```sh +idf.py -B build/esp32-s3-touch-amoled-1.75 \ + -DMYBOT_BOARD=esp32-s3-touch-amoled-1.75 \ + -DSDKCONFIG=build/esp32-s3-touch-amoled-1.75/sdkconfig build flash monitor +``` -短触屏幕或短按 Boot 开始/结束对话,长触或长按 3 秒进入配网。采集只提供主麦 slot,保留 -Cloud AEC;未向 SDK 提供播放参考通道或本地 AEC。RTC、IMU、TF 卡、电池状态、自动休眠与 -关机手势尚未接入,硬件产品页列出的器件不代表这些功能已在本固件启用。 +如需指定端口,在命令中增加 `-p` 参数。其他板型必须使用不同的构建目录和 sdkconfig。 -本 profile 尚未完成真机验证,需确认电源时序、显示方向和颜色、触摸及 16 kHz 双向音频。 -编译成功不代表完成上述验证。 +## 支持边界 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +本板与 1.75C 共用生命周期、音频和输入实现,但 MCLK、屏幕复位、触摸复位和 TCA9554 +配置不同。RTC、IMU、TF 卡、电池状态、自动休眠、关机、播放参考通道和本地 AEC 尚未集成。 +当前支持范围为构建集成;电源时序、音频 slot、显示颜色/方向和触摸仍需在匹配实物上验证。 +完整说明见[工程文档](../../../../README.zh-CN.md)和[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c/README.md b/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c/README.md index fcf90d5..bf4f7dc 100644 --- a/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c/README.md +++ b/components/mybot_platform/boards/esp32-s3-touch-amoled-1.75c/README.md @@ -1,49 +1,72 @@ -# Waveshare ESP32-S3-Touch-AMOLED-1.75C +# ESP32-S3-Touch-AMOLED-1.75C -本目录是 agora-esp32-devkit 的 `esp32-s3-touch-amoled-1.75c` 板级 profile。1.75C 与非 C 版本 -的 MCLK、显示和触摸 reset 不同,需选择本板专用固件,不能按屏幕尺寸混用。 +本目录提供 `agora-esp32-devkit` 的 `esp32-s3-touch-amoled-1.75c` 板型配置。 +该板使用独立的引脚 profile,与原始 1.75 和 2.16 版本不能交叉烧录。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、保守的 16 MB QIO Flash profile、80 MHz 8 MB Octal PSRAM | -| 分区 | 根目录 `partitions/v2/16m.csv` | -| 音频 | ES7210 采集、ES8311 播放,16 kHz 单声道 signed 16-bit PCM | -| 公共 I2C0 | SDA GPIO15、SCL GPIO14;AXP2101 `0x34`、ES8311 `0x18`、ES7210 `0x40`、CST9217 `0x5a` | -| I2S | MCLK GPIO16、BCLK GPIO9、WS GPIO45、DIN GPIO10、DOUT GPIO8;PA GPIO46 | -| 显示 | 466 × 466 CO5300 QSPI AMOLED,显示偏移 (6, 0),共享 LVGL UI | -| 显示 reset / 触摸 reset | GPIO1 / GPIO2 | -| 输入 | CST9217 中断 GPIO11、Boot GPIO0 | -| TCA9554 | 不探测且不依赖 | +| 芯片 | ESP32-S3 | +| 存储 | 保守的 16 MB QIO Flash profile;8 MB Octal PSRAM,80 MHz | +| 分区 | `partitions/v2/16m.csv`,双 OTA 应用分区与资源分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台设置,默认 UART0 | +| 电源 | AXP2101 初始化;GPIO46 控制扬声器功放;不探测或依赖 TCA9554 | +| 音频 | ES7210 采集、ES8311 播放;SDK 接口为 16 kHz、单声道、16 位 PCM | +| 显示 | 466 × 466 CO5300 AMOLED,40 MHz QSPI,显示偏移 `(6, 0)`,共享 LVGL 界面 | +| 输入 | CST9217 触摸、GPIO0 Boot 按键 | +| 网络 | Wi-Fi,支持首次自动配网和长按重新配网 | +| 视频 | 未集成摄像头采集,不支持 `CONFIG_MYBOT_ENABLE_VIDEO` | -产品容量描述存在差异;本工程按 16 MB Flash、8 MB PSRAM 使用保守配置,实际物理容量仍需 -通过启动日志核对。确认实际容量之前不要扩大分区。完整定义见 -[board_config.h](board_config.h)、[board.cmake](board.cmake) 与 -[sdkconfig.defaults](sdkconfig.defaults)。 +公共 I2C0 使用 SDA GPIO15、SCL GPIO14,先完成 AXP2101 上电,再挂接屏幕、触摸和音频设备。 +1.75C 的存储资料存在容量差异,因此固件只使用 16 MB 地址空间;扩展分区前必须通过启动 +日志确认实际 Flash 容量并验证分区布局。 -## 构建 +| 信号 | 1.75C GPIO | 原始 1.75 GPIO | +| --- | --- | --- | +| I2S MCLK | 16 | 42 | +| CO5300 reset | 1 | 39 | +| CST9217 reset | 2 | 40 | -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +其他公共信号为 I2S BCLK GPIO9、WS GPIO45、DOUT GPIO8、DIN GPIO10,QSPI CLK GPIO38、 +CS GPIO12、D0-D3 GPIO4/GPIO5/GPIO6/GPIO7,以及 CST9217 INT GPIO11。 + +采集和播放共享两槽 16 kHz 标准 I2S;采集提取主麦 slot,播放将 SDK 单声道复制到两个物理 +输出 slot。音量可持久化,未保存过时默认值为 70。屏幕使用 RGB565 局部 DMA 刷新,传输 +起止边界保持偶数像素,不分配完整 framebuffer。 + +## 操作与配网 + +就绪时轻触屏幕或短按 Boot 开始对话,对话中再次操作结束对话。长按屏幕或 Boot 约 3 秒 +请求重新配网;应用先停止 SDK,再进入配网流程,联网成功后重新启动。 +未保存 Wi-Fi 信息时自动进入配网,屏幕显示热点名称并播放提示音;按屏幕提示连接热点 +完成配置。触摸与 Boot 由板级常驻模块管理,SDK 停止期间仍可请求配网。 + +## 编译与烧录 + +在工程根目录使用 ESP-IDF 5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board esp32-s3-touch-amoled-1.75c --language both ``` -中间构建目录为 `build/build-esp32-s3-touch-amoled-1.75c-<语言>/`,默认生成根目录 `releases/esp32-s3-touch-amoled-1.75c-zh-CN.bin` 与 -`releases/esp32-s3-touch-amoled-1.75c-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +脚本自动启用 LVGL,生成 `releases/esp32-s3-touch-amoled-1.75c-zh-CN.bin` 和 +`releases/esp32-s3-touch-amoled-1.75c-en-US.bin`,默认清理脚本管理的 `build/` 和 `releases/`。 + +需要独立构建、烧录并查看控制台时,可使用: -## 使用与验证边界 +```sh +idf.py -B build/esp32-s3-touch-amoled-1.75c \ + -DMYBOT_BOARD=esp32-s3-touch-amoled-1.75c \ + -DSDKCONFIG=build/esp32-s3-touch-amoled-1.75c/sdkconfig build flash monitor +``` -短触屏幕或短按 Boot 开始/结束对话,长触或长按 3 秒进入配网。采集只提供主麦 slot,保留 -Cloud AEC;未向 SDK 提供播放参考通道或本地 AEC。当前未支持 RTC、IMU、TF 卡、TCA9554、 -电池状态、自动休眠与关机手势。 +如需指定端口,在命令中增加 `-p` 参数。其他板型必须使用不同的构建目录和 sdkconfig。 -本 profile 尚未完成真机验证;电源时序、显示方向和颜色、触摸、容量及 16 kHz 双向音频 -均需在实物上确认,不能以构建成功代替。 +## 支持边界 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +本板复用 `esp32-s3-touch-amoled-1.75-common` 的板级生命周期、音频和输入实现,保留独立 +板型身份。RTC、IMU、TF 卡、电池状态、自动休眠、关机、播放参考通道和本地 AEC 尚未集成。 +当前支持范围为构建集成;电源时序、音频 slot、显示颜色/方向和触摸仍需在匹配实物上验证。 +完整说明见[工程文档](../../../../README.zh-CN.md)和[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/esp32-s3-touch-amoled-2.16/README.md b/components/mybot_platform/boards/esp32-s3-touch-amoled-2.16/README.md index 24c673f..5618cc8 100644 --- a/components/mybot_platform/boards/esp32-s3-touch-amoled-2.16/README.md +++ b/components/mybot_platform/boards/esp32-s3-touch-amoled-2.16/README.md @@ -1,49 +1,73 @@ -# Waveshare ESP32-S3-Touch-AMOLED-2.16 +# ESP32-S3-Touch-AMOLED-2.16 -本目录是 agora-esp32-devkit 的 `esp32-s3-touch-amoled-2.16` 板级 profile,面向 -[Waveshare ESP32-S3-Touch-AMOLED-2.16](https://www.waveshare.com/esp32-s3-touch-amoled-2.16.htm)。 -本板使用独立的 480 像素面板配置,与 1.75/1.75C 固件不能混用。 +本目录提供 `agora-esp32-devkit` 的 `esp32-s3-touch-amoled-2.16` 板型配置。 +硬件资料见 [Waveshare 产品页](https://www.waveshare.com/esp32-s3-touch-amoled-2.16.htm)。 +该板具有独立的板级生命周期与 480 像素面板实现,不能使用 1.75 或 1.75C 的固件。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、保守的 16 MB QIO Flash profile、80 MHz Octal PSRAM;实际容量待核对 | -| 分区 | 根目录 `partitions/v2/16m.csv` | -| 音频 | ES7210 采集、ES8311 播放,16 kHz 单声道 signed 16-bit PCM | -| 公共 I2C0 | SDA GPIO15、SCL GPIO14;AXP2101 `0x34`、ES8311 `0x18`、ES7210 `0x40`、CST9217 `0x5a` | -| I2S | MCLK GPIO42、BCLK GPIO9、WS GPIO45、DIN GPIO10、DOUT GPIO8;PA GPIO46 | -| 显示 | 480 × 480 CO5300 AMOLED,40 MHz QSPI,显示偏移 (0, 0),共享 LVGL UI | -| 显示 reset / 触摸 reset | GPIO39 / GPIO40 | -| 输入 | CST9217 中断 GPIO11、Boot GPIO0 | -| TCA9554 | 在 `0x20` 可选探测,实物是否搭载待核对 | +| 芯片 | ESP32-S3 | +| 存储 | 保守的 16 MB QIO Flash profile;80 MHz Octal PSRAM,实际容量待实物核对 | +| 分区 | `partitions/v2/16m.csv`,双 OTA 应用分区与资源分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台设置,默认 UART0 | +| 电源 | AXP2101 初始化;GPIO46 控制扬声器功放 | +| 音频 | ES7210 采集、ES8311 播放;SDK 接口为 16 kHz、单声道、16 位 PCM | +| 显示 | 480 × 480 CO5300 AMOLED,40 MHz QSPI,无显示偏移,共享 LVGL 界面 | +| 输入 | CST9217 触摸、GPIO0 Boot 按键 | +| 网络 | Wi-Fi,支持首次自动配网和长按重新配网 | +| 视频 | 未集成摄像头采集,不支持 `CONFIG_MYBOT_ENABLE_VIDEO` | -面板使用 RGB565 局部 DMA 刷新,并保持刷新区域起止像素边界为偶数。Flash 与 PSRAM 的实际 -物理容量必须在发布设备上确认。完整配置见 [board_config.h](board_config.h)、 -[board.cmake](board.cmake) 与 [sdkconfig.defaults](sdkconfig.defaults)。 +公共 I2C0 使用 SDA GPIO15、SCL GPIO14,先完成 AXP2101 上电,再挂接屏幕、触摸和音频设备。 +本 profile 可选探测地址 `0x20` 的 TCA9554,未发现时可以继续初始化;实际板上是否搭载 +该器件仍需确认。 -## 构建 +| 信号 | GPIO | +| --- | --- | +| I2S MCLK / BCLK / WS / DOUT / DIN | 42 / 9 / 45 / 8 / 10 | +| QSPI CLK / CS / D0-D3 | 38 / 12 / 4、5、6、7 | +| CO5300 reset | 39 | +| CST9217 reset / INT | 40 / 11 | + +采集和播放复用 AMOLED 1.75 系列音频驱动,共享两槽 16 kHz 标准 I2S;采集提取主麦 slot, +播放将 SDK 单声道复制到两个物理输出 slot。音量可持久化,未保存过时默认值为 70。 +屏幕使用独立的 `co5300_480_panel.c`,采用 RGB565 局部 DMA 刷新,传输起止边界保持 +偶数像素,不分配完整 framebuffer。 + +## 操作与配网 + +就绪时轻触屏幕或短按 Boot 开始对话,对话中再次操作结束对话。长按屏幕或 Boot 约 3 秒 +请求重新配网;应用先停止 SDK,再进入配网流程,联网成功后重新启动。 +未保存 Wi-Fi 信息时自动进入配网,屏幕显示热点名称并播放提示音;按屏幕提示连接热点 +完成配置。触摸与 Boot 由板级常驻模块管理,SDK 停止期间仍可请求配网。 -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +## 编译与烧录 + +在工程根目录使用 ESP-IDF 5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board esp32-s3-touch-amoled-2.16 --language both ``` -中间构建目录为 `build/build-esp32-s3-touch-amoled-2.16-<语言>/`,默认生成根目录 `releases/esp32-s3-touch-amoled-2.16-zh-CN.bin` 与 -`releases/esp32-s3-touch-amoled-2.16-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +脚本自动启用 LVGL,生成 `releases/esp32-s3-touch-amoled-2.16-zh-CN.bin` 和 +`releases/esp32-s3-touch-amoled-2.16-en-US.bin`,默认清理脚本管理的 `build/` 和 `releases/`。 + +需要独立构建、烧录并查看控制台时,可使用: -## 使用与验证边界 +```sh +idf.py -B build/esp32-s3-touch-amoled-2.16 \ + -DMYBOT_BOARD=esp32-s3-touch-amoled-2.16 \ + -DSDKCONFIG=build/esp32-s3-touch-amoled-2.16/sdkconfig build flash monitor +``` -短触屏幕或短按 Boot 开始/结束对话,长触或长按 3 秒进入配网。采集只提供主麦 slot,保留 -Cloud AEC;未向 SDK 提供播放参考通道或本地 AEC。RTC、IMU、TF 卡、电量、关机与低功耗 -尚未接入。 +如需指定端口,在命令中增加 `-p` 参数。其他板型必须使用不同的构建目录和 sdkconfig。 -本 profile 已有中英文 ESP-IDF v5.5.2 构建验证,尚未完成真机验证。电源时序、显示方向和 -颜色、CST9217 输入、TCA9554 搭载情况及 16 kHz 双向音频仍需实物确认。 +## 支持边界 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +中英文固件构建已在 ESP-IDF 5.5.2 验证,真机验证尚未完成。发布前需核对实际 Flash/PSRAM +容量,验证电源时序、480 × 480 显示颜色/方向、触摸和 16 kHz 双向音频。若硬件需要其他 +音频采样率,转换应留在平台驱动内,SDK 的 16 kHz 单声道 PCM 契约保持不变。 +RTC、IMU、TF 卡、电池状态、自动休眠、关机、播放参考通道和本地 AEC 尚未集成。 +完整说明见[工程文档](../../../../README.zh-CN.md)和[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/m5stack-core-s3/README.md b/components/mybot_platform/boards/m5stack-core-s3/README.md index 293746a..d518c83 100644 --- a/components/mybot_platform/boards/m5stack-core-s3/README.md +++ b/components/mybot_platform/boards/m5stack-core-s3/README.md @@ -1,54 +1,58 @@ # M5Stack CoreS3 -本目录是 agora-esp32-devkit 的 `m5stack-core-s3` 板级 profile,提供音频、触摸、像素眼镜 -LVGL UI 与可选 GC0308 视频上行。 +本工程的板型 ID 为 `m5stack-core-s3`,面向带 GC0308 摄像头的 CoreS3。 +[官方硬件文档](https://docs.m5stack.com/en/core/CoreS3)。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、16 MB QIO Flash、80 MHz Quad PSRAM | -| 分区 | 根目录 `partitions/v2/16m.csv` | -| 公共 I2C1 | SDA GPIO12、SCL GPIO11 | -| ES7210 / AW88298 I2S | MCLK GPIO0、BCLK GPIO34、WS GPIO33、DIN GPIO14、DOUT GPIO13 | -| 显示 | 320 × 240 ILI9342,SPI MOSI GPIO37、SCLK GPIO36、CS GPIO3、DC GPIO35 | -| 触摸与电源 | FT6336 `0x38`、AXP2101 `0x34`、AW9523 `0x58` | -| 视频 | GC0308,RTC 连接期间上传 320 × 240 JPEG,最多 1 fps | +| SoC | ESP32-S3 | +| Flash | 16 MB,QIO | +| PSRAM | 8 MB,Quad,80 MHz | +| 分区 | [partitions/v2/16m.csv](../../../../partitions/v2/16m.csv),双 OTA 分区 | +| 控制台 | ESP-IDF 默认 UART0,板级配置未覆盖控制台类型 | +| 音频 | ES7210 采集、AW88298 播放;SDK 边界为 16 kHz 单声道 signed-16 PCM | +| 显示 | 320 × 240 ILI9342,自动使用 LVGL 像素眼镜界面 | +| 输入 | FT6336 触摸:短触开始/结束对话,长按 3 秒进入配网 | +| 摄像头 | GC0308 DVP,320 × 240 YUYV,软件 JPEG,上行最多 1 fps | +| 电源 | AXP2101 与 AW9523,由板级硬件层初始化并控制背光、复位 | -GPIO0 是音频 MCLK,不能当作 Boot 用户按键。音频使用 16 kHz 单声道 signed 16-bit PCM, -启动时恢复持久化音量。完整定义见 [board_config.h](board_config.h)、[board.cmake](board.cmake) -与 [sdkconfig.defaults](sdkconfig.defaults)。 +共享 I2C1 为 SDA GPIO12、SCL GPIO11。I2S0 为 MCLK GPIO0、BCLK GPIO34、WS GPIO33、 +DIN GPIO14、DOUT GPIO13;GPIO0 用于音频时钟,不作为配网按键。LCD SPI3 为 MOSI GPIO37、 +SCLK GPIO36、CS GPIO3、DC GPIO35。 -## 构建 +无已保存的 Wi-Fi 信息时自动进入配网并显示热点名称、播放提示音。已有网络时联网后启动 +SDK;长按触摸会先停止 SDK 再配网。设备音量保存在 NVS,重启后恢复。 -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +## 构建与烧录 + +在仓库根目录使用 ESP-IDF v5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board m5stack-core-s3 --language both ``` -默认自动开启视频,中间构建目录为 `build/build-m5stack-core-s3-<语言>-video/`,生成根目录 `releases/m5stack-core-s3-zh-CN-video.bin` 与 -`releases/m5stack-core-s3-en-US-video.bin`。需要无视频对照固件时运行: +脚本默认开启视频,输出 `releases/m5stack-core-s3-zh-CN-video.bin` 和对应英文固件。 +需要关闭视频时追加 `--video off`。CoreS3-SE 不带 GC0308,不能使用视频固件。 +构建脚本的清理行为见[板卡索引](../README.md)。 + +直接构建中文视频固件并烧录时,使用独立目录;将串口替换为本机设备: ```sh -python3 scripts/build_all.py --board m5stack-core-s3 --language both --video off +idf.py -B build/m5stack-core-s3 \ + -DMYBOT_BOARD=m5stack-core-s3 \ + -DSDKCONFIG=build/m5stack-core-s3/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults;ci/video.defaults" build +idf.py -B build/m5stack-core-s3 -p /dev/ttyUSB0 flash monitor ``` -此时文件名为 `releases/m5stack-core-s3-zh-CN.bin` 与 `releases/m5stack-core-s3-en-US.bin`。 -构建器默认清理所选构建/输出根目录;如需同时保留两组,使用独立输出目录,详见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。 - -## 使用与验证边界 - -短触屏幕开始/结束对话,长按屏幕 3 秒进入配网。当前 UI 使用固定工艺灰像素眼镜皮肤。 -详细行为见 [CoreS3 UI](../../../../docs/CORES3_UI.zh-CN.md) 与 -[CoreS3 视频](../../../../docs/CORES3_VIDEO.zh-CN.md)。 +英文直接构建需在新目录的 defaults 列表追加 `;ci/en-us.defaults`。 -此前固件的配网、双向音频、摄像头上行与旧状态卡片 UI 已有真机结果;这些结果不能代表新 -像素眼镜 UI 已完成真机回归。当前 UI、视频和音频仍需按本轮固件联合验收。摄像头预览、视频 -下行、电池状态和自动休眠尚未接入。构建成功不能替代实机验证。 +## 验证范围 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +已有音频和摄像头通路完成过真机验证;当前像素眼镜 UI、采集调度和 DMA 配置仍需按对应 +文档回归。构建成功不等于硬件验收。详见[像素眼镜 UI](../../../../docs/CORES3_UI.zh-CN.md)、 +[摄像头上行](../../../../docs/CORES3_VIDEO.zh-CN.md)及 +[音频对照测试](../../../../docs/CORES3_AUDIO_TEST.zh-CN.md)。 diff --git a/components/mybot_platform/boards/m5stack-stick-s3/README.md b/components/mybot_platform/boards/m5stack-stick-s3/README.md index e5f14d0..099795b 100644 --- a/components/mybot_platform/boards/m5stack-stick-s3/README.md +++ b/components/mybot_platform/boards/m5stack-stick-s3/README.md @@ -1,45 +1,57 @@ # M5Stack StickS3 -本目录是 agora-esp32-devkit 的 `m5stack-stick-s3` 板级 profile,提供 ES8311 音频、 -ST7789P3 LCD、主按键与 M5PM1 电源初始化。 +本工程的板型 ID 为 `m5stack-stick-s3`。 +[官方硬件文档](https://docs.m5stack.com/zh_CN/core/StickS3)。 -## 硬件与当前 profile +## 当前配置 -| 项目 | 当前配置 | +| 项目 | 本工程实现 | | --- | --- | -| 主控与存储 | ESP32-S3、8 MB QIO Flash、80 MHz 8 MB Octal PSRAM | -| 分区 | 根目录 `partitions/v2/8m.csv` | -| 公共 I2C0 | SDA GPIO47、SCL GPIO48;M5PM1 `0x6e`、ES8311 `0x18` | -| ES8311 I2S | MCLK GPIO18、BCLK GPIO17、WS GPIO15、DIN GPIO16、DOUT GPIO14 | -| LCD | 135 × 240 ST7789P3,显示偏移 (52, 40),共享 LVGL UI | -| LCD SPI3 | MOSI GPIO39、SCLK GPIO40、CS GPIO41、DC GPIO45、RESET GPIO21、背光 GPIO38 | -| 输入 | 主按键 GPIO11,低电平有效 | - -M5PM1 G2 为显示与 codec 供电,在运行期间保持开启;G3 仅在播放期间开启扬声器功放。 -音频使用 16 kHz 单声道 signed 16-bit PCM。完整定义见 [board_config.h](board_config.h)、 -[board.cmake](board.cmake) 与 [sdkconfig.defaults](sdkconfig.defaults)。 - -## 构建 - -在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: +| SoC | ESP32-S3 | +| Flash | 8 MB,QIO | +| PSRAM | 8 MB,Octal,80 MHz | +| 分区 | [partitions/v2/8m.csv](../../../../partitions/v2/8m.csv),双 OTA 分区 | +| 控制台 | ESP-IDF 默认 UART0,板级配置未覆盖控制台类型 | +| 音频 | ES8311;SDK 边界为 16 kHz 单声道 signed-16 PCM,物理 I2S 使用双声道 | +| 显示 | ST7789P3,135 × 240,偏移 (52, 40),自动使用共享 LVGL 界面 | +| 输入 | GPIO11 主按键,低电平有效;短按开始/结束对话,长按 3 秒进入配网 | +| 电源 | M5PM1,G2 为显示与 codec 供电,G3 控制播放功放 | +| 摄像头 | 当前 profile 未提供视频接口,不支持开启视频 | + +共享 I2C0 为 SDA GPIO47、SCL GPIO48,M5PM1 的 7-bit 地址为 `0x6e`,ES8311 为 `0x18`。 +I2S0 为 MCLK GPIO18、BCLK GPIO17、WS GPIO15、DIN GPIO16、DOUT GPIO14。 +LCD SPI3 为 MOSI GPIO39、SCLK GPIO40、CS GPIO41、DC GPIO45、RESET GPIO21; +背光 GPIO38 由 LEDC 驱动,默认亮度 60%。 + +固件运行期间保持 G2 电源开启,播放生命周期控制 G3。音量逻辑值为 0–100,保存到 NVS; +当前 ES8311 硬件音量按逻辑值的 60% 映射。无 Wi-Fi 信息时自动进入配网并显示热点名称、 +播放提示音;长按主按键会先停止 SDK 再重新配网。 + +## 构建与烧录 + +在仓库根目录使用 ESP-IDF v5.5.2: ```sh -. /path/to/esp-idf/export.sh -test "$(idf.py --version)" = "ESP-IDF v5.5.2" +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board m5stack-stick-s3 --language both ``` -中间构建目录为 `build/build-m5stack-stick-s3-<语言>/`,默认生成根目录 `releases/m5stack-stick-s3-zh-CN.bin` 与 -`releases/m5stack-stick-s3-en-US.bin`。构建器默认清理所选构建/输出根目录,详情与烧录入口见 -[根目录构建说明](../../../../README.zh-CN.md#构建)。本板不支持视频构建。 +输出 `releases/m5stack-stick-s3-zh-CN.bin` 和对应英文固件;LVGL 自动启用。 +构建脚本的清理行为见[板卡索引](../README.md)。 -## 使用与验证边界 +直接构建中文固件并烧录时,使用独立目录;将串口替换为本机设备: -短按主按键开始/结束对话,长按 3 秒进入配网。GPIO12、IMU、红外、电池状态、关机手势及 -低功耗尚未接入。硬件上存在这些器件不代表当前固件可使用它们。 +```sh +idf.py -B build/m5stack-stick-s3 \ + -DMYBOT_BOARD=m5stack-stick-s3 \ + -DSDKCONFIG=build/m5stack-stick-s3/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults" build +idf.py -B build/m5stack-stick-s3 -p /dev/ttyUSB0 flash monitor +``` -本 profile 尚未完成真机验证,仍需核对电源时序、LCD 颜色和方向、按键、配网及 16 kHz -双向音频。编译成功不能替代上述硬件验证。 +## 验证范围 -板级集成约定见 [板级移植](../../../../docs/BOARD_PORTING.zh-CN.md), -相关上游许可见 [MIT 许可文本](../../assets/LICENSE.xiaozhi-esp32)。 +当前 profile 尚未完成真机验收,需验证电源时序、16 kHz 双向音频、按键与屏幕颜色/方向。 +GPIO12、IMU、红外、电池状态、关机手势和低功耗未接入。详见 +[平台移植](../../../../docs/BOARD_PORTING.zh-CN.md)及 +[平台 UI](../../../../docs/PLATFORM_UI.zh-CN.md)。 diff --git a/components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao/README.md b/components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao/README.md index 4058ea1..8858955 100644 --- a/components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao/README.md +++ b/components/mybot_platform/boards/respeaker-flex-xvf3800-circular4-xiao/README.md @@ -1,39 +1,61 @@ -# ReSpeaker Flex XVF3800 Circular-4 with XIAO ESP32S3 +# ReSpeaker Flex XVF3800 Circular-4 与 XIAO ESP32S3 -本说明根据本工程的 [board.cmake](board.cmake)、[board_config.h](board_config.h) 和 -[sdkconfig.defaults](sdkconfig.defaults) 整理;参考工程没有该板型的独立 README。 -硬件介绍见 [Seeed Studio ReSpeaker Flex 文档](https://wiki.seeedstudio.com/cn/respeaker_flex_introduction/)。 +本工程的板型 ID 为 `respeaker-flex-xvf3800-circular4-xiao`,面向搭配 XIAO ESP32S3 的 +Circular-4 音频前端。[官方硬件文档](https://wiki.seeedstudio.com/cn/respeaker_flex_introduction/)。 -## 硬件配置 +## 当前配置 -| 项目 | 当前 profile | +| 项目 | 本工程实现 | | --- | --- | -| MCU | XIAO ESP32S3 | +| SoC | XIAO ESP32S3 上的 ESP32-S3 | | Flash | 8 MB,QIO | | PSRAM | 8 MB,Octal,80 MHz | -| 音频 | XVF3800 麦克风前端与 AIC3104 输出,SDK 使用 16 kHz 单声道 PCM | -| I2S | BCLK GPIO8、WS GPIO7、DOUT GPIO44、DIN GPIO43 | -| I2C | SDA GPIO5、SCL GPIO6,400 kHz;AIC3104 `0x18`、XVF3800 `0x2c` | -| 输入 | XIAO Boot GPIO0 与 XVF3800 板载按键 | +| 分区 | [partitions/v2/8m.csv](../../../../partitions/v2/8m.csv),双 OTA 分区 | +| 控制台 | USB Serial/JTAG;禁用 UART0,GPIO43/GPIO44 已用于 I2S | +| 音频 | XVF3800 前端与 AIC3104 输出;SDK 使用 16 kHz 单声道 signed-16 PCM | +| 输入 | XIAO Boot GPIO0 与 XVF3800 板载按键 GPI0/X1D09 | | 显示 | 无屏幕,不编译 LVGL | -| 控制台 | USB Serial/JTAG;GPIO43/44 已用于 I2S | -| 网络 | Wi-Fi | -| 分区 | `partitions/v2/8m.csv` | +| 摄像头 | 当前 profile 未提供视频接口,不支持开启视频 | -XVF3800 提供硬件 AEC,当前 profile 关闭 Cloud AEC。当前 profile 没有摄像头支持。 -采集或播放音频前,必须单独为 XVF3800 烧录 Circular-4 的 **16 kHz 双通道 I2S 固件**; -ESP32-S3 作为 I2S 从机连接。此 ESP32 profile 不提供 XVF3800 固件升级流程。 +共享 I2C0 为 SDA GPIO5、SCL GPIO6,400 kHz;XVF3800 与 AIC3104 的 7-bit 地址分别为 +`0x2c`、`0x18`。I2S0 为 BCLK GPIO8、WS GPIO7、DOUT GPIO44、DIN GPIO43。 -## 构建 +## 音频与输入前提 -在工程根目录激活 ESP-IDF v5.5.2 后执行: +使用前必须单独为 XVF3800 烧录 Circular-4 **16 kHz 双通道 I2S 固件**;本工程不会代为烧录 +该前端固件。ESP32-S3 工作在 I2S 从机模式,从选定的 32-bit 采集 slot 生成 SDK 所需的 +单声道 signed-16 PCM。XVF3800 提供 AEC、波束成形、AGC 与降噪,因此板级配置禁止开启 +Cloud AEC,避免重复处理。音量由平台软件增益控制并保存在 NVS,初始默认值为 40。 + +短按任一已接入按键开始/结束对话,长按 3 秒进入配网;XVF3800 板载按键通过 I2C resource +36 轮询读取。无 Wi-Fi 信息时自动创建配置热点并播放提示音;手动配网前先停止 SDK。 +设备没有屏幕,配网与配对状态通过语音和控制台日志查看。 + +## 构建与烧录 + +在仓库根目录使用 ESP-IDF v5.5.2: ```sh +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board respeaker-flex-xvf3800-circular4-xiao --language both ``` -默认合并产物为 `releases/respeaker-flex-xvf3800-circular4-xiao-zh-CN.bin` 和 -`releases/respeaker-flex-xvf3800-circular4-xiao-en-US.bin`。 +输出 `releases/respeaker-flex-xvf3800-circular4-xiao-zh-CN.bin` 和对应英文固件。 +构建脚本的清理行为见[板卡索引](../README.md)。 + +直接构建中文固件并烧录时,使用独立目录;将串口替换为本机 USB Serial/JTAG 设备: + +```sh +idf.py -B build/respeaker-flex-xvf3800-circular4-xiao \ + -DMYBOT_BOARD=respeaker-flex-xvf3800-circular4-xiao \ + -DSDKCONFIG=build/respeaker-flex-xvf3800-circular4-xiao/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults" build +idf.py -B build/respeaker-flex-xvf3800-circular4-xiao -p /dev/ttyACM0 flash monitor +``` + +## 验证范围 -构建与烧录的完整说明见[项目文档](../../../../README.zh-CN.md#构建)。当前板型的 -实机验证状态见[平台移植文档](../../../../docs/BOARD_PORTING.zh-CN.md)。 +当前 profile 尚未完成真机验收。需验证 XVF 固件版本、时钟方向、通道路由、双向音频、 +声学处理、按键与重复配网。构建成功不能证明这些硬件行为正确。 +详见[平台移植文档](../../../../docs/BOARD_PORTING.zh-CN.md)及 +[项目说明](../../../../README.zh-CN.md)。 diff --git a/components/mybot_platform/boards/sensecap-watcher/README.md b/components/mybot_platform/boards/sensecap-watcher/README.md index eba4ad0..99f9e85 100644 --- a/components/mybot_platform/boards/sensecap-watcher/README.md +++ b/components/mybot_platform/boards/sensecap-watcher/README.md @@ -1,61 +1,66 @@ # SenseCAP Watcher -[English](README_en.md) - -本说明对应 `agora-esp32-devkit` 的 `sensecap-watcher` profile。 -当前实现以本目录的 [board.cmake](board.cmake)、[board_config.h](board_config.h) 和 -[sdkconfig.defaults](sdkconfig.defaults) 为准。 +本工程的板型 ID 为 `sensecap-watcher`。[English](README_en.md)。 ## 当前配置 -| 项目 | 配置 | +| 项目 | 本工程实现 | | --- | --- | -| MCU / 存储 | ESP32-S3;32 MB QIO Flash,Octal PSRAM、80 MHz | -| 音频 | ES8311 与 ES7243E,16 kHz 单声道 PCM | -| 音频 MCLK/BCLK/WS/DIN/DOUT | GPIO10/11/12/15/16 | -| 显示 | 412×412 SPD2010 QSPI,LVGL 状态界面 | -| 公共 I2C | SDA GPIO47、SCL GPIO48;TCA9555 地址 `0x21` | -| 输入 | 编码器 GPIO41/42;TCA9555 P0.3 编码器按键 | -| 分区 | [`partitions/v2/32m-sensecap.csv`](../../../../partitions/v2/32m-sensecap.csv) | - -TCA9555 管理系统、屏幕和 codec 功放的上电时序。旋转编码器调节音量,短按开始或结束 -对话,长按 3 秒进入配网。当前固件尚未接入摄像头、触摸、LED、电池状态、关机和低功耗。 - -## 构建 - -在工程根目录加载 ESP-IDF v5.5.2 环境后执行: +| SoC | ESP32-S3 | +| Flash | 32 MB,QIO,开启 Quad Flash 32-bit 地址支持 | +| PSRAM | Octal,80 MHz;容量由实际设备检测 | +| 分区 | [partitions/v2/32m-sensecap.csv](../../../../partitions/v2/32m-sensecap.csv),保留出厂数据并提供双 4 MB OTA 分区 | +| 控制台 | ESP-IDF 默认 UART0,板级配置未覆盖控制台类型 | +| 音频 | ES7243E 采集、ES8311 播放;SDK 边界为 16 kHz 单声道 signed-16 PCM | +| 显示 | 412 × 412 SPD2010,QSPI,自动使用共享 LVGL 界面 | +| 输入 | 编码器 GPIO41/GPIO42,按键由 TCA9555 P0.3 读取 | +| 电源 | TCA9555 管理系统、LCD 与 codec/功放电源 | +| 摄像头 | 当前 profile 未提供视频接口,不支持开启视频 | + +共享 I2C0 为 SDA GPIO47、SCL GPIO48,TCA9555 的 7-bit 地址为 `0x21`。 +I2S0 为 MCLK GPIO10、BCLK GPIO11、WS GPIO12、DIN GPIO15、DOUT GPIO16。 +LCD QSPI 为 CLK GPIO7、D0 GPIO9、D1 GPIO1、D2 GPIO14、D3 GPIO13、CS GPIO45, +背光为 GPIO8。局部刷新按 4 像素对齐。 + +短按编码器开始/结束对话,长按 3 秒进入配网;代码将左旋映射为音量增加、右旋映射为音量 +降低,旋转方向需实机确认。音量保存到 NVS。无 Wi-Fi 信息时自动进入配网并显示热点名称、 +播放提示音;手动配网前先停止 SDK。 + +## 构建与烧录 + +在仓库根目录使用 ESP-IDF v5.5.2: ```sh +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board sensecap-watcher --language both ``` -脚本通过 `MYBOT_BOARD` 选择本 profile,分别准备 -`build/build-sensecap-watcher-zh-CN/` 和 `build/build-sensecap-watcher-en-US/`。 -中文、英文固件使用各自的服务区域。构建脚本也会生成 `releases/sensecap-watcher-*.bin` -合并镜像;Watcher 应使用下述分段烧录流程,不能直接烧录这些合并镜像。 - -## 烧录并保留工厂数据 +脚本输出 `releases/sensecap-watcher-zh-CN.bin` 和对应英文合并镜像;清理行为见 +[板卡索引](../README.md)。为保留出厂分区,设备烧录请使用下面的独立构建与 `idf.py flash`, +不要直接向整片 Flash 写入合并镜像。 -专用分区表保留从 `0x9000` 开始、长度 204800 字节的 `nvsfactory` 工厂分区。 -首次烧录前,替换实际串口并备份该区域,将备份保存在设备之外并妥善保管: +首次烧录前备份出厂分区,将串口替换为本机设备,并妥善保存备份: ```sh -python -m esptool --chip esp32s3 --port /dev/ttyUSB0 --baud 460800 \ - --before default_reset --after hard_reset --no-stub read_flash 0x9000 204800 nvsfactory.bin +python -m esptool --chip esp32s3 --port /dev/ttyUSB0 --baud 2000000 \ + --before default_reset --after hard_reset --no-stub \ + read_flash 0x9000 204800 nvsfactory.bin ``` -对上述脚本生成的中文工程执行分段烧录并查看日志: +出厂分区 `nvsfactory` 从 `0x9000` 开始,长度为 200 KiB。禁止执行 `erase-flash` 或使用 +其他板型的分区表。下面的标准烧录流程不会写入 `nvsfactory`: ```sh -idf.py -B build/build-sensecap-watcher-zh-CN -p /dev/ttyUSB0 flash monitor +idf.py -B build/sensecap-watcher \ + -DMYBOT_BOARD=sensecap-watcher \ + -DSDKCONFIG=build/sensecap-watcher/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults" build +idf.py -B build/sensecap-watcher -p /dev/ttyUSB0 flash monitor ``` -英文版本使用 `build/build-sensecap-watcher-en-US`。`idf.py flash` 按所选生成工程的 -`flash_args` 写入 bootloader、分区表、OTA 数据和应用分段。应用分段从 `0x200000` -开始,不能把它写到 `0x0`。这些分段避开工厂分区;不要整片擦除,也不要用填充空洞的 -合并镜像覆盖工厂数据。 +## 验证范围 -完整环境及构建选项见[项目构建指南](../../../../README.zh-CN.md#构建)。实机验证状态见 -[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md);编译成功不代表硬件功能已验证。 -参考材料的 MIT 许可保留于 [LICENSE.xiaozhi-esp32](../../assets/LICENSE.xiaozhi-esp32), -第三方归属见[许可说明](../../../../THIRD_PARTY_NOTICES.md)。 +当前 profile 尚未完成真机验收;需验证电源时序、codec 的 16 kHz 工作模式、双向音频、 +编码器、配网和显示。摄像头、触摸、LED、电池状态、关机及低功耗尚未接入。 +详见[平台移植](../../../../docs/BOARD_PORTING.zh-CN.md)及 +[平台 UI](../../../../docs/PLATFORM_UI.zh-CN.md)。 diff --git a/components/mybot_platform/boards/sensecap-watcher/README_en.md b/components/mybot_platform/boards/sensecap-watcher/README_en.md index 660d9e5..1998df7 100644 --- a/components/mybot_platform/boards/sensecap-watcher/README_en.md +++ b/components/mybot_platform/boards/sensecap-watcher/README_en.md @@ -1,66 +1,72 @@ # SenseCAP Watcher -[中文](README.md) +The board ID in this project is `sensecap-watcher`. [简体中文](README.md). -This guide describes the `sensecap-watcher` profile in `agora-esp32-devkit`. Its configuration is -provided by [board.cmake](board.cmake), [board_config.h](board_config.h), and -[sdkconfig.defaults](sdkconfig.defaults). +## Current profile -## Current configuration - -| Item | Configuration | +| Item | Implementation | | --- | --- | -| MCU / storage | ESP32-S3; 32 MB QIO Flash, Octal PSRAM at 80 MHz | -| Audio | ES8311 and ES7243E, 16 kHz mono PCM | -| Audio MCLK/BCLK/WS/DIN/DOUT | GPIO10/11/12/15/16 | -| Display | 412×412 SPD2010 QSPI with the LVGL status view | -| Shared I2C | SDA GPIO47, SCL GPIO48; TCA9555 address `0x21` | -| Input | Rotary encoder GPIO41/42; encoder button on TCA9555 P0.3 | -| Partitions | [`partitions/v2/32m-sensecap.csv`](../../../../partitions/v2/32m-sensecap.csv) | - -TCA9555 controls the system, display, and codec-amplifier power sequence. Rotate the encoder to -change volume, short-press it to start or stop a conversation, and hold it for three seconds to -enter provisioning. Camera, touch, LED, battery reporting, shutdown, and low-power operation are -not implemented by this firmware. - -## Build - -Load ESP-IDF v5.5.2 and run this command from the project root: +| SoC | ESP32-S3 | +| Flash | 32 MB QIO, with Quad Flash 32-bit addressing enabled | +| PSRAM | Octal, 80 MHz; capacity is detected on the device | +| Partitions | [partitions/v2/32m-sensecap.csv](../../../../partitions/v2/32m-sensecap.csv), retaining factory data and two 4 MB OTA slots | +| Console | ESP-IDF's default UART0; the board does not override the console type | +| Audio | ES7243E capture and ES8311 playback; SDK boundary: 16 kHz mono signed-16 PCM | +| Display | 412 × 412 SPD2010 over QSPI; shared LVGL view selected automatically | +| Input | Rotary encoder on GPIO41/GPIO42; button read through TCA9555 P0.3 | +| Power | TCA9555 controls system, LCD and codec/amplifier rails | +| Camera | No video adapter in this profile; enabling video is unsupported | + +Shared I2C0 uses SDA GPIO47 and SCL GPIO48; TCA9555 has the 7-bit address `0x21`. +I2S0 uses MCLK GPIO10, BCLK GPIO11, WS GPIO12, DIN GPIO15 and DOUT GPIO16. +LCD QSPI uses CLK GPIO7, D0 GPIO9, D1 GPIO1, D2 GPIO14, D3 GPIO13 and CS GPIO45; +the backlight is on GPIO8. Partial updates are aligned to four pixels. + +A short encoder-button press starts/stops a conversation; a three-second hold requests Wi-Fi +provisioning. The code maps left rotation to volume up and right rotation to volume down; +verify physical rotation on the device. Volume is persisted in NVS. With no saved Wi-Fi +credentials, provisioning starts automatically, displays the hotspot name and plays a prompt. +Manual provisioning stops SDK before entering setup. + +## Build and flash + +Use ESP-IDF v5.5.2 from the repository root: ```sh +source /path/to/esp-idf/export.sh python3 scripts/build_all.py --board sensecap-watcher --language both ``` -The builder selects this profile through `MYBOT_BOARD` and creates separate -`build/build-sensecap-watcher-zh-CN/` and `build/build-sensecap-watcher-en-US/` directories. -The languages use their respective service regions. The builder also generates merged images -under `releases/sensecap-watcher-*.bin`; use the segmented flashing procedure below for Watcher -and do not flash those merged images. - -## Flash and preserve factory data +The script produces `releases/sensecap-watcher-zh-CN.bin` and its English merged image. +See the [board index](../README.md) for cleanup behavior. To preserve factory data, flash this +device through the dedicated build and `idf.py flash` below; do not write a merged image +across the entire Flash. -The dedicated partition table preserves the `nvsfactory` partition at `0x9000` for 204800 bytes. -Before first flashing, replace the serial port and back up that region. Keep the backup outside -the device in a safe location: +Before the first flash, back up the factory partition. Replace the serial port with your +device's port and keep the backup safe: ```sh -python -m esptool --chip esp32s3 --port /dev/ttyUSB0 --baud 460800 \ - --before default_reset --after hard_reset --no-stub read_flash 0x9000 204800 nvsfactory.bin +python -m esptool --chip esp32s3 --port /dev/ttyUSB0 --baud 2000000 \ + --before default_reset --after hard_reset --no-stub \ + read_flash 0x9000 204800 nvsfactory.bin ``` -Flash the generated English build as separate segments and monitor the device: +The `nvsfactory` partition starts at `0x9000` and occupies 200 KiB. Do not run `erase-flash` +or substitute another board's partition table. Standard flashing below does not write +`nvsfactory`: ```sh -idf.py -B build/build-sensecap-watcher-en-US -p /dev/ttyUSB0 flash monitor +idf.py -B build/sensecap-watcher-en-US \ + -DMYBOT_BOARD=sensecap-watcher \ + -DSDKCONFIG=build/sensecap-watcher-en-US/sdkconfig \ + -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;ci/ptime60.defaults;ci/en-us.defaults" build +idf.py -B build/sensecap-watcher-en-US -p /dev/ttyUSB0 flash monitor ``` -Use `build/build-sensecap-watcher-zh-CN` for Chinese. `idf.py flash` uses the selected build's -`flash_args` to write the bootloader, partition table, OTA data, and application segments. The -application starts at `0x200000`; do not write it at `0x0`. These segments exclude factory data. -Do not erase the whole chip or flash a merged image that fills the factory-data gap. +## Validation scope -See the [project build guide](../../../../README.md#build) for environment setup and build -options, and the [porting guide](../../../../docs/BOARD_PORTING.md) for validation status. -A successful build does not establish real-device behavior. The reference material's MIT license -is retained in [LICENSE.xiaozhi-esp32](../../assets/LICENSE.xiaozhi-esp32); see the -[third-party notices](../../../../THIRD_PARTY_NOTICES.md) for attribution. +This profile has not completed real-device acceptance. Verify power sequencing, the codecs' +16 kHz mode, bidirectional audio, the encoder, provisioning and the display. Camera, touch, +LEDs, battery status, shutdown and low-power support are not integrated. See +[board porting](../../../../docs/BOARD_PORTING.md) and +[platform UI](../../../../docs/PLATFORM_UI.md). diff --git a/components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/README.md b/components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/README.md index 469d2f8..da744ce 100644 --- a/components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/README.md +++ b/components/mybot_platform/boards/xingzhi-cube-1.54tft-wifi/README.md @@ -1,35 +1,71 @@ # 行者 Cube 1.54 TFT Wi-Fi -本说明根据本工程的 [board.cmake](board.cmake)、[board_config.h](board_config.h) 和 -[sdkconfig.defaults](sdkconfig.defaults) 整理;参考工程没有该板型的独立 README。 +本工程的板型 ID 为 `xingzhi-cube-1.54tft-wifi`。接线和能力由本目录的 +[board_config.h](board_config.h)、[board.cmake](board.cmake)、 +[board.c](board.c) 和 [sdkconfig.defaults](sdkconfig.defaults) 定义。 -## 硬件配置 +## 硬件与已接入功能 -| 项目 | 当前 profile | +| 项目 | 当前实现 | | --- | --- | -| MCU | ESP32-S3 | -| Flash | 16 MB,QIO;实际容量待实机核对 | -| PSRAM | Octal,80 MHz;实际容量待实机核对 | -| 显示 | ST7789,240×240,SPI mode 3;GPIO13 PWM 背光 | -| 音频 | 麦克风与扬声器使用独立 I2S,16 kHz 单声道 | -| 输入 | Boot GPIO0、音量加 GPIO40、音量减 GPIO39 | -| 电源保持 | GPIO21 | -| 网络 | Wi-Fi | -| 分区 | `partitions/v2/16m.csv` | +| 主控 | ESP32-S3 | +| Flash | 16 MB QIO profile;实际容量需在目标设备核对 | +| PSRAM | Octal,80 MHz;实际容量需在目标设备核对 | +| 分区 | [16 MB 分区表](../../../../partitions/v2/16m.csv),双 OTA 应用分区及 8 MB assets 分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台配置,使用 UART0 | +| 音频 | 独立麦克风/扬声器 I2S,16 kHz 单声道;软件音量及 NVS 持久化 | +| 显示 | ST7789,240×240,SPI3 mode 3,40 MHz;共享 LVGL UI | +| 输入 | Boot 与音量加减按键;无触摸输入 | +| 电源保持 | GPIO21,整个进程运行期间保持高电平 | +| 网络 / 视频 | Wi-Fi;未接入摄像头,不支持开启 `CONFIG_MYBOT_ENABLE_VIDEO` | -麦克风 WS/BCLK/DIN 分别为 GPIO4/5/6,扬声器 DOUT/BCLK/WS 分别为 GPIO7/15/16。 -显示引脚及方向配置见 `board_config.h`。当前 profile 没有摄像头支持。 +## 引脚与上电行为 -## 构建 +| 功能 | 引脚 | +| --- | --- | +| 麦克风 I2S1 RX | WS GPIO4、BCLK GPIO5、DIN GPIO6 | +| 扬声器 I2S0 TX | DOUT GPIO7、BCLK GPIO15、WS GPIO16 | +| Boot / 音量加 / 音量减 | GPIO0 / GPIO40 / GPIO39,低电平有效 | +| LCD | MOSI GPIO10、SCLK GPIO9、CS GPIO14、DC GPIO8、RESET GPIO18 | +| 背光 | GPIO13,LEDC 5 kHz、13-bit PWM,默认 60% | + +板级初始化先解除 GPIO21 的 RTC hold、恢复普通 GPIO 并拉高以保持系统供电,再初始化 +背光、屏幕和常驻按键。面板使用 RGB 顺序、零偏移、不镜像并启用颜色反转。 + +SDK 音频边界为 16 kHz、单声道、signed-16 PCM;物理标准 I2S 使用 32-bit mono left slot, +由公共 raw I2S 驱动完成转换。播放通过公共 PCM 缓冲连续送入 I2S,初始软件音量默认 70, +后续从 NVS 恢复。当前实现未接入电池/充电监测、关机、休眠或低功耗。 + +## 配网与操作 + +- 短按 Boot:就绪时开始对话,对话中结束对话。 +- 长按 Boot 3 秒:请求配网;应用先停止 SDK,再进入配网模式。 +- 短按音量加减键:调节扬声器音量并持久化。 + +没有 Wi-Fi 凭据时自动进入配网。LCD 显示实际热点名称 `mybot-xxxx`,长文字自动滚动; +连接该热点后访问 `http://192.168.4.1` 配置 Wi-Fi。进入配网时播放对应语言提示音,取得 +可用 IP 后才启动 SDK。 -在工程根目录激活 ESP-IDF v5.5.2 后执行: +## 构建与烧录 + +在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: ```sh python3 scripts/build_all.py --board xingzhi-cube-1.54tft-wifi --language both ``` -默认合并产物为 `releases/xingzhi-cube-1.54tft-wifi-zh-CN.bin` 和 -`releases/xingzhi-cube-1.54tft-wifi-en-US.bin`。 +合并固件输出为 `releases/xingzhi-cube-1.54tft-wifi-zh-CN.bin` 和对应的 `en-US.bin`。 +批量脚本默认清理其专用构建和输出目录,详见[构建说明](../../../../README.zh-CN.md#构建)。 + +使用独立构建目录和 sdkconfig 的手动构建、烧录示例,将 `PORT` 替换为本机串口设备: + +```sh +idf.py -B build/xingzhi-cube-1.54tft-wifi \ + -DMYBOT_BOARD=xingzhi-cube-1.54tft-wifi \ + -DSDKCONFIG=build/xingzhi-cube-1.54tft-wifi/sdkconfig build +idf.py -B build/xingzhi-cube-1.54tft-wifi -p PORT flash monitor +``` -构建与烧录的完整说明见[项目文档](../../../../README.zh-CN.md#构建)。当前板型的 -实机验证状态见[平台移植文档](../../../../docs/BOARD_PORTING.zh-CN.md)。 +构建成功不代表实机验收。实际 Flash/PSRAM 容量、GPIO21 供电保持、PWM 背光、显示方向、 +音频速度/音调和同时采集播放均需在目标硬件核对;验收范围见 +[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/zhengchen-1.54tft-ml307/README.md b/components/mybot_platform/boards/zhengchen-1.54tft-ml307/README.md index 9a81c02..551d03f 100644 --- a/components/mybot_platform/boards/zhengchen-1.54tft-ml307/README.md +++ b/components/mybot_platform/boards/zhengchen-1.54tft-ml307/README.md @@ -1,45 +1,75 @@ # 征辰 1.54 TFT ML307 -本说明对应 `agora-esp32-devkit` 的 `zhengchen-1.54tft-ml307` profile。 -硬件配置以本目录的 [board_config.h](board_config.h)、[board.cmake](board.cmake) 和 +本工程的板型 ID 为 `zhengchen-1.54tft-ml307`。硬件参数以本目录的 +[board_config.h](board_config.h)、[board.cmake](board.cmake) 和 [sdkconfig.defaults](sdkconfig.defaults) 为准。 -## 当前配置 +## 硬件与已接入功能 -| 项目 | 配置 | +| 项目 | 当前实现 | | --- | --- | -| MCU | ESP32-S3 | -| 存储 | 16 MB QIO Flash profile;Octal PSRAM,80 MHz | -| 显示 | 240×240 ST7789,SPI mode 3;LVGL 状态界面 | -| 音频 | 麦克风与扬声器使用独立 I2S,16 kHz 单声道 PCM | -| 麦克风 WS/BCLK/DIN | GPIO4/5/6 | -| 扬声器 DOUT/BCLK/WS | GPIO7/15/16 | -| 输入 | Boot GPIO0、音量加 GPIO10、音量减 GPIO39 | -| 分区 | [`partitions/v2/16m.csv`](../../../../partitions/v2/16m.csv) | - -短按 Boot 开始或结束对话,长按 3 秒进入配网;音量按键调节并持久化扬声器音量。 -当前固件通过 Wi-Fi 联网;ML307 的 UART 引脚已记录,但尚未接入 ML307/4G 网络功能。 +| 主控 | ESP32-S3 | +| Flash | 16 MB,QIO | +| PSRAM | Octal,80 MHz;实际容量以启动日志为准 | +| 分区 | [16 MB 分区表](../../../../partitions/v2/16m.csv),双 OTA 应用分区及 8 MB assets 分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台配置,使用 UART0 | +| 音频 | 独立麦克风/扬声器 I2S,16 kHz 单声道;软件音量及 NVS 持久化 | +| 显示 | ST7789,240×240,SPI3 mode 3,40 MHz;共享 LVGL UI | +| 输入 | Boot 与音量加减按键;无触摸输入 | +| 网络 | Wi-Fi 配网与联网 | +| 视频 | 未接入,不支持开启 `CONFIG_MYBOT_ENABLE_VIDEO` | + +ML307 的 RX GPIO11、TX GPIO12 仅在头文件中保留定义;当前 profile 没有 Modem 驱动、 +PPP 或 4G 联网实现,网络仍使用 Wi-Fi。 + +## 引脚与上电行为 + +| 功能 | 引脚 | +| --- | --- | +| 麦克风 I2S1 RX | WS GPIO4、BCLK GPIO5、DIN GPIO6 | +| 扬声器 I2S0 TX | DOUT GPIO7、BCLK GPIO15、WS GPIO16 | +| Boot / 音量加 / 音量减 | GPIO0 / GPIO10 / GPIO39,低电平有效 | +| LCD | MOSI GPIO41、SCLK GPIO42、CS GPIO21、DC GPIO40、RESET GPIO45 | +| 显示电源 / 背光 | GPIO2 / GPIO20 | + +板级初始化先拉高 GPIO2,关闭背光后初始化屏幕、显示启动页并注册按键。GPIO20 使用开关 +控制背光,默认点亮;没有 PWM 调光。该板型与征辰 Wi-Fi 板共用 +[板级生命周期](../zhengchen-1.54tft-common/board.c)。 + +SDK 音频边界为 16 kHz、单声道、signed-16 PCM;物理标准 I2S 使用 32-bit mono left slot, +由平台驱动完成数据转换。播放通过公共 PCM 缓冲连续送入 I2S,初始软件音量默认 70,后续 +从 NVS 恢复。具体实现见[音频播放说明](../../../../docs/AUDIO_PLAYBACK.zh-CN.md)。 + +## 配网与操作 + +- 短按 Boot:就绪时开始对话,对话中结束对话。 +- 长按 Boot 3 秒:请求配网;应用先停止 SDK,再进入配网模式。 +- 短按音量加减键:调节扬声器音量并持久化。 + +没有 Wi-Fi 凭据时自动进入配网。LCD 显示实际热点名称 `mybot-xxxx`,长文字自动滚动; +连接该热点后访问 `http://192.168.4.1` 配置 Wi-Fi。进入配网时播放对应语言提示音,取得 +可用 IP 后才启动 SDK。 ## 构建与烧录 -在工程根目录加载 ESP-IDF v5.5.2 环境后执行: +在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: ```sh python3 scripts/build_all.py --board zhengchen-1.54tft-ml307 --language both ``` -脚本通过 `MYBOT_BOARD` 选择本 profile,默认生成 -`releases/zhengchen-1.54tft-ml307-zh-CN.bin` 和 -`releases/zhengchen-1.54tft-ml307-en-US.bin`。分语言构建目录位于 -`build/build-zhengchen-1.54tft-ml307-<语言>/`。 +合并固件输出为 `releases/zhengchen-1.54tft-ml307-zh-CN.bin` 和对应的 `en-US.bin`。 +批量脚本默认清理其专用构建和输出目录,详见[构建说明](../../../../README.zh-CN.md#构建)。 -例如烧录中文生成工程并查看日志,将串口替换为实际端口: +需要使用 `idf.py` 逐步构建、烧录时,使用独立的构建目录和 sdkconfig: ```sh -idf.py -B build/build-zhengchen-1.54tft-ml307-zh-CN -p /dev/ttyUSB0 flash monitor +idf.py -B build/zhengchen-1.54tft-ml307 \ + -DMYBOT_BOARD=zhengchen-1.54tft-ml307 \ + -DSDKCONFIG=build/zhengchen-1.54tft-ml307/sdkconfig build +idf.py -B build/zhengchen-1.54tft-ml307 -p /dev/tty.wchusbserial1430 flash monitor ``` -环境、输出目录清理规则及其他构建选项见[项目构建指南](../../../../README.zh-CN.md#构建)。 -充电状态、电池 ADC、温度监测、自动休眠和低功耗尚未接入;构建成功不能替代实机验证。 -验证状态见[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md),第三方归属见 -[许可说明](../../../../THIRD_PARTY_NOTICES.md)。 +上述串口名为该征辰板在 macOS 上的设备名,其他系统按实际枚举结果选择端口。构建成功 +不代表实机验收;音频、屏幕颜色/方向、按键及重复配网应在目标设备上验证,参见 +[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/boards/zhengchen-1.54tft-wifi/README.md b/components/mybot_platform/boards/zhengchen-1.54tft-wifi/README.md index 1e69c60..f356cb4 100644 --- a/components/mybot_platform/boards/zhengchen-1.54tft-wifi/README.md +++ b/components/mybot_platform/boards/zhengchen-1.54tft-wifi/README.md @@ -1,45 +1,73 @@ # 征辰 1.54 TFT Wi-Fi -本说明对应 `agora-esp32-devkit` 的 `zhengchen-1.54tft-wifi` profile。 -硬件配置以本目录的 [board_config.h](board_config.h)、[board.cmake](board.cmake) 和 +本工程的板型 ID 为 `zhengchen-1.54tft-wifi`。硬件参数以本目录的 +[board_config.h](board_config.h)、[board.cmake](board.cmake) 和 [sdkconfig.defaults](sdkconfig.defaults) 为准。 -## 当前配置 +## 硬件与已接入功能 -| 项目 | 配置 | +| 项目 | 当前实现 | | --- | --- | -| MCU | ESP32-S3 | -| 存储 | 16 MB QIO Flash profile;Octal PSRAM,80 MHz | -| 显示 | 240×240 ST7789,SPI mode 3;LVGL 状态界面 | -| 音频 | 麦克风与扬声器使用独立 I2S,16 kHz 单声道 PCM | -| 麦克风 WS/BCLK/DIN | GPIO4/5/6 | -| 扬声器 DOUT/BCLK/WS | GPIO7/15/16 | -| 输入 | Boot GPIO0、音量加 GPIO10、音量减 GPIO39 | -| 分区 | [`partitions/v2/16m.csv`](../../../../partitions/v2/16m.csv) | - -短按 Boot 开始或结束对话,长按 3 秒进入配网;音量按键调节并持久化扬声器音量。 -当前固件通过 Wi-Fi 联网;实际 PSRAM 容量仍需在目标硬件上核对。 +| 主控 | ESP32-S3 | +| Flash | 16 MB,QIO | +| PSRAM | Octal,80 MHz;实际容量以启动日志为准 | +| 分区 | [16 MB 分区表](../../../../partitions/v2/16m.csv),双 OTA 应用分区及 8 MB assets 分区 | +| 控制台 | 未覆盖 ESP-IDF 默认控制台配置,使用 UART0 | +| 音频 | 独立麦克风/扬声器 I2S,16 kHz 单声道;软件音量及 NVS 持久化 | +| 显示 | ST7789,240×240,SPI3 mode 3,40 MHz;共享 LVGL UI | +| 输入 | Boot 与音量加减按键;无触摸输入 | +| 网络 | Wi-Fi 配网与联网 | +| 视频 | 未接入,不支持开启 `CONFIG_MYBOT_ENABLE_VIDEO` | + +## 引脚与上电行为 + +| 功能 | 引脚 | +| --- | --- | +| 麦克风 I2S1 RX | WS GPIO4、BCLK GPIO5、DIN GPIO6 | +| 扬声器 I2S0 TX | DOUT GPIO7、BCLK GPIO15、WS GPIO16 | +| Boot / 音量加 / 音量减 | GPIO0 / GPIO10 / GPIO39,低电平有效 | +| LCD | MOSI GPIO41、SCLK GPIO42、CS GPIO21、DC GPIO40、RESET GPIO45 | +| 显示电源 / 背光 | GPIO2 / GPIO20 | + +板级初始化先拉高 GPIO2,关闭背光后初始化屏幕、显示启动页并注册按键。GPIO20 使用开关 +控制背光,默认点亮;没有 PWM 调光。该板型与征辰 ML307 板共用 +[板级生命周期](../zhengchen-1.54tft-common/board.c),本 profile 不配置或访问 GPIO11、 +GPIO12,也不包含蜂窝网络能力。 + +SDK 音频边界为 16 kHz、单声道、signed-16 PCM;物理标准 I2S 使用 32-bit mono left slot, +由平台驱动完成数据转换。播放通过公共 PCM 缓冲连续送入 I2S,初始软件音量默认 70,后续 +从 NVS 恢复。电池 ADC、充电状态、休眠与低功耗未在该 profile 中实现。 + +## 配网与操作 + +- 短按 Boot:就绪时开始对话,对话中结束对话。 +- 长按 Boot 3 秒:请求配网;应用先停止 SDK,再进入配网模式。 +- 短按音量加减键:调节扬声器音量并持久化。 + +没有 Wi-Fi 凭据时自动进入配网。LCD 显示实际热点名称 `mybot-xxxx`,长文字自动滚动; +连接该热点后访问 `http://192.168.4.1` 配置 Wi-Fi。进入配网时播放对应语言提示音,取得 +可用 IP 后才启动 SDK。 ## 构建与烧录 -在工程根目录加载 ESP-IDF v5.5.2 环境后执行: +在工程根目录激活 ESP-IDF v5.5.2 后构建中英文固件: ```sh python3 scripts/build_all.py --board zhengchen-1.54tft-wifi --language both ``` -脚本通过 `MYBOT_BOARD` 选择本 profile,默认生成 -`releases/zhengchen-1.54tft-wifi-zh-CN.bin` 和 -`releases/zhengchen-1.54tft-wifi-en-US.bin`。分语言构建目录位于 -`build/build-zhengchen-1.54tft-wifi-<语言>/`。 +合并固件输出为 `releases/zhengchen-1.54tft-wifi-zh-CN.bin` 和对应的 `en-US.bin`。 +批量脚本默认清理其专用构建和输出目录,详见[构建说明](../../../../README.zh-CN.md#构建)。 -例如烧录中文生成工程并查看日志,将串口替换为实际端口: +需要使用 `idf.py` 逐步构建、烧录时,使用独立的构建目录和 sdkconfig: ```sh -idf.py -B build/build-zhengchen-1.54tft-wifi-zh-CN -p /dev/ttyUSB0 flash monitor +idf.py -B build/zhengchen-1.54tft-wifi \ + -DMYBOT_BOARD=zhengchen-1.54tft-wifi \ + -DSDKCONFIG=build/zhengchen-1.54tft-wifi/sdkconfig build +idf.py -B build/zhengchen-1.54tft-wifi -p /dev/tty.wchusbserial1430 flash monitor ``` -环境、输出目录清理规则及其他构建选项见[项目构建指南](../../../../README.zh-CN.md#构建)。 -充电状态、电池 ADC、温度监测、自动休眠和低功耗尚未接入;构建成功不能替代实机验证。 -验证状态见[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md),第三方归属见 -[许可说明](../../../../THIRD_PARTY_NOTICES.md)。 +上述串口名为该征辰板在 macOS 上的设备名,其他系统按实际枚举结果选择端口。构建成功 +不代表实机验收;音频、屏幕颜色/方向、按键及重复配网应在目标设备上验证,参见 +[平台移植说明](../../../../docs/BOARD_PORTING.zh-CN.md)。 diff --git a/components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_LICENSE.txt b/components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_LICENSE.txt deleted file mode 100644 index bea3f83..0000000 --- a/components/mybot_platform/src/drivers/display/assets/licenses/LVGL_VIEW_LICENSE.txt +++ /dev/null @@ -1,25 +0,0 @@ -Layout reference: https://github.com/78/xiaozhi-esp32 -Reference files: main/display/lcd_display.cc and main/display/lvgl_display/lvgl_theme.cc - -MIT License - -Copyright (c) 2025 Shenzhen Xinzhi Future Technology Co., Ltd. -Copyright (c) 2025 Project Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc b/components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc index f88fc99..852057f 100644 --- a/components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc +++ b/components/mybot_platform/src/drivers/display/renderers/lvgl/lvgl_view.cc @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: MIT */ /* Copyright (c) 2026 Project Contributors */ -/* Status/content/notification layout adapted from the MIT-licensed display - * reference identified in LVGL_VIEW_LICENSE.txt. */ #include "display/lvgl_view.h" #include "display/lvgl_assets.h" #include "network/wifi_control.h" diff --git a/components/mybot_stack/mybot_sdk/mybot/CHANGELOG.md b/components/mybot_stack/mybot_sdk/mybot/CHANGELOG.md index f527572..56e47e4 100644 --- a/components/mybot_stack/mybot_sdk/mybot/CHANGELOG.md +++ b/components/mybot_stack/mybot_sdk/mybot/CHANGELOG.md @@ -9,6 +9,10 @@ This project follows Semantic Versioning. ## [Unreleased] +### Changed + +- Refresh the Chinese and English pairing-code prompt and digit audio. + ## [1.3.0] - 2026-10-19 ### Added diff --git a/components/mybot_stack/mybot_sdk/mybot/THIRD_PARTY_NOTICES.md b/components/mybot_stack/mybot_sdk/mybot/THIRD_PARTY_NOTICES.md index 7cd4d25..f12545e 100644 --- a/components/mybot_stack/mybot_sdk/mybot/THIRD_PARTY_NOTICES.md +++ b/components/mybot_stack/mybot_sdk/mybot/THIRD_PARTY_NOTICES.md @@ -36,41 +36,6 @@ File-specific copyright and license headers also remain in force. `src/support/mybot_json.c` and `src/internal/mybot_json.h` are namespaced derivatives of cJSON. They retain the MIT license and Dave Gamble copyright notice in the source. -## xiaozhi-esp32 announcement assets - -The firmware's [announcement assets](../../../../components/mybot_platform/assets/locales) -derive from the xiaozhi-esp32 project -(https://github.com/78/xiaozhi-esp32), which is distributed under the MIT License -(c) 2025 Shenzhen Xinzhi Future Technology Co., Ltd. and Project Contributors. The pairing-code -prompt and digit sounds retain the full MIT notice below, which must accompany any redistribution -of these files. - - MIT License - - Copyright (c) 2025 Shenzhen Xinzhi Future Technology Co., Ltd. - Copyright (c) 2025 Project Contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -The firmware also retains the MIT notice in -[LICENSE.xiaozhi-esp32](../../../../components/mybot_platform/assets/LICENSE.xiaozhi-esp32). - ## Release requirement Publish a release artifact containing the bundled Agora binary only after its license and written