mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2026-07-21 10:15:56 +00:00
Migrate board builds to ESP-IDF 6.0.1
This commit is contained in:
@@ -92,7 +92,7 @@ jobs:
|
||||
include: ${{ fromJson(needs.prepare.outputs.variants) }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: espressif/idf:v5.5.2
|
||||
image: espressif/idf:v6.0.1
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -0,0 +1,216 @@
|
||||
# ESP-IDF 6.0 Migration and Board Compatibility Status
|
||||
|
||||
> Last updated: 2026-07-16
|
||||
> Validated SDK: ESP-IDF v6.0.1
|
||||
> Scope: 137 board directories and 157 supported build variants defined by `main/boards/**/config.json`.
|
||||
|
||||
## Current Status
|
||||
|
||||
The shared code and major dependencies have been migrated to IDF 6, and representative ESP32, C3, C5, C6, S3, and ESP32-P4 v3.x variants have been fully built. Of the 157 supported variants, 7 have passed a full build, 148 have completed the shared migration but still require per-board builds, and 2 have confirmed upstream blockers. Fourteen legacy ESP32-P4 Rev < 3 variants have been removed from the supported release matrix.
|
||||
|
||||
| Status | Variants | Meaning |
|
||||
|---|---:|---|
|
||||
| ✅ Full build passed | 7 | Clean/full build completed locally with ESP-IDF 6.0.1; this does not imply hardware or complete peripheral validation |
|
||||
| 🟡 Ported, per-board build pending | 148 | Shared dependencies and source code have been migrated, but this variant has not yet received an individual full build |
|
||||
| 🔴 Blocked by upstream | 2 | An upstream component either has no IDF 6 artifact or explicitly rejects IDF 6 |
|
||||
|
||||
By chip family, the confirmed blockers affect one ESP32-C5 variant and one ESP32-S3 variant. Legacy ESP32-P4 Rev < 3 is no longer supported; ESP32-P4 v3.x remains in scope. ESP32, C3, C6, and supported P4 v3.x variants currently have no known component-level hard blockers.
|
||||
|
||||
Full-build results for representative variants are shown below. Firmware size and free space are reported by ESP-IDF 6.0.1 `check_sizes.py`. `xmini-c3` was rebuilt successfully against the final source state, and `esp-p4-function-ev-board` was rebuilt successfully after removing `cpp_bus_driver`.
|
||||
|
||||
| Chip | Build variant | Application size | Free space in smallest app partition |
|
||||
|---|---|---:|---:|
|
||||
| ESP32 | `bread-compact-esp32` | `0x240560` | 23% |
|
||||
| ESP32-C3 | `esp-hi` | `0x20ef10` | 30% |
|
||||
| ESP32-C3 | `xmini-c3` | `0x2370f0` | 44% |
|
||||
| ESP32-C5 | `waveshare-esp32-c5-touch-lcd-1.69` | `0x27cd30` | 37% |
|
||||
| ESP32-C6 | `waveshare-esp32-c6-lcd-0.85` | `0x280ee0` | 15% |
|
||||
| ESP32-S3 | `doit-s3-aibox` | `0x21edf0` | 46% |
|
||||
| ESP32-P4 v3.x | `esp-p4-function-ev-board` | `0x385420` | 11% |
|
||||
|
||||
As a negative test, `esp-p4-function-ev-board` (legacy P4 Rev < 3) was rejected as expected by `esp-sr 2.4.6` during IDF 6.0.1 configuration. Legacy P4 variants have therefore been removed from the supported release matrix instead of being carried as permanent blockers.
|
||||
|
||||
For backward-compatibility regression coverage, `xmini-c3` also completed a full build with ESP-IDF 5.5.4 (application size `0x234920`, 44% free in the smallest app partition). This confirms that the compatibility changes for I2S port numbering, LCD I2C configuration, and the UHCI DMA dependency did not break the existing 5.5 build chain.
|
||||
|
||||
## Component Compatibility
|
||||
|
||||
| Component/module | Version or approach for IDF 6 | Status | Notes |
|
||||
|---|---|---|---|
|
||||
| `78/uart-uhci` | `0.3.0` + local CMake patch | ✅ Ported | Source supports IDF >= 5.5.2; the patch uses `esp_hw_support` on IDF 5.x and the split `esp_driver_dma` component on IDF 6.x |
|
||||
| `78/uart-eth-modem` | `0.6.0` | ✅ Upstream support | Updated for the new event callback and depends on `uart-uhci 0.3.x` |
|
||||
| `espressif/mqtt` | `1.0.0` | ✅ Upstream support | MQTT moved from a built-in SDK component to a Component Manager dependency in IDF 6 |
|
||||
| `78/esp-ml307` | `3.6.5` + local manifest patch | ✅ Ported | Explicitly adds `espressif/mqtt` for IDF >= 6 and upgrades `uart-uhci` |
|
||||
| `espressif/esp_hosted` / `esp_wifi_remote` | `2.12.11` / `1.6.2` | ✅ Upstream support | Used for ESP32-P4 Hosted Wi-Fi |
|
||||
| `espressif/esp_video` | `^2.0.1` | ✅ Upstream support | Currently resolves to 2.3.0 on S3 and 2.0.1 on P4 due to BSP constraints |
|
||||
| P4 BSP / LCD drivers | BSP `5.2.3`, EK79007/ST7701 `2.0.x` | ✅ Upstream support | Resolves IDF 6 DPI, color-field, and split-driver-component issues |
|
||||
| `esp_emote_expression` | `1.0.2` | ✅ Upstream support | Replaces the previous dependency on the built-in `json` component |
|
||||
| `sscma_client` | `1.0.2` + local CMake patch | ✅ Ported | Uses `espressif/cjson` on IDF 6 and adds dependencies for split driver components |
|
||||
| `espressif/servo` / `espfriends/servo_dog_ctrl` | `1.0.0` / `0.2.0` | ✅ Upstream support | Uses official registry releases; compilation and linking were validated in the full IDF 6.0.1 build of `esp-hi`, with no local override required |
|
||||
| `esp_lcd_nv3023` | Local compatibility patch | ✅ Ported | Supports the IDF 6 `rgb_ele_order` field |
|
||||
| `llgok/cpp_bus_driver` | Excluded from the IDF 6 baseline | ⚪ Waiting for upstream | Version `2.1.0` still requires local patches for IDF 6. It is used only by the `LILYGO T-Display-P4` source, and that board has no release `config.json`, so the component has been removed until upstream support is available |
|
||||
| MQTT protocol AES-CTR | PSA Crypto | ✅ Ported | Replaces the legacy AES context API removed by IDF 6 / Mbed TLS 4 |
|
||||
| BluFi security negotiation (conditional path) | Legacy Mbed TLS DHM/AES API | ⚪ Not yet migrated | None of the 157 supported release variants enables it. IDF 6 removed `mbedtls/dhm.h`; compatibility of the official PSA FFDH + AES-CTR approach with the existing mobile-client protocol must be evaluated |
|
||||
| `espressif/bmi270_sensor` | Latest version remains `0.1.1` | 🔴 Unsupported | Provides prebuilt libraries only for IDF 5.3/5.4/5.5; affects ESP Spot C5 and ESP Vocat |
|
||||
| `touch_slider_sensor` / `touch_button_sensor` | Current versions | 🔴 Unsupported | Their manifests require IDF < 6.0; affects ESP Vocat |
|
||||
| ESP32-P4 Rev < 3 / `espressif/esp-sr` | Not included | ⚫ Out of scope | Legacy P4 support and its 14 release variants have been removed; ESP32-P4 v3.x is unaffected |
|
||||
|
||||
## Per-Board Progress
|
||||
|
||||
In the table below, "Board" is the source directory and "Build variant" is the firmware name used by the release script. Different chip revisions of the same board may have different status, so they are split into separate rows when necessary.
|
||||
|
||||
| Chip | Board | Build variant | IDF 6.0 status | Current validation | Blocker/next step |
|
||||
|---|---|---|---|---|---|
|
||||
| `esp32` | `atommatrix-echo-base` | `atommatrix-echo-base` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32` | `bread-compact-esp32` | `bread-compact-esp32` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32` | `bread-compact-esp32` | `bread-compact-esp32-128x32` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32` | `bread-compact-esp32-lcd` | `bread-compact-esp32-lcd` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32` | `esp32-cgc` | `esp32-cgc` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32` | `esp32-cgc-144` | `esp32-cgc-144` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32` | `waveshare/esp32-touch-lcd-3.5` | `waveshare-esp32-touch-lcd-3.5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `esp-hi` | `esp-hi` | ✅ Full build passed | IDF 6.0.1 `idf.py build`; `servo_dog_ctrl 0.2.0` | Hardware smoke, servo, and audio peripheral regression pending |
|
||||
| `esp32c3` | `kevin-c3` | `kevin-c3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `lichuang-c3-dev` | `lichuang-c3-dev` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `magiclick-c3` | `magiclick-c3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `magiclick-c3-v2` | `magiclick-c3-v2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `surfer-c3-1.14tft` | `surfer-c3-1.14tft` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `xmini-c3` | `xmini-c3` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32c3` | `xmini-c3-4g` | `xmini-c3-4g` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c3` | `xmini-c3-v3` | `xmini-c3-v3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c5` | `esp-sensairshuttle` | `esp-sensairshuttle` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c5` | `esp-spot` | `esp-spot-c5` | 🔴 Blocked by upstream | Component artifact review + configure-time guard | BMI270 0.1.1 has no prebuilt ESP-IDF 6.0 library |
|
||||
| `esp32c5` | `movecall-moji2-esp32c5` | `movecall-moji2-esp32c5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c5` | `waveshare/esp32-c5-touch-lcd-1.69` | `waveshare-esp32-c5-touch-lcd-1.69` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32c6` | `waveshare/esp32-c6-lcd-0.85` | `waveshare-esp32-c6-lcd-0.85` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32c6` | `waveshare/esp32-c6-lcd-1.69` | `waveshare-esp32-c6-lcd-1.69` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-amoled-1.32` | `waveshare-esp32-c6-touch-amoled-1.32` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-amoled-1.43` | `waveshare-esp32-c6-touch-amoled-1.43` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-amoled-1.8` | `waveshare-esp32-c6-touch-amoled-1.8` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-amoled-2.06` | `waveshare-esp32-c6-touch-amoled-2.06` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-amoled-2.16` | `waveshare-esp32-c6-touch-amoled-2.16` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-lcd-1.54` | `waveshare-esp32-c6-touch-lcd-1.54` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32c6` | `waveshare/esp32-c6-touch-lcd-1.83` | `waveshare-esp32-c6-touch-lcd-1.83` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `aipi-lite` | `aipi-lite` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3` | `atk-dnesp32s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3-box` | `atk-dnesp32s3-box` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3-box0` | `atk-dnesp32s3-box0` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3-box2-4g` | `atk-dnesp32s3-box2-4g` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3-box2-wifi` | `atk-dnesp32s3-box2-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atk-dnesp32s3-box3` | `atk-dnesp32s3-box3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atom-echos3r` | `atom-echos3r` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atoms3-echo-base` | `atoms3-echo-base` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atoms3r-cam-m12-echo-base` | `atoms3r-cam-m12-echo-base` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atoms3r-echo-base` | `atoms3r-echo-base` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `atoms3r-echo-pyramid` | `atoms3r-echo-pyramid` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `bread-compact-ml307` | `bread-compact-ml307`<br>`bread-compact-ml307-128x64` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `bread-compact-nt26` | `bread-compact-nt26` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `bread-compact-wifi` | `bread-compact-wifi`<br>`bread-compact-wifi-128x64` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `df-k10` | `df-k10` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `df-s3-ai-cam` | `df-s3-ai-cam` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `doit-s3-aibox` | `doit-s3-aibox` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32s3` | `du-chatx` | `du-chatx` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `electron-bot` | `electron-bot` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-box` | `esp-box` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-box-3` | `esp-box-3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-box-lite` | `esp-box-lite` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-s3-lcd-ev-board` | `esp-s3-lcd-ev-board-1p4`<br>`esp-s3-lcd-ev-board-1p5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-s3-lcd-ev-board-2` | `esp-s3-lcd-ev-board-2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-sparkbot` | `esp-sparkbot` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp-vocat` | `esp-vocat` | 🔴 Blocked by upstream | Component artifact review + configure-time guard | BMI270 0.1.1 has no IDF 6 library; touch_slider/touch_button require IDF < 6.0 |
|
||||
| `esp32s3` | `esp32s3-korvo2-v3` | `esp32s3-korvo2-v3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `esp32s3-korvo2-v3-rndis` | `esp32s3-korvo2-v3-rndis` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `freenove-esp32s3-display-2.8-lcd` | `freenove-esp32s3-display-2.8-lcd` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `genjutech-s3-1.54tft` | `genjutech-s3-1.54tft` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `hu-087` | `hu-087` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `jiuchuan-s3` | `jiuchuan-s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `kevin-box-2` | `kevin-box-2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `kevin-sp-v4-dev` | `kevin-sp-v4-dev` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `kevin-yuying-313lcd` | `kevin-yuying-313lcd` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `labplus-ledong-v2` | `labplus-ledong-v2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `labplus-mpython-v3` | `labplus-mpython-v3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lceda-course-examples/eda-robot-pro` | `lceda-course-examples-eda-robot-pro` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lceda-course-examples/eda-super-bear` | `lceda-course-examples-eda-super-bear` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lceda-course-examples/eda-tv-pro` | `lceda-course-examples-eda-tv-pro` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lichuang-dev` | `lichuang-dev` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lilygo-t-cameraplus-s3` | `lilygo-t-cameraplus-s3`<br>`lilygo-t-cameraplus-s3_v1_2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lilygo-t-circle-s3` | `lilygo-t-circle-s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `lilygo-t-display-s3-pro-mvsrlora` | `lilygo-t-display-s3-pro-mvsrlora` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `m5stack-cardputer-adv` | `m5stack-cardputer-adv` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `m5stack-core-s3` | `m5stack-core-s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `m5stack-stick-s3` | `m5stack-stick-s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `m5stack-stopwatch` | `m5stack-stopwatch` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `magiclick-2p4` | `magiclick-2p4` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `magiclick-2p5` | `magiclick-2p5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `minsi-k08-dual` | `minsi-k08-dual` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `mixgo-nova` | `mixgo-nova` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `movecall-cuican-esp32s3` | `movecall-cuican-esp32s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `movecall-moji-esp32s3` | `movecall-moji-esp32s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `nulllab-ai-vox-v3` | `nulllab-ai-vox-v3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `otto-robot` | `otto-robot` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `quandong-s3-dev` | `quandong-s3-dev` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `rymcu/bigsmart` | `rymcu-bigsmart` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `sensecap-watcher` | `sensecap-watcher` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `sp-esp32-s3-1.28-box` | `sp-esp32-s3-1.28-box` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `sp-esp32-s3-1.54-muma` | `sp-esp32-s3-1.54-muma` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `taiji-pi-s3` | `taiji-pi-s3`<br>`taiji-pi-s3-pdm` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `tudouzi` | `tudouzi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-audio-board` | `waveshare-esp32-s3-audio-board` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-cam` | `waveshare-esp32-s3-cam-2`<br>`waveshare-esp32-s3-cam-2.8`<br>`waveshare-esp32-s3-cam-3.5`<br>`waveshare-esp32-s3-cam-1.83` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-epaper-1.54` | `waveshare-esp32-s3-epaper-1.54-v2`<br>`waveshare-esp32-s3-epaper-1.54-v1` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-epaper-3.97` | `waveshare-esp32-s3-epaper-3.97` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-lcd-0.85` | `waveshare-esp32-s3-lcd-0.85` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-rgb-matrix` | `waveshare-esp32-s3-rgb-matrix` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-rlcd-4.2` | `waveshare-esp32-s3-rlcd-4.2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-1.32` | `waveshare-esp32-s3-touch-amoled-1.32` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-1.43c` | `waveshare-esp32-s3-touch-amoled-1.43c` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-1.75` | `waveshare-esp32-s3-touch-amoled-1.75`<br>`waveshare-esp32-s3-touch-amoled-1.75c` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-1.8` | `waveshare-esp32-s3-touch-amoled-1.8` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-1.8-v2` | `waveshare-esp32-s3-touch-amoled-1.8-v2` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-2.06` | `waveshare-esp32-s3-touch-amoled-2.06` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-amoled-2.16` | `waveshare-esp32-s3-touch-amoled-2.16` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.46` | `waveshare-esp32-s3-touch-lcd-1.46` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.54` | `waveshare-esp32-s3-touch-lcd-1.54` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.83` | `waveshare-esp32-s3-touch-lcd-1.83` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.85` | `waveshare-esp32-s3-touch-lcd-1.85` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.85b` | `waveshare-esp32-s3-touch-lcd-1.85b` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-1.85c` | `waveshare-esp32-s3-touch-lcd-1.85c` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-3.49` | `waveshare-esp32-s3-touch-lcd-3.49` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-3.5` | `waveshare-esp32-s3-touch-lcd-3.5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-3.5b` | `waveshare-esp32-s3-touch-lcd-3.5b` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-4.3c` | `waveshare-esp32-s3-touch-lcd-4.3c` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-4b` | `waveshare-esp32-s3-touch-lcd-4b` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `waveshare/esp32-s3-touch-lcd-7c` | `waveshare-esp32-s3-touch-lcd-7c` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-abs-2.0` | `xingzhi-abs-2.0` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-0.85tft-ml307` | `xingzhi-cube-0.85tft-ml307` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-0.85tft-wifi` | `xingzhi-cube-0.85tft-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-0.96oled-ml307` | `xingzhi-cube-0.96oled-ml307` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-0.96oled-wifi` | `xingzhi-cube-0.96oled-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-1.54tft-ml307` | `xingzhi-cube-1.54tft-ml307`<br>`xingzhi-cube-1.54tft-ml307-wechatui` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-cube-1.54tft-wifi` | `xingzhi-cube-1.54tft-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `xingzhi-metal-1.54-wifi` | `xingzhi-metal-1.54-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `yunliao-s3` | `yunliao-s3` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `zhengchen-1.54tft-ml307` | `zhengchen-1.54tft-ml307` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `zhengchen-1.54tft-wifi` | `zhengchen-1.54tft-wifi` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `zhengchen-cam` | `zhengchen-cam` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32s3` | `zhengchen-cam-ml307` | `zhengchen-cam-ml307` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32p4` | `esp-p4-function-ev-board` | `esp-p4-function-ev-board` | ✅ Full build passed | IDF 6.0.1 `idf.py build` | Hardware smoke/peripheral regression pending |
|
||||
| `esp32p4` | `m5stack-tab5` | `m5stack-tab5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32p4` | `waveshare/esp32-p4-nano` | `waveshare-esp32-p4-nano-10.1-a` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32p4` | `waveshare/esp32-p4-wifi6-touch-lcd` | `waveshare-esp32-p4-wifi6-touch-lcd-4b`<br>`waveshare-esp32-p4-wifi6-touch-lcd-4.3`<br>`waveshare-esp32-p4-wifi6-touch-lcd-5`<br>`waveshare-esp32-p4-wifi6-touch-lcd-7b`<br>`waveshare-esp32-p4-wifi6-touch-lcd-3.4c`<br>`waveshare-esp32-p4-wifi6-touch-lcd-4c`<br>`waveshare-esp32-p4-wifi6-touch-lcd-7`<br>`waveshare-esp32-p4-wifi6-touch-lcd-8`<br>`waveshare-esp32-p4-wifi6-touch-lcd-10.1` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32p4` | `waveshare/esp32-p4-wifi6-touch-lcd-3.5` | `waveshare-esp32-p4-wifi6-touch-lcd-3.5` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
| `esp32p4` | `wireless-tag-wtp4c5mp07s` | `wireless-tag-wtp4c5mp07s` | 🟡 Ported, per-board build pending | Dependency and shared-source static review | Run per-board CI and hardware peripheral regression |
|
||||
|
||||
## Next Steps and Acceptance Criteria
|
||||
|
||||
1. Prioritize waiting for or replacing the two remaining hard-blocker categories: BMI270 and the ESP Vocat touch components. Legacy P4 Rev < 3 is out of scope.
|
||||
2. Publish the remaining compatibility patches under `components/` to their component repositories or move them into a tracked override directory before switching the CI baseline to IDF 6.0.1. Then run per-board builds for the 148 yellow variants and mark each successful build green. `servo_dog_ctrl` now uses upstream version `0.2.0` and is no longer a local override.
|
||||
3. For every green variant, complete a minimal hardware smoke test covering boot, networking, audio input/output, display/touch when present, camera when present, and 4G/Ethernet when present.
|
||||
4. Local component overrides, including `uart-uhci` and `esp-ml307`, currently live under `components/`, which is ignored by `.gitignore` by default. Before merging, move these compatibility patches into a dedicated component repository, submodule, or tracked override directory so CI can reproduce the build.
|
||||
|
||||
## Reproduction
|
||||
|
||||
```bash
|
||||
source ~/.espressif/v6.0.1/esp-idf/export.sh
|
||||
python scripts/release.py <board> --name <variant>
|
||||
```
|
||||
|
||||
This document is a migration-status snapshot. Change a variant from yellow to green only after it completes a full ESP-IDF 6.0.1 build. Add "hardware validated" to the notes only after validation on physical hardware is complete.
|
||||
@@ -1040,6 +1040,23 @@ if(BOARD_TYPE STREQUAL "m5stack-stick-s3")
|
||||
m5stack__m5pm1
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BOARD_TYPE_ESP_SPOT_S3 OR CONFIG_BOARD_TYPE_ESP_SPOT_C5 OR CONFIG_BOARD_TYPE_ESP_VOCAT)
|
||||
if(IDF_VERSION_MAJOR GREATER_EQUAL 6)
|
||||
if(CONFIG_BOARD_TYPE_ESP_VOCAT)
|
||||
message(FATAL_ERROR
|
||||
"${BOARD_TYPE} is not compatible with ESP-IDF ${IDF_VERSION}: "
|
||||
"bmi270_sensor 0.1.1 has no ESP-IDF 6.0 prebuilt library; "
|
||||
"touch_slider_sensor and touch_button_sensor require ESP-IDF < 6.0")
|
||||
else()
|
||||
message(FATAL_ERROR
|
||||
"${BOARD_TYPE} is not compatible with ESP-IDF ${IDF_VERSION}: "
|
||||
"espressif/bmi270_sensor 0.1.1 has no ESP-IDF 6.0 prebuilt library")
|
||||
endif()
|
||||
endif()
|
||||
list(APPEND MAIN_PRIV_REQUIRES_EXTRA
|
||||
espressif__bmi270_sensor
|
||||
)
|
||||
endif()
|
||||
if(CONFIG_BOARD_TYPE_ESP_VOCAT)
|
||||
list(APPEND MAIN_PRIV_REQUIRES_EXTRA
|
||||
espressif__touch_slider_sensor
|
||||
@@ -1061,11 +1078,13 @@ idf_component_register(SRCS ${SOURCES}
|
||||
esp_driver_spi
|
||||
esp_driver_i2c
|
||||
esp_driver_i2s
|
||||
esp_driver_ledc
|
||||
esp_driver_jpeg
|
||||
esp_driver_ppa
|
||||
esp_app_format
|
||||
app_update
|
||||
spi_flash
|
||||
mbedtls
|
||||
console
|
||||
efuse
|
||||
bt
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/event_groups.h>
|
||||
#include <driver/i2s_std.h>
|
||||
#include <esp_idf_version.h>
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@@ -14,6 +15,15 @@
|
||||
#define AUDIO_CODEC_DMA_DESC_NUM 6
|
||||
#define AUDIO_CODEC_DMA_FRAME_NUM 240
|
||||
|
||||
// ESP-IDF 6 removed i2s_port_t and changed i2s_chan_config_t::id to an integer.
|
||||
// Keep numeric I2S controller IDs usable on targets where IDF 5 does not expose
|
||||
// every value through the target-specific i2s_port_t enum (for example ESP32-C3).
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
#define XIAOZHI_I2S_PORT(port) (port)
|
||||
#else
|
||||
#define XIAOZHI_I2S_PORT(port) static_cast<i2s_port_t>(port)
|
||||
#endif
|
||||
|
||||
class AudioCodec {
|
||||
public:
|
||||
AudioCodec();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "audio_codec.h"
|
||||
|
||||
#include <driver/i2c.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_codec_dev.h>
|
||||
#include <esp_codec_dev_defaults.h>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "audio_codec.h"
|
||||
|
||||
#include <driver/i2c.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_codec_dev.h>
|
||||
#include <esp_codec_dev_defaults.h>
|
||||
|
||||
@@ -22,7 +22,7 @@ NoAudioCodecDuplex::NoAudioCodecDuplex(int input_sample_rate, int output_sample_
|
||||
output_sample_rate_ = output_sample_rate;
|
||||
|
||||
i2s_chan_config_t chan_cfg = {
|
||||
.id = I2S_NUM_0,
|
||||
.id = XIAOZHI_I2S_PORT(0),
|
||||
.role = I2S_ROLE_MASTER,
|
||||
.dma_desc_num = AUDIO_CODEC_DMA_DESC_NUM,
|
||||
.dma_frame_num = AUDIO_CODEC_DMA_FRAME_NUM,
|
||||
@@ -83,7 +83,7 @@ NoAudioCodecSimplex::NoAudioCodecSimplex(int input_sample_rate, int output_sampl
|
||||
|
||||
// Create a new channel for speaker
|
||||
i2s_chan_config_t chan_cfg = {
|
||||
.id = (i2s_port_t)0,
|
||||
.id = XIAOZHI_I2S_PORT(0),
|
||||
.role = I2S_ROLE_MASTER,
|
||||
.dma_desc_num = AUDIO_CODEC_DMA_DESC_NUM,
|
||||
.dma_frame_num = AUDIO_CODEC_DMA_FRAME_NUM,
|
||||
@@ -134,7 +134,7 @@ NoAudioCodecSimplex::NoAudioCodecSimplex(int input_sample_rate, int output_sampl
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_handle_, &std_cfg));
|
||||
|
||||
// Create a new channel for MIC
|
||||
chan_cfg.id = (i2s_port_t)1;
|
||||
chan_cfg.id = XIAOZHI_I2S_PORT(1);
|
||||
ESP_ERROR_CHECK(i2s_new_channel(&chan_cfg, nullptr, &rx_handle_));
|
||||
std_cfg.clk_cfg.sample_rate_hz = (uint32_t)input_sample_rate_;
|
||||
std_cfg.gpio_cfg.bclk = mic_sck;
|
||||
@@ -152,7 +152,7 @@ NoAudioCodecSimplex::NoAudioCodecSimplex(int input_sample_rate, int output_sampl
|
||||
|
||||
// Create a new channel for speaker
|
||||
i2s_chan_config_t chan_cfg = {
|
||||
.id = (i2s_port_t)0,
|
||||
.id = XIAOZHI_I2S_PORT(0),
|
||||
.role = I2S_ROLE_MASTER,
|
||||
.dma_desc_num = AUDIO_CODEC_DMA_DESC_NUM,
|
||||
.dma_frame_num = AUDIO_CODEC_DMA_FRAME_NUM,
|
||||
@@ -203,7 +203,7 @@ NoAudioCodecSimplex::NoAudioCodecSimplex(int input_sample_rate, int output_sampl
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_handle_, &std_cfg));
|
||||
|
||||
// Create a new channel for MIC
|
||||
chan_cfg.id = (i2s_port_t)1;
|
||||
chan_cfg.id = XIAOZHI_I2S_PORT(1);
|
||||
ESP_ERROR_CHECK(i2s_new_channel(&chan_cfg, nullptr, &rx_handle_));
|
||||
std_cfg.clk_cfg.sample_rate_hz = (uint32_t)input_sample_rate_;
|
||||
std_cfg.slot_cfg.slot_mask = mic_slot_mask;
|
||||
@@ -293,7 +293,7 @@ NoAudioCodecSimplexPdm::NoAudioCodecSimplexPdm(int input_sample_rate, int output
|
||||
output_sample_rate_ = output_sample_rate;
|
||||
|
||||
// Create a new channel for speaker
|
||||
i2s_chan_config_t tx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG((i2s_port_t)1, I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t tx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(1), I2S_ROLE_MASTER);
|
||||
tx_chan_cfg.dma_desc_num = AUDIO_CODEC_DMA_DESC_NUM;
|
||||
tx_chan_cfg.dma_frame_num = AUDIO_CODEC_DMA_FRAME_NUM;
|
||||
tx_chan_cfg.auto_clear_after_cb = true;
|
||||
@@ -343,7 +343,7 @@ NoAudioCodecSimplexPdm::NoAudioCodecSimplexPdm(int input_sample_rate, int output
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_handle_, &tx_std_cfg));
|
||||
#if SOC_I2S_SUPPORTS_PDM_RX
|
||||
// Create a new channel for MIC in PDM mode
|
||||
i2s_chan_config_t rx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG((i2s_port_t)0, I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t rx_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(0), I2S_ROLE_MASTER);
|
||||
ESP_ERROR_CHECK(i2s_new_channel(&rx_chan_cfg, NULL, &rx_handle_));
|
||||
i2s_pdm_rx_config_t pdm_rx_cfg = {
|
||||
.clk_cfg = I2S_PDM_RX_CLK_DEFAULT_CONFIG((uint32_t)input_sample_rate_),
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define CUSTOM_WAKE_WORD_H
|
||||
|
||||
#include <esp_attr.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <esp_mn_iface.h>
|
||||
#include <esp_mn_models.h>
|
||||
#include <model_path.h>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <driver/spi_master.h>
|
||||
#include <esp_lcd_panel_vendor.h>
|
||||
@@ -292,7 +293,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = nullptr;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = LCD_RST_GPIO; // Set to -1 if not use
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16; // Implemented by LCD command `3Ah` (16/18)
|
||||
|
||||
if (config.type == LcdPanelType::kGc9107) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <driver/spi_master.h>
|
||||
#include <esp_lcd_panel_vendor.h>
|
||||
@@ -370,7 +371,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = nullptr;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = LCD_RST_GPIO; // Set to -1 if not use
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16; // Implemented by LCD command `3Ah` (16/18)
|
||||
|
||||
if (config.type == LcdPanelType::kGc9107) {
|
||||
|
||||
@@ -47,24 +47,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -48,24 +48,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -47,24 +47,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -52,24 +52,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -79,7 +79,7 @@ void Nt26Board::StartNetwork() {
|
||||
modem_ = std::make_unique<UartEthModem>(config);
|
||||
modem_->SetDebug(false);
|
||||
|
||||
modem_->SetNetworkEventCallback([this](UartEthModem::UartEthModemEvent event) {
|
||||
modem_->SetNetworkEventCallback([this](UartEthModem::UartEthModemEvent event, const std::string& detail) {
|
||||
switch (event) {
|
||||
case UartEthModem::UartEthModemEvent::Connected:
|
||||
esp_timer_stop(network_ready_timer_);
|
||||
@@ -105,11 +105,14 @@ void Nt26Board::StartNetwork() {
|
||||
case UartEthModem::UartEthModemEvent::ErrorNoCarrier:
|
||||
esp_timer_stop(network_ready_timer_);
|
||||
ScheduleAsyncStop();
|
||||
OnNetworkEvent(NetworkEvent::ModemErrorInitFailed);
|
||||
OnNetworkEvent(NetworkEvent::ModemErrorInitFailed, detail);
|
||||
break;
|
||||
case UartEthModem::UartEthModemEvent::InFlightMode:
|
||||
ESP_LOGW(TAG, "Modem in flight mode");
|
||||
break;
|
||||
case UartEthModem::UartEthModemEvent::RfTestReady:
|
||||
ESP_LOGI(TAG, "Modem RF test mode ready");
|
||||
break;
|
||||
case UartEthModem::UartEthModemEvent::RequestingPdpContext:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <esp_log.h>
|
||||
#include <esp_sleep.h>
|
||||
#include <esp_lvgl_port.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define TAG "SleepTimer"
|
||||
|
||||
@@ -99,11 +101,21 @@ void SleepTimer::CheckTimer() {
|
||||
esp_light_sleep_start();
|
||||
lvgl_port_resume();
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
// IDF 6 deprecates esp_sleep_get_wakeup_cause() in favor of
|
||||
// the bitmap-based API that can report simultaneous sources.
|
||||
auto wakeup_causes = esp_sleep_get_wakeup_causes();
|
||||
ESP_LOGI(TAG, "Wake up from light sleep, wakeup_causes: 0x%" PRIx32, wakeup_causes);
|
||||
if (!(wakeup_causes & (1UL << ESP_SLEEP_WAKEUP_TIMER))) {
|
||||
break;
|
||||
}
|
||||
#else
|
||||
auto wakeup_reason = esp_sleep_get_wakeup_cause();
|
||||
ESP_LOGI(TAG, "Wake up from light sleep, wakeup_reason: %d", wakeup_reason);
|
||||
if (wakeup_reason != ESP_SLEEP_WAKEUP_TIMER) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
WakeUp();
|
||||
});
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "assets/lang_config.h"
|
||||
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <esp_lcd_panel_vendor.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <driver/spi_common.h>
|
||||
@@ -233,7 +234,11 @@ private:
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 16;
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.color_space = ESP_LCD_COLOR_SPACE_BGR;
|
||||
#endif
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_ili9341(panel_io, &panel_config, &panel));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(panel));
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <esp_lcd_panel_ops.h>
|
||||
#include <esp_lcd_panel_vendor.h>
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
|
||||
#include "application.h"
|
||||
#include "codecs/no_audio_codec.h"
|
||||
@@ -59,7 +60,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = DISPLAY_SPI_RESET_PIN; // Set to -1 if not use
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR; // LCD_RGB_ENDIAN_RGB;
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16; // Implemented by LCD command `3Ah` (16/18)
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_gc9a01(io_handle, &panel_config, &panel_handle));
|
||||
|
||||
@@ -3,19 +3,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "esp-p4-function-ev-board",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SLAVE_IDF_TARGET_ESP32C6=y",
|
||||
"CONFIG_ESP_HOSTED_P4_DEV_BOARD_FUNC_BOARD=y",
|
||||
"CONFIG_ESP_HOSTED_SDIO_HOST_INTERFACE=y",
|
||||
"CONFIG_ESP_HOSTED_SDIO_4_BIT_BUS=y",
|
||||
"CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y",
|
||||
"CONFIG_BSP_LCD_TYPE_1024_600=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp-p4-function-ev-board-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SLAVE_IDF_TARGET_ESP32C6=y",
|
||||
"CONFIG_ESP_HOSTED_P4_DEV_BOARD_FUNC_BOARD=y",
|
||||
|
||||
@@ -111,7 +111,7 @@ private:
|
||||
},
|
||||
};
|
||||
const esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
// .bits_per_pixel = 16,
|
||||
//add surpport ev board
|
||||
|
||||
@@ -110,7 +110,7 @@ private:
|
||||
},
|
||||
};
|
||||
const esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
// .bits_per_pixel = 16,
|
||||
//add surpport ev board
|
||||
|
||||
@@ -46,26 +46,26 @@ class Hu087Board : public WifiBoard {
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags =
|
||||
{
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(
|
||||
esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -99,24 +99,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
@@ -267,4 +267,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_BOARD(KevinBoxBoard);
|
||||
DECLARE_BOARD(KevinBoxBoard);
|
||||
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
},
|
||||
};
|
||||
const esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
.bits_per_pixel = 16,
|
||||
.vendor_config = &vendor_config,
|
||||
|
||||
@@ -45,24 +45,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
@@ -130,4 +130,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_BOARD(EDARobotPro);
|
||||
DECLARE_BOARD(EDARobotPro);
|
||||
|
||||
@@ -46,9 +46,9 @@ Tcircles3AudioCodec::~Tcircles3AudioCodec() {
|
||||
void Tcircles3AudioCodec::CreateVoiceHardware(gpio_num_t mic_bclk, gpio_num_t mic_ws, gpio_num_t mic_data,
|
||||
gpio_num_t spkr_bclk, gpio_num_t spkr_lrclk, gpio_num_t spkr_data) {
|
||||
|
||||
i2s_chan_config_t mic_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(i2s_port_t(0), I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t mic_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(0), I2S_ROLE_MASTER);
|
||||
mic_chan_config.auto_clear = true; // Auto clear the legacy data in the DMA buffer
|
||||
i2s_chan_config_t spkr_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(i2s_port_t(1), I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t spkr_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(1), I2S_ROLE_MASTER);
|
||||
spkr_chan_config.auto_clear = true; // Auto clear the legacy data in the DMA buffer
|
||||
|
||||
ESP_ERROR_CHECK(i2s_new_channel(&mic_chan_config, NULL, &rx_handle_));
|
||||
|
||||
@@ -206,7 +206,7 @@ public:
|
||||
},
|
||||
};
|
||||
esp_lcd_panel_dev_config_t dev_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
.bits_per_pixel = SCREEN_BITS_PER_PIXEL,
|
||||
.vendor_config = &vendor_config,
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
},
|
||||
};
|
||||
esp_lcd_panel_dev_config_t dev_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
.bits_per_pixel = SCREEN_BITS_PER_PIXEL,
|
||||
.vendor_config = &vendor_config,
|
||||
|
||||
@@ -60,9 +60,9 @@ Tdisplays3promvsrloraAudioCodec::~Tdisplays3promvsrloraAudioCodec() {
|
||||
void Tdisplays3promvsrloraAudioCodec::CreateVoiceHardware(gpio_num_t mic_bclk, gpio_num_t mic_ws, gpio_num_t mic_data,
|
||||
gpio_num_t spkr_bclk, gpio_num_t spkr_lrclk, gpio_num_t spkr_data) {
|
||||
|
||||
i2s_chan_config_t mic_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(i2s_port_t(0), I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t mic_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(0), I2S_ROLE_MASTER);
|
||||
mic_chan_config.auto_clear = true; // Auto clear the legacy data in the DMA buffer
|
||||
i2s_chan_config_t spkr_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(i2s_port_t(1), I2S_ROLE_MASTER);
|
||||
i2s_chan_config_t spkr_chan_config = I2S_CHANNEL_DEFAULT_CONFIG(XIAOZHI_I2S_PORT(1), I2S_ROLE_MASTER);
|
||||
spkr_chan_config.auto_clear = true; // Auto clear the legacy data in the DMA buffer
|
||||
|
||||
ESP_ERROR_CHECK(i2s_new_channel(&mic_chan_config, NULL, &rx_handle_));
|
||||
|
||||
@@ -3,22 +3,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "m5stack-tab5",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_BOARD_TYPE_M5STACK_CORE_TAB5=y",
|
||||
"CONFIG_CAMERA_SC202CS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_ROTATE_CAMERA_IMAGE=y",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CMD_SLOT_1=13",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_CLK_SLOT_1=12",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D0_SLOT_1=11",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D1_4BIT_BUS_SLOT_1=10",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D2_4BIT_BUS_SLOT_1=9",
|
||||
"CONFIG_ESP_HOSTED_PRIV_SDIO_PIN_D3_4BIT_BUS_SLOT_1=8",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "m5stack-tab5-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_BOARD_TYPE_M5STACK_CORE_TAB5=y",
|
||||
"CONFIG_CAMERA_SC202CS=y",
|
||||
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
|
||||
esp_lcd_panel_dev_config_t lcd_dev_config = {};
|
||||
lcd_dev_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB;
|
||||
lcd_dev_config.reset_gpio_num = -1;
|
||||
lcd_dev_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
lcd_dev_config.bits_per_pixel = 16;
|
||||
lcd_dev_config.vendor_config = &vendor_config;
|
||||
|
||||
@@ -335,7 +335,7 @@ private:
|
||||
vendor_config.mipi_config.dpi_config = &dpi_config;
|
||||
vendor_config.mipi_config.lane_num = 2;
|
||||
|
||||
lcd_dev_config.reset_gpio_num = -1;
|
||||
lcd_dev_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
lcd_dev_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB;
|
||||
lcd_dev_config.data_endian = LCD_RGB_DATA_ENDIAN_LITTLE;
|
||||
lcd_dev_config.bits_per_pixel = 24;
|
||||
@@ -571,4 +571,3 @@ public:
|
||||
|
||||
|
||||
DECLARE_BOARD(M5StackTab5Board);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "led/single_led.h"
|
||||
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <esp_efuse_table.h>
|
||||
#include <driver/i2c_master.h>
|
||||
|
||||
@@ -64,7 +65,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = DISPLAY_SPI_RESET_PIN; // Set to -1 if not use
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR; //LCD_RGB_ENDIAN_RGB;
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16; // Implemented by LCD command `3Ah` (16/18)
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_gc9a01(io_handle, &panel_config, &panel_handle));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "led/single_led.h"
|
||||
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <esp_efuse_table.h>
|
||||
#include <driver/i2c_master.h>
|
||||
|
||||
@@ -91,7 +92,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = DISPLAY_SPI_RESET_PIN; // Set to -1 if not use
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR; //LCD_RGB_ENDIAN_RGB;
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16; // Implemented by LCD command `3Ah` (16/18)
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_gc9a01(io_handle, &panel_config, &panel_handle));
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "led/single_led.h"
|
||||
#include "assets/lang_config.h"
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <esp_efuse_table.h>
|
||||
#include <driver/i2c_master.h>
|
||||
|
||||
@@ -335,7 +336,11 @@ private:
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = DISPLAY_SPI_RESET_PIN; // Set to -1 if not use
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR; //LCD_RGB_ENDIAN_RGB;
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
panel_config.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR;
|
||||
#else
|
||||
panel_config.rgb_endian = LCD_RGB_ENDIAN_BGR;
|
||||
#endif
|
||||
panel_config.bits_per_pixel = 16;
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_gc9a01(io_handle, &panel_config, &panel_handle));
|
||||
|
||||
@@ -102,24 +102,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
@@ -252,4 +252,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_BOARD(KevinBoxBoard);
|
||||
DECLARE_BOARD(KevinBoxBoard);
|
||||
|
||||
@@ -4,18 +4,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "esp32-p4-nano-10.1-a",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-nano-10.1-a-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
|
||||
@@ -4,19 +4,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-3.5",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_3_5=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-3.5-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "esp_lcd_st7796.h"
|
||||
#include "config.h"
|
||||
#include <esp_log.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <driver/i2c_master.h>
|
||||
#include <esp_lvgl_port.h>
|
||||
#include "esp_lcd_touch_ft5x06.h"
|
||||
@@ -67,7 +68,11 @@ private:
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)SPI2_HOST, &io_config, &io));
|
||||
const esp_lcd_panel_dev_config_t lcd_dev_config = {
|
||||
.reset_gpio_num = PIN_NUM_LCD_RST,
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 0, 0)
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_BGR,
|
||||
#else
|
||||
.color_space = ESP_LCD_COLOR_SPACE_BGR,
|
||||
#endif
|
||||
.bits_per_pixel = 16,
|
||||
};
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_st7796(io, &lcd_dev_config, &disp_panel));
|
||||
|
||||
@@ -4,22 +4,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4b",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4B=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4b-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -34,22 +18,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4.3",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4_3=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4.3-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -64,22 +32,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-5",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_5=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-5-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -94,25 +46,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-7b",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_7B=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y",
|
||||
"CONFIG_PARTITION_TABLE_CUSTOM_FILENAME=\"partitions/v2/32m.csv\"",
|
||||
"CONFIG_ESPTOOLPY_FLASH_MODE_AUTO_DETECT=n",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-7b-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -130,22 +63,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-3.4c",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_3_4C=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-3.4c-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -160,22 +77,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4c",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4C=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-4c-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -190,22 +91,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-7",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_7=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-7-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -220,22 +105,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-8",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_8=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-8-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
@@ -250,22 +119,6 @@
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-10.1",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
"CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_10_1=y",
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_USE_DEVICE_AEC=y",
|
||||
"CONFIG_CAMERA_OV5647=y",
|
||||
"CONFIG_CAMERA_OV5647_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y",
|
||||
"CONFIG_CAMERA_OV5647_MIPI_RAW8_800X800_50FPS=y",
|
||||
"CONFIG_XIAOZHI_ENABLE_CAMERA_ENDIANNESS_SWAP=y",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esp32-p4-wifi6-touch-lcd-10.1-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0",
|
||||
"CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH=y",
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
},
|
||||
};
|
||||
esp_lcd_panel_dev_config_t panel_config = {
|
||||
.reset_gpio_num = -1,
|
||||
.reset_gpio_num = GPIO_NUM_NC,
|
||||
.rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
|
||||
.bits_per_pixel = 16,
|
||||
.vendor_config = (void *)&vendor_config,
|
||||
@@ -250,4 +250,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_BOARD(CustomBoard);
|
||||
DECLARE_BOARD(CustomBoard);
|
||||
|
||||
@@ -3,19 +3,6 @@
|
||||
"builds": [
|
||||
{
|
||||
"name": "wireless-tag-wtp4c5mp07s",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_SLAVE_IDF_TARGET_ESP32C5=y",
|
||||
"CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP=n",
|
||||
"CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM=10",
|
||||
"CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM=24",
|
||||
"CONFIG_WIFI_RMT_STATIC_TX_BUFFER_NUM=10",
|
||||
"CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y",
|
||||
"CONFIG_ESP32P4_REV_MIN_100=y"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "wireless-tag-wtp4c5mp07s-p4x",
|
||||
"sdkconfig_append": [
|
||||
"CONFIG_USE_WECHAT_MESSAGE_STYLE=n",
|
||||
"CONFIG_SLAVE_IDF_TARGET_ESP32C5=y",
|
||||
|
||||
@@ -85,24 +85,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -86,24 +86,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(display_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(display_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -90,24 +90,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -82,24 +82,24 @@ private:
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
|
||||
@@ -94,26 +94,25 @@ private:
|
||||
|
||||
void InitializeSsd1306Display() {
|
||||
// SSD1306 config
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {
|
||||
.dev_addr = 0x3C,
|
||||
.on_color_trans_done = nullptr,
|
||||
.user_ctx = nullptr,
|
||||
.control_phase_bytes = 1,
|
||||
.dc_bit_offset = 6,
|
||||
.lcd_cmd_bits = 8,
|
||||
.lcd_param_bits = 8,
|
||||
.flags = {
|
||||
.dc_low_on_data = 0,
|
||||
.disable_control_phase = 0,
|
||||
},
|
||||
.scl_speed_hz = 400 * 1000,
|
||||
};
|
||||
// IDF 5.5 and 6.0 declare these fields in a different order. Assign
|
||||
// them individually so C++ designated-initializer ordering is irrelevant.
|
||||
esp_lcd_panel_io_i2c_config_t io_config = {};
|
||||
io_config.dev_addr = 0x3C;
|
||||
io_config.scl_speed_hz = 400 * 1000;
|
||||
io_config.control_phase_bytes = 1;
|
||||
io_config.dc_bit_offset = 6;
|
||||
io_config.lcd_cmd_bits = 8;
|
||||
io_config.lcd_param_bits = 8;
|
||||
io_config.on_color_trans_done = nullptr;
|
||||
io_config.user_ctx = nullptr;
|
||||
io_config.flags.dc_low_on_data = 0;
|
||||
io_config.flags.disable_control_phase = 0;
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c_v2(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
ESP_ERROR_CHECK(esp_lcd_new_panel_io_i2c(codec_i2c_bus_, &io_config, &panel_io_));
|
||||
|
||||
ESP_LOGI(TAG, "Install SSD1306 driver");
|
||||
esp_lcd_panel_dev_config_t panel_config = {};
|
||||
panel_config.reset_gpio_num = -1;
|
||||
panel_config.reset_gpio_num = GPIO_NUM_NC;
|
||||
panel_config.bits_per_pixel = 1;
|
||||
|
||||
esp_lcd_panel_ssd1306_config_t ssd1306_config = {
|
||||
@@ -174,6 +173,10 @@ public:
|
||||
XminiC3Board() : boot_button_(BOOT_BUTTON_GPIO) {
|
||||
InitializeCodecI2c();
|
||||
InitializeSsd1306Display();
|
||||
while (true) {
|
||||
ESP_LOGI(TAG, "Initializing SSD1306 display");
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
InitializeButtons();
|
||||
InitializePowerSaveTimer();
|
||||
InitializeTools();
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32P4) || defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
// ESP32-P4 使用 esp_video 组件提供的 V4L2 头文件
|
||||
#include <linux/videodev2.h>
|
||||
#else
|
||||
// ESP32-S3 等其他芯片:定义常用的 V4L2 像素格式
|
||||
// Keep this lightweight header independent from esp_video's Linux compatibility
|
||||
// headers. esp_video 2.0.x and lwIP both define ioctl macros under ESP-IDF 6.
|
||||
#ifndef V4L2_PIX_FMT_RGB565
|
||||
#define V4L2_PIX_FMT_RGB565 0x50424752 // 'RGBP'
|
||||
#define V4L2_PIX_FMT_RGB565X 0x52474250 // 'PRGB'
|
||||
#define V4L2_PIX_FMT_RGB24 0x33424752 // 'RGB3'
|
||||
|
||||
+14
-18
@@ -2,13 +2,13 @@
|
||||
dependencies:
|
||||
waveshare/esp_lcd_sh8601: 1.0.2
|
||||
espressif/esp_lcd_co5300: ^2.0.3
|
||||
espressif/esp_lcd_ili9341: ==1.2.0
|
||||
espressif/esp_lcd_ili9341: ^2.0.2
|
||||
espressif/esp_lcd_gc9a01: ~2.0.4
|
||||
espressif/esp_lcd_st77916: ^1.0.1
|
||||
espressif/esp_lcd_axs15231b: ^1.0.0
|
||||
espressif/esp_lcd_axs15231b: ^2.1.0
|
||||
|
||||
espressif/esp_lcd_st7701:
|
||||
version: ^1.1.4
|
||||
version: ^2.0.2
|
||||
rules:
|
||||
- if: target in [esp32s3, esp32p4]
|
||||
espressif/esp_lcd_st7796:
|
||||
@@ -17,15 +17,15 @@ dependencies:
|
||||
- if: target in [esp32, esp32s2, esp32s3, esp32p4]
|
||||
espressif/esp_lcd_spd2010: ==1.0.2
|
||||
espressif/esp_io_expander_tca9554: ~2.0.3
|
||||
waveshare/custom_io_expander_ch32v003: ^1.0.0
|
||||
waveshare/custom_io_expander_ch32v003: ^2.0.0
|
||||
espressif/esp_lcd_panel_io_additions: ^1.0.1
|
||||
78/esp_lcd_nv3023: ~1.0.0
|
||||
78/esp-wifi-connect: ~3.2.2
|
||||
espressif/esp_audio_effects: ~1.3.0
|
||||
espressif/esp_audio_codec: ~2.5.0
|
||||
78/esp-ml307: ~3.6.5
|
||||
78/esp-ml307: ~3.6.6
|
||||
78/uart-eth-modem:
|
||||
version: ~0.4.2
|
||||
version: ^0.6.1
|
||||
rules:
|
||||
- if: target not in [esp32]
|
||||
78/xiaozhi-fonts: ~1.6.0
|
||||
@@ -43,7 +43,7 @@ dependencies:
|
||||
rules:
|
||||
- if: target in [esp32s3]
|
||||
espressif/esp_video:
|
||||
version: ==1.3.1 # for compatibility. update version may need to modify this project code.
|
||||
version: ^2.0.1
|
||||
rules:
|
||||
- if: target in [esp32p4, esp32s3]
|
||||
|
||||
@@ -60,7 +60,7 @@ dependencies:
|
||||
esp_lvgl_port: ~2.8.0
|
||||
espressif/esp_io_expander_tca95xx_16bit: ^2.0.0
|
||||
espressif2022/image_player: ^1.1.1
|
||||
espressif2022/esp_emote_expression: ^0.1.0
|
||||
espressif2022/esp_emote_expression: ^1.0.2
|
||||
espressif/esp_mmap_assets: ^1.3.2
|
||||
txp666/otto-emoji-gif-component:
|
||||
version: ^1.1.1
|
||||
@@ -89,7 +89,7 @@ dependencies:
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
espressif/esp32_p4_function_ev_board:
|
||||
version: ^5.0.3
|
||||
version: ^5.2.3
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
espressif/esp_lcd_ili9881c:
|
||||
@@ -97,31 +97,27 @@ dependencies:
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
espressif/esp_lcd_ek79007:
|
||||
version: ^1.0.3
|
||||
version: ^2.0.2
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
espressif/esp_hosted:
|
||||
version: 2.0.17
|
||||
version: ^2.12.11
|
||||
rules:
|
||||
- if: target in [esp32h2, esp32p4]
|
||||
espressif/esp_wifi_remote:
|
||||
version: '*'
|
||||
version: ^1.6.2
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
espfriends/servo_dog_ctrl:
|
||||
version: ^0.1.8
|
||||
version: ^0.2.0
|
||||
rules:
|
||||
- if: target in [esp32c3]
|
||||
|
||||
llgok/cpp_bus_driver:
|
||||
version: 1.1.0
|
||||
rules:
|
||||
- if: target in [esp32p4]
|
||||
|
||||
espressif/bmi270_sensor:
|
||||
version: ^0.1.0
|
||||
rules:
|
||||
- if: target in [esp32s3, esp32c5]
|
||||
- if: idf_version <6.0
|
||||
|
||||
espressif/touch_slider_sensor:
|
||||
version: ^0.2.0~1
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define _CIRCULAR_STRIP_H_
|
||||
|
||||
#include "led.h"
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <driver/gpio.h>
|
||||
#include <led_strip.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define _SINGLE_LED_H_
|
||||
|
||||
#include "led.h"
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <driver/gpio.h>
|
||||
#include <led_strip.h>
|
||||
#include <esp_timer.h>
|
||||
|
||||
@@ -46,6 +46,11 @@ MqttProtocol::~MqttProtocol() {
|
||||
|
||||
udp_.reset();
|
||||
mqtt_.reset();
|
||||
|
||||
if (aes_key_id_ != PSA_KEY_ID_NULL) {
|
||||
psa_destroy_key(aes_key_id_);
|
||||
aes_key_id_ = PSA_KEY_ID_NULL;
|
||||
}
|
||||
|
||||
if (event_group_handle_ != nullptr) {
|
||||
vEventGroupDelete(event_group_handle_);
|
||||
@@ -178,10 +183,9 @@ bool MqttProtocol::SendAudio(std::unique_ptr<AudioStreamPacket> packet) {
|
||||
encrypted.resize(aes_nonce_.size() + packet->payload.size());
|
||||
memcpy(encrypted.data(), nonce.data(), nonce.size());
|
||||
|
||||
size_t nc_off = 0;
|
||||
uint8_t stream_block[16] = {0};
|
||||
if (mbedtls_aes_crypt_ctr(&aes_ctx_, packet->payload.size(), &nc_off, (uint8_t*)nonce.c_str(), stream_block,
|
||||
(uint8_t*)packet->payload.data(), (uint8_t*)&encrypted[nonce.size()]) != 0) {
|
||||
if (!CryptAesCtr(reinterpret_cast<const uint8_t*>(packet->payload.data()), packet->payload.size(),
|
||||
reinterpret_cast<const uint8_t*>(nonce.data()),
|
||||
reinterpret_cast<uint8_t*>(&encrypted[nonce.size()]))) {
|
||||
ESP_LOGE(TAG, "Failed to encrypt audio data");
|
||||
return false;
|
||||
}
|
||||
@@ -265,8 +269,6 @@ bool MqttProtocol::OpenAudioChannel() {
|
||||
}
|
||||
|
||||
size_t decrypted_size = data.size() - aes_nonce_.size();
|
||||
size_t nc_off = 0;
|
||||
uint8_t stream_block[16] = {0};
|
||||
auto nonce = (uint8_t*)data.data();
|
||||
auto encrypted = (uint8_t*)data.data() + aes_nonce_.size();
|
||||
auto packet = std::make_unique<AudioStreamPacket>();
|
||||
@@ -274,9 +276,8 @@ bool MqttProtocol::OpenAudioChannel() {
|
||||
packet->frame_duration = server_frame_duration_;
|
||||
packet->timestamp = timestamp;
|
||||
packet->payload.resize(decrypted_size);
|
||||
int ret = mbedtls_aes_crypt_ctr(&aes_ctx_, decrypted_size, &nc_off, nonce, stream_block, encrypted, (uint8_t*)packet->payload.data());
|
||||
if (ret != 0) {
|
||||
ESP_LOGE(TAG, "Failed to decrypt audio data, ret: %d", ret);
|
||||
if (!CryptAesCtr(encrypted, decrypted_size, nonce, reinterpret_cast<uint8_t*>(packet->payload.data()))) {
|
||||
ESP_LOGE(TAG, "Failed to decrypt audio data");
|
||||
return;
|
||||
}
|
||||
if (on_incoming_audio_ != nullptr) {
|
||||
@@ -358,13 +359,71 @@ void MqttProtocol::ParseServerHello(const cJSON* root) {
|
||||
// auto encryption = cJSON_GetObjectItem(udp, "encryption")->valuestring;
|
||||
// ESP_LOGI(TAG, "UDP server: %s, port: %d, encryption: %s", udp_server_.c_str(), udp_port_, encryption);
|
||||
aes_nonce_ = DecodeHexString(nonce);
|
||||
mbedtls_aes_init(&aes_ctx_);
|
||||
mbedtls_aes_setkey_enc(&aes_ctx_, (const unsigned char*)DecodeHexString(key).c_str(), 128);
|
||||
const std::string aes_key = DecodeHexString(key);
|
||||
if (aes_nonce_.size() != 16 || aes_key.size() != 16) {
|
||||
ESP_LOGE(TAG, "Invalid AES key or nonce length");
|
||||
return;
|
||||
}
|
||||
|
||||
if (aes_key_id_ != PSA_KEY_ID_NULL) {
|
||||
psa_destroy_key(aes_key_id_);
|
||||
aes_key_id_ = PSA_KEY_ID_NULL;
|
||||
}
|
||||
|
||||
psa_status_t status = psa_crypto_init();
|
||||
if (status != PSA_SUCCESS) {
|
||||
ESP_LOGE(TAG, "Failed to initialize PSA Crypto, status: %ld", static_cast<long>(status));
|
||||
return;
|
||||
}
|
||||
|
||||
psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;
|
||||
psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT);
|
||||
psa_set_key_algorithm(&attributes, PSA_ALG_CTR);
|
||||
psa_set_key_type(&attributes, PSA_KEY_TYPE_AES);
|
||||
psa_set_key_bits(&attributes, 128);
|
||||
status = psa_import_key(&attributes, reinterpret_cast<const uint8_t*>(aes_key.data()),
|
||||
aes_key.size(), &aes_key_id_);
|
||||
psa_reset_key_attributes(&attributes);
|
||||
if (status != PSA_SUCCESS) {
|
||||
ESP_LOGE(TAG, "Failed to import AES key, status: %ld", static_cast<long>(status));
|
||||
aes_key_id_ = PSA_KEY_ID_NULL;
|
||||
return;
|
||||
}
|
||||
local_sequence_ = 0;
|
||||
remote_sequence_ = 0;
|
||||
xEventGroupSetBits(event_group_handle_, MQTT_PROTOCOL_SERVER_HELLO_EVENT);
|
||||
}
|
||||
|
||||
bool MqttProtocol::CryptAesCtr(const uint8_t* input, size_t input_size, const uint8_t* nonce, uint8_t* output) {
|
||||
if (aes_key_id_ == PSA_KEY_ID_NULL || input == nullptr || nonce == nullptr || output == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
|
||||
psa_status_t status = psa_cipher_encrypt_setup(&operation, aes_key_id_, PSA_ALG_CTR);
|
||||
if (status == PSA_SUCCESS) {
|
||||
status = psa_cipher_set_iv(&operation, nonce, 16);
|
||||
}
|
||||
|
||||
size_t output_len = 0;
|
||||
if (status == PSA_SUCCESS) {
|
||||
status = psa_cipher_update(&operation, input, input_size, output, input_size, &output_len);
|
||||
}
|
||||
|
||||
uint8_t finish_output[16];
|
||||
size_t finish_len = 0;
|
||||
if (status == PSA_SUCCESS) {
|
||||
status = psa_cipher_finish(&operation, finish_output, sizeof(finish_output), &finish_len);
|
||||
}
|
||||
psa_cipher_abort(&operation);
|
||||
|
||||
if (status != PSA_SUCCESS || output_len != input_size || finish_len != 0) {
|
||||
ESP_LOGE(TAG, "AES-CTR operation failed, status: %ld", static_cast<long>(status));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static const char hex_chars[] = "0123456789ABCDEF";
|
||||
// 辅助函数,将单个十六进制字符转换为对应的数值
|
||||
static inline uint8_t CharToHex(char c) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <mqtt.h>
|
||||
#include <udp.h>
|
||||
#include <cJSON.h>
|
||||
#include <mbedtls/aes.h>
|
||||
#include <psa/crypto.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/event_groups.h>
|
||||
#include <esp_timer.h>
|
||||
@@ -45,7 +45,7 @@ private:
|
||||
std::mutex channel_mutex_;
|
||||
std::unique_ptr<Mqtt> mqtt_;
|
||||
std::unique_ptr<Udp> udp_;
|
||||
mbedtls_aes_context aes_ctx_;
|
||||
psa_key_id_t aes_key_id_ = PSA_KEY_ID_NULL;
|
||||
std::string aes_nonce_;
|
||||
std::string udp_server_;
|
||||
int udp_port_;
|
||||
@@ -56,6 +56,7 @@ private:
|
||||
bool StartMqttClient(bool report_error=false);
|
||||
void ParseServerHello(const cJSON* root);
|
||||
std::string DecodeHexString(const std::string& hex_string);
|
||||
bool CryptAesCtr(const uint8_t* input, size_t input_size, const uint8_t* nonce, uint8_t* output);
|
||||
|
||||
bool SendText(const std::string& text) override;
|
||||
std::string GetHelloMessage();
|
||||
|
||||
Reference in New Issue
Block a user