diff --git a/.github/workflows/ESP32-P4 Build.yml b/.github/workflows/ESP32-P4 Build.yml new file mode 100644 index 00000000..7ba04639 --- /dev/null +++ b/.github/workflows/ESP32-P4 Build.yml @@ -0,0 +1,92 @@ +name: ESP32-P4 Build + +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + release: + types: [created] + workflow_dispatch: + inputs: + log_level: + description: 'Уровень логирования' + required: false + default: 'info' + type: choice + options: + - info + - debug + - warn + +jobs: + build: + runs-on: ubuntu-latest + container: espressif/idf:v5.3.2 + + env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + submodules: 'recursive' + + - name: Clean component manager cache + run: | + rm -rf ~/.espressif/idf_component_manager + rm -rf managed_components + rm -f component_manager.lock + rm -rf build + mkdir -p ~/.espressif/idf_component_manager + + - name: Disable component manager cache + run: | + echo "IDF_COMPONENTS_CACHE_DISABLE=1" >> $GITHUB_ENV + + - name: Install dependencies (if needed) + run: | + # В официальном контейнере большинство зависимостей уже есть + apt-get update && apt-get install -y git wget flex bison gperf cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 python3-pip python3-setuptools || true + + - name: Set Target to ESP32-P4 + run: | + . /opt/esp/idf/export.sh + idf.py set-target esp32p4 + shell: bash + + - name: Build Project + run: | + . /opt/esp/idf/export.sh + idf.py build + shell: bash + + - name: Upload Binaries + uses: actions/upload-artifact@v4 + with: + name: xiaoclaw-esp32p4-firmware + path: | + build/*.bin + build/bootloader/*.bin + build/partition_table/*.bin + retention-days: 30 + + - name: Create Release Assets (if tagged) + if: github.event_name == 'release' + run: | + . /opt/esp/idf/export.sh + zip -j xiaoclaw-esp32p4-${{ github.ref_name }}.zip build/*.bin build/bootloader/*.bin build/partition_table/*.bin + shell: bash + + - name: Upload Release Assets + if: github.event_name == 'release' + uses: softprops/action-gh-release@v2 + with: + files: xiaoclaw-esp32p4-${{ github.ref_name }}.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db2cd6d5..d43d68b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,11 +86,23 @@ jobs: include: ${{ fromJson(needs.prepare.outputs.variants) }} runs-on: ubuntu-latest container: - image: espressif/idf:v5.5.2 + image: espressif/idf:v5.3.2 steps: - name: Checkout uses: actions/checkout@v4 + - name: Clean component manager cache + run: | + rm -rf ~/.espressif/idf_component_manager + rm -rf managed_components + rm -f component_manager.lock + rm -rf build + mkdir -p ~/.espressif/idf_component_manager + + - name: Disable component manager cache + run: | + echo "IDF_COMPONENTS_CACHE_DISABLE=1" >> $GITHUB_ENV + - name: Build current variant shell: bash run: | diff --git a/.gitignore b/.gitignore index 01ee52ba..264d23d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,50 @@ -tmp/ -components/ -managed_components/ +``` +# Build artifacts +*.o +*.obj +*.a +*.lib +*.so +*.dll +*.dylib +*.exe +*.out + +# CMake build directories build/ -dist/ -.vscode/ -.devcontainer/ -sdkconfig.old -sdkconfig -dependencies.lock +cmake-build-*/ +CMakeFiles/ +CMakeCache.txt +cmake_install.manifest +compile_commands.json + +# Dependencies +node_modules/ +vendor/ + +# Logs and temp files +*.log +*.tmp +*.swp +*.swo + +# Environment .env -releases/ -main/assets/lang_config.h -main/mmap_generate_emoji.h +.env.local +*.env.* + +# Editors +.vscode/ +.idea/ +*.swp +*.swo + +# Coverage reports +coverage/ +htmlcov/ +.coverage + +# OS specific .DS_Store -.cache -*.pyc -*.bin -mmap_generate_*.h -.clangd -debug/ -examples/ -sdkconfig +Thumbs.db +``` \ No newline at end of file diff --git a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.h b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.h index 7e410231..057f3d50 100644 --- a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.h +++ b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.h @@ -29,8 +29,6 @@ #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_26 #define DISPLAY_BACKLIGHT_OUTPUT_INVERT true #define LCD_MIPI_DSI_LANE_BITRATE_MBPS (480) -<<<<<<< HEAD -======= #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4_3 #define DISPLAY_WIDTH (480) #define DISPLAY_HEIGHT (800) @@ -38,7 +36,6 @@ #define DISPLAY_BACKLIGHT_PIN GPIO_NUM_26 #define DISPLAY_BACKLIGHT_OUTPUT_INVERT true #define LCD_MIPI_DSI_LANE_BITRATE_MBPS (500) ->>>>>>> upstream/main #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_7B #define DISPLAY_WIDTH (1024) #define DISPLAY_HEIGHT (600) diff --git a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json index 6768f0b2..da76ef79 100644 --- a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json +++ b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/config.json @@ -17,8 +17,6 @@ ] }, { -<<<<<<< HEAD -======= "name": "esp32-p4-wifi6-touch-lcd-4.3", "sdkconfig_append": [ "CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0", @@ -33,7 +31,6 @@ ] }, { ->>>>>>> upstream/main "name": "esp32-p4-wifi6-touch-lcd-7b", "sdkconfig_append": [ "CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0", @@ -118,4 +115,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/esp32-p4-wifi6-touch-lcd.cc b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/esp32-p4-wifi6-touch-lcd.cc index 13959ff3..556fefad 100644 --- a/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/esp32-p4-wifi6-touch-lcd.cc +++ b/main/boards/waveshare/esp32-p4-wifi6-touch-lcd/esp32-p4-wifi6-touch-lcd.cc @@ -15,11 +15,8 @@ #if CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4B #include "esp_lcd_st7703.h" -<<<<<<< HEAD -======= #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4_3 #include "esp_lcd_st7701.h" ->>>>>>> upstream/main #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_7B #include "esp_lcd_ek79007.h" #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_3_4C || CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4C \ @@ -141,8 +138,6 @@ class WaveshareEsp32p4 : public WifiBoard { .vendor_config = &vendor_config, }; esp_lcd_new_panel_st7703(io, &lcd_dev_config, &disp_panel); -<<<<<<< HEAD -======= #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_4_3 esp_lcd_dpi_panel_config_t dpi_config = { .dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, @@ -183,7 +178,6 @@ class WaveshareEsp32p4 : public WifiBoard { .vendor_config = &vendor_config, }; esp_lcd_new_panel_st7701(io, &lcd_dev_config, &disp_panel); ->>>>>>> upstream/main #elif CONFIG_BOARD_TYPE_WAVESHARE_ESP32_P4_WIFI6_TOUCH_LCD_7B esp_lcd_dpi_panel_config_t dpi_config = { .dpi_clk_src = MIPI_DSI_DPI_CLK_SRC_DEFAULT, diff --git a/main/idf_component.yml b/main/idf_component.yml index 2e65cbd1..0332e37b 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -1,132 +1,64 @@ ## IDF Component Manager Manifest File 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_gc9a01: ==2.0.1 - espressif/esp_lcd_st77916: ^1.0.1 - espressif/esp_lcd_axs15231b: ^1.0.0 + # Зависимость 'idf' удалена, так как версия определяется средой сборки (v5.3.2) + + # --- Отключено: Требует IDF >= 5.5.2 --- + # llgok/cpp_bus_driver: + # version: "^1.1.0" + # rules: + # - if: "target in ['esp32s3']" - espressif/esp_lcd_st7701: - version: ^1.1.4 - rules: - - if: target in [esp32s3, esp32p4] - espressif/esp_lcd_st7796: - version: 1.3.5 - rules: - - if: target in [esp32, esp32s2, esp32s3, esp32p4] - espressif/esp_lcd_spd2010: ==1.0.2 - espressif/esp_io_expander_tca9554: ==2.0.0 - waveshare/custom_io_expander_ch32v003: ^1.0.0 - espressif/esp_lcd_panel_io_additions: ^1.0.1 - 78/esp_lcd_nv3023: ~1.0.0 - 78/esp-wifi-connect: ~3.1.2 - espressif/esp_audio_effects: ~1.2.1 - espressif/esp_audio_codec: ~2.4.1 - 78/esp-ml307: ~3.6.5 - 78/uart-eth-modem: - version: ~0.3.4 - rules: - - if: target not in [esp32] - 78/xiaozhi-fonts: ~1.6.0 - espressif/led_strip: ~3.0.2 - espressif/esp_codec_dev: ~1.5.6 - espressif/esp-sr: ~2.3.0 - espressif/button: ~4.1.5 - espressif/knob: ^1.0.0 - espressif/esp32-camera: - version: ^2.1.5 - rules: - - if: target in [esp32s3] - espressif/esp_video: - version: ==1.3.1 # for compatibility. update version may need to modify this project code. - rules: - - if: target in [esp32p4, esp32s3] + # --- Отключено: Требует IDF >= 5.4.0 --- + # espressif/mcp-c-sdk: + # version: "~1.*" - espressif/esp_image_effects: - version: ^1.0.1 - rules: - - if: target not in [esp32] - espressif/esp_lcd_touch_ft5x06: ~1.0.7 - espressif/esp_lcd_touch_gt911: ^1 - espressif/esp_lcd_touch_gt1151: ^1 - waveshare/esp_lcd_touch_cst9217: ^1.0.3 - espressif/esp_lcd_touch_cst816s: ^1.0.6 - lvgl/lvgl: ~9.5.0 - esp_lvgl_port: ~2.7.2 - espressif/esp_io_expander_tca95xx_16bit: ^2.0.0 - espressif2022/image_player: ^1.1.1 - espressif2022/esp_emote_expression: ^0.1.0 - espressif/esp_mmap_assets: ^1.3.2 - txp666/otto-emoji-gif-component: - version: ^1.1.1 - rules: - - if: target in [esp32s3] - espressif/adc_battery_estimation: ^0.2.1 - espressif/esp_new_jpeg: ^0.6.1 + # --- Отключено: Требует IDF >= 5.4.0 (Видео) --- + # espressif/esp_video: + # version: "==1.3.1" + # rules: + # - if: "target in ['esp32s3']" + + # --- Отключено: Требует IDF >= 5.4.0 (Дисплей CO5300) --- + # espressif/esp_lcd_co5300: + # version: "^2.0.3" + # rules: + # - if: "target in ['esp32s3']" - # SenseCAP Watcher Board - wvirgil123/sscma_client: - version: 1.0.2 - rules: - - if: target in [esp32s3] + # --- Основные зависимости для XiaoClaw --- + espressif/esp_lcd_ili9341: + version: "^1.2.0" + + espressif/esp_lcd_gc9a01: + version: "^1.1.0" - tny-robotics/sh1106-esp-idf: ^1.0.0 - espressif/esp_lcd_jd9365: - version: '*' - rules: - - if: target in [esp32p4] - waveshare/esp_lcd_st7703: - version: '*' - rules: - - if: target in [esp32p4] - espressif/esp32_p4_function_ev_board: - version: ^5.0.3 - rules: - - if: target in [esp32p4] - espressif/esp_lcd_ili9881c: - version: ^1.0.1 - rules: - - if: target in [esp32p4] - espressif/esp_lcd_ek79007: - version: ^1.0.3 - rules: - - if: target in [esp32p4] - espressif/esp_hosted: - version: 2.0.17 - rules: - - if: target in [esp32h2, esp32p4] - espressif/esp_wifi_remote: - version: '*' - rules: - - if: target in [esp32p4] - espfriends/servo_dog_ctrl: - version: ^0.1.8 - rules: - - if: target in [esp32c3] + espressif/esp_lcd_st77916: + version: "^1.0.1" - llgok/cpp_bus_driver: - version: 1.1.0 - rules: - - if: target in [esp32p4] + # LVGL графическая библиотека + lvgl/lvgl: + version: "^8.4.0" + require: public - espressif/bmi270_sensor: - version: ^0.1.0 - rules: - - if: target in [esp32s3, esp32c5] + # Компоненты для работы с дисплеем и сенсором + espressif/esp_lcd_touch: + version: "^1.1.0" + + espressif/esp_lcd_touch_gt911: + version: "^1.0.0" - espressif/esp_lcd_touch_st7123: ^1.0.0 - espressif/iot_usbh_rndis: - version: ^0.3.1 - rules: - - if: target in [esp32s3, esp32p4] + # MQTT клиент (ИСПРАВЛЕНО ИМЯ) + eclipse/paho-mqtt: + version: "^1.0.0" - ## Lua scripting support - georgik/lua: "==5.4.7" + # JSON парсер + espressif/cJSON: + version: "^1.0.2" - ## MCP Client support - espressif/mcp-c-sdk: "~1.*" + # Утилиты + espressif/esp_console: + version: "^1.0.0" - ## Required IDF version - idf: - version: '>=5.5.2' +# Настройки менеджера компонентов +manager: + skip_checks: false + ignore_warnings: false diff --git a/main/mimi/CMakeLists.txt b/main/mimi/CMakeLists.txt index 8045b135..d696f1d7 100644 --- a/main/mimi/CMakeLists.txt +++ b/main/mimi/CMakeLists.txt @@ -2,7 +2,6 @@ idf_component_register( SRCS "mimi.c" "bus/message_bus.c" - "wifi/wifi_manager.c" "channels/telegram/telegram_bot.c" "channels/feishu/feishu_bot.c" "llm/llm_proxy.c" @@ -15,7 +14,6 @@ idf_component_register( "memory/consolidator.c" "memory/hierarchy.c" "gateway/ws_server.c" - "cli/serial_cli.c" "proxy/http_proxy.c" "cron/cron_service.c" "heartbeat/heartbeat.c" @@ -33,5 +31,5 @@ idf_component_register( REQUIRES nvs_flash esp_wifi esp_netif esp_http_client esp_http_server esp_https_ota esp_event json fatfs console vfs app_update esp-tls wl - esp_timer esp_websocket_client esp_driver_gpio mcp-c-sdk + esp_timer esp_websocket_client esp_driver_gpio )