diff --git a/.gitignore b/.gitignore index a672504..95233c5 100644 --- a/.gitignore +++ b/.gitignore @@ -77,6 +77,9 @@ flake8_output.txt # ESP-IDF default build directory name build +build_esp*/ +build_linux*/ +size_info.txt # lock files for examples and components dependencies.lock diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index ca7c173..77ff97d 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -39,45 +39,17 @@ - pip install idf_build_apps - python tools/build_apps.py ${EXAMPLE_DIR} --config ${EXAMPLE_CONFIG} -t esp32s3 -vv -.build_matter_examples: &build_matter_examples - <<: *build_template - variables: - IDF_CI_BUILD: "1" - script: - - pip install --upgrade idf-component-manager - - pip install idf_build_apps - # setup esp_matter - - git clone --depth 1 https://github.com/espressif/esp-matter.git - - cd esp-matter - - git submodule update --init --depth 1 - - cd ./connectedhomeip/connectedhomeip - - ./scripts/checkout_submodules.py --platform linux esp32 --shallow - - cd ../.. - # `|| true` below ignores errors in the process, it's okay, since we are - # only interested pigweed setup which goes through as expected - - . $IDF_PATH/export.sh - - ./install.sh || true - - . ./export.sh - - cd .. - - python -m idf_build_apps build -vv - -p $EXAMPLE_DIR - -t all - --config "sdkconfig.ci.*=" - --build-dir build_@t_@w - --build-log build_log.txt - --size-file size.json - --check-warnings - --ignore-warning-str "$WARNING_STR" - --collect-size-info size_info.txt - --default-build-targets $IDF_TARGET +.build_matter_template: &build_matter_template + before_script: + - . ${ESP_MATTER_PATH}/export.sh -build_example_matter_switch_v5.1: +build_example_matter_switch: extends: - - .build_matter_examples + - .build_matter_template + - .build_examples_template - .rules:build:example_matter_switch - image: espressif/idf:release-v5.1 + image: espressif/esp-matter:latest_idf_v5.1.1 variables: - IDF_TARGET: esp32s3 EXAMPLE_DIR: examples/matter_switch build_example_chatgpt_demo: @@ -91,6 +63,17 @@ build_example_chatgpt_demo: variables: EXAMPLE_DIR: examples/chatgpt_demo +build_example_chatgpt_demo_factory_nvs: + extends: + - .build_examples_template + - .rules:build:example_chatgpt_demo_factory_nvs + parallel: + matrix: + - IMAGE: espressif/idf:release-v5.0 + - IMAGE: espressif/idf:latest + variables: + EXAMPLE_DIR: examples/chatgpt_demo/factory_nvs + build_example_factory_demo: extends: - .build_examples_template diff --git a/.gitlab/ci/rules.yml b/.gitlab/ci/rules.yml index 46f3357..0f23085 100644 --- a/.gitlab/ci/rules.yml +++ b/.gitlab/ci/rules.yml @@ -10,6 +10,9 @@ .patterns-example_chatgpt_demo: &patterns-example_chatgpt_demo - "examples/chatgpt_demo/**/*" +.patterns-example_chatgpt_demo_factory_nvs: &patterns-example_chatgpt_demo_factory_nvs + - "examples/chatgpt_demo/factory_nvs/**/*" + .patterns-example_matter_switch: &patterns-example_matter_switch - "examples/matter_switch/**/*" @@ -59,6 +62,15 @@ - <<: *if-dev-push changes: *patterns-example_chatgpt_demo +.rules:build:example_chatgpt_demo_factory_nvs: + rules: + - <<: *if-protected + - <<: *if-label-build + - <<: *if-dev-push + changes: *patterns-components_bsp + - <<: *if-dev-push + changes: *patterns-example_chatgpt_demo_factory_nvs + .rules:build:example_matter_switch: rules: - <<: *if-protected diff --git a/examples/chatgpt_demo/main/app/app_audio.c b/examples/chatgpt_demo/main/app/app_audio.c index 02092b2..687984b 100644 --- a/examples/chatgpt_demo/main/app/app_audio.c +++ b/examples/chatgpt_demo/main/app/app_audio.c @@ -294,9 +294,8 @@ EXIT: void sr_handler_task(void *pvParam) { - static bool mute_state = false; - #if CONFIG_BSP_BOARD_ESP32_S3_BOX + static bool mute_state = false; mute_flag = bsp_button_get(BSP_BUTTON_MUTE); printf("sr handle task, mute:%d\n", mute_flag); #endif diff --git a/examples/factory_demo/CMakeLists.txt b/examples/factory_demo/CMakeLists.txt index dada960..69f6caf 100644 --- a/examples/factory_demo/CMakeLists.txt +++ b/examples/factory_demo/CMakeLists.txt @@ -8,6 +8,9 @@ set(EXTRA_COMPONENT_DIRS ../../components ) -add_compile_options(-fdiagnostics-color=always) +add_compile_options(-fdiagnostics-color=always + -Wno-ignored-qualifiers + -Wno-deprecated-declarations + -Wno-unused-but-set-variable) project(factory_demo) diff --git a/examples/factory_demo/main/app/app_sr_handler.c b/examples/factory_demo/main/app/app_sr_handler.c index 778b846..5acae48 100644 --- a/examples/factory_demo/main/app/app_sr_handler.c +++ b/examples/factory_demo/main/app/app_sr_handler.c @@ -143,6 +143,7 @@ err: } return sr_current_lang; } + void sr_handler_task(void *pvParam) { FILE *fp; diff --git a/examples/factory_demo/main/gui/ui_net_config.c b/examples/factory_demo/main/gui/ui_net_config.c index 772d419..f6585ca 100644 --- a/examples/factory_demo/main/gui/ui_net_config.c +++ b/examples/factory_demo/main/gui/ui_net_config.c @@ -26,7 +26,9 @@ static lv_obj_t *g_btn_return = NULL; static void (*g_net_config_end_cb)(void) = NULL; +#if CONFIG_BSP_BOARD_ESP32_S3_BOX static void btn_return_down_cb(void *handle, void *arg); +#endif static void ui_app_page_return_click_cb(lv_event_t *e) { diff --git a/examples/matter_switch/CMakeLists.txt b/examples/matter_switch/CMakeLists.txt index d7f51d3..1645dc9 100644 --- a/examples/matter_switch/CMakeLists.txt +++ b/examples/matter_switch/CMakeLists.txt @@ -43,10 +43,19 @@ set(EXTRA_COMPONENT_DIRS #${extra_components_dirs_append} ) -add_compile_options(-fdiagnostics-color=always) +add_compile_options(-fdiagnostics-color=always + -Wno-ignored-qualifiers + -Wno-cpp + -Wno-maybe-uninitialized + -Wno-type-limits + -Wno-uninitialized + -Wno-unused-but-set-variable + -Wno-array-bounds + -Wno-deprecated-declarations + -Wno-unused-function) project(matter_switch) -idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=format;-Wno-error=maybe-uninitialized;-Wno-missing-field-initializers;" APPEND) diff --git a/examples/matter_switch/main/CMakeLists.txt b/examples/matter_switch/main/CMakeLists.txt index 1fdf116..a96d204 100644 --- a/examples/matter_switch/main/CMakeLists.txt +++ b/examples/matter_switch/main/CMakeLists.txt @@ -12,3 +12,4 @@ set_source_files_properties( -DLV_LVGL_H_INCLUDE_SIMPLE) spiffs_create_partition_image(storage ../spiffs FLASH_IN_PROJECT) +set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) \ No newline at end of file diff --git a/examples/mp3_demo/CMakeLists.txt b/examples/mp3_demo/CMakeLists.txt index 811073d..d31aaa7 100644 --- a/examples/mp3_demo/CMakeLists.txt +++ b/examples/mp3_demo/CMakeLists.txt @@ -6,7 +6,8 @@ set(EXTRA_COMPONENT_DIRS ../../components ) -add_compile_options(-fdiagnostics-color=always) +add_compile_options(-fdiagnostics-color=always + -Wno-ignored-qualifiers) project(mp3_demo) diff --git a/examples/mp3_demo/main/mp3_demo.c b/examples/mp3_demo/main/mp3_demo.c index 47a209b..59375d2 100644 --- a/examples/mp3_demo/main/mp3_demo.c +++ b/examples/mp3_demo/main/mp3_demo.c @@ -12,8 +12,6 @@ #include "ui_audio.h" #include "bsp_board.h" -static const char *TAG = "mp3_demo"; - static esp_err_t audio_mute_function(AUDIO_PLAYER_MUTE_SETTING setting) { // Volume saved when muting and restored when unmuting. Restoring volume is necessary diff --git a/examples/watering_demo/CMakeLists.txt b/examples/watering_demo/CMakeLists.txt index 953bb0c..4e48b2d 100644 --- a/examples/watering_demo/CMakeLists.txt +++ b/examples/watering_demo/CMakeLists.txt @@ -8,6 +8,7 @@ set(EXTRA_COMPONENT_DIRS ../../components ) -add_compile_options(-fdiagnostics-color=always) +add_compile_options(-fdiagnostics-color=always + -Wno-deprecated-declarations) project(watering_demo) diff --git a/launch.toml b/launch.toml index 39bb362..969a4b9 100644 --- a/launch.toml +++ b/launch.toml @@ -15,7 +15,7 @@ supported_apps = [ "ESP-BOX_USB_Headset_V0_0_1", "ESP-BOX_Demo_EN_V0_3_0", - "ESP-BOX_Demo_CN_V0_3_0" + "ESP-BOX_Demo_CN_V0_3_0", "ESP-BOX_MATTER_SWITCH_Demo_V1_0", "ESP-BOX-Lite_MATTER_SWITCH_Demo_V1_0", diff --git a/tools/build_apps.py b/tools/build_apps.py index 5314898..10048c7 100644 --- a/tools/build_apps.py +++ b/tools/build_apps.py @@ -18,7 +18,11 @@ from idf_build_apps import LOGGER, App, build_apps, find_apps, setup_logging PROJECT_ROOT = Path(__file__).parent.parent.absolute() APPS_BUILD_PER_JOB = 30 IGNORE_WARNINGS = [ - + r'1/2 app partitions are too small', + r'\'bsp_button_get\' is deprecated: use espressif/button API instead', + r'default on the choice symbol SEC_CERT_DAC_PROVIDER', + r'the choice symbol SEC_CERT_DAC_PROVIDER', + r'The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h', ] def _get_idf_version():