diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fec556c..a26e1fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build_homekit_examples: script: - git submodule update --init --recursive # Cloning esp-idf - - git clone --recursive --branch ${IDF_GIT_BRANCH} --depth 1 ${IDF_GIT_PATH}/esp-idf.git + - git clone --recursive --single-branch --branch ${IDF_GIT_BRANCH} --depth 1 ${IDF_GIT_PATH}/esp-idf.git - cd esp-idf - ./install.sh - . export.sh diff --git a/components/homekit/esp_hap_core/CMakeLists.txt b/components/homekit/esp_hap_core/CMakeLists.txt index edabc83..ef6ae29 100644 --- a/components/homekit/esp_hap_core/CMakeLists.txt +++ b/components/homekit/esp_hap_core/CMakeLists.txt @@ -46,7 +46,7 @@ idf_component_register(SRCS ${srcs} INCLUDE_DIRS "include" PRIV_INCLUDE_DIRS ${priv_includes} REQUIRES - PRIV_REQUIRES libsodium esp_http_server hkdf-sha mu_srp json_generator json_parser esp_hap_platform esp_hap_apple_profiles mdns) + PRIV_REQUIRES libsodium esp_http_server hkdf-sha mu_srp json_generator json_parser esp_hap_platform esp_hap_apple_profiles mdns esp_timer) component_compile_options(-Wno-unused-function) target_compile_definitions(${COMPONENT_TARGET} PRIVATE "-D MFI_VER=\"${MFI_VER}\"") # Added just to automatically trigger re-runs of CMake diff --git a/components/homekit/esp_hap_core/src/priv_includes/esp_mfi_debug.h b/components/homekit/esp_hap_core/src/priv_includes/esp_mfi_debug.h index 59e530c..c0a17f1 100644 --- a/components/homekit/esp_hap_core/src/priv_includes/esp_mfi_debug.h +++ b/components/homekit/esp_hap_core/src/priv_includes/esp_mfi_debug.h @@ -59,7 +59,8 @@ extern "C"{ #define ESP_MFI_DEBUG_ASSERT 4 #define ESP_MFI_DEBUG_BLOCK 5 -#if ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(4, 2, 2) +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 3, 0) +#include #define esp_intr_printf esp_rom_printf #else #define esp_intr_printf ets_printf diff --git a/components/homekit/esp_hap_extras/src/hap_fw_upgrade.c b/components/homekit/esp_hap_extras/src/hap_fw_upgrade.c index 5a30c63..e4ab81c 100644 --- a/components/homekit/esp_hap_extras/src/hap_fw_upgrade.c +++ b/components/homekit/esp_hap_extras/src/hap_fw_upgrade.c @@ -29,6 +29,7 @@ #include #include #include +#include #define FW_UPG_TASK_PRIORITY 1 #define FW_UPG_STACKSIZE 6 * 1024 @@ -59,7 +60,15 @@ static void fw_upgrade_thread_entry(void *data) fw_upgrade_status = FW_UPG_STATUS_UPGRADING; hap_val_t val = {.i = fw_upgrade_status}; hap_char_update_val(fw_upgrade_status_char, &val); - int ret = esp_https_ota(client_config); + esp_err_t ret; +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) + esp_https_ota_config_t ota_config = { + .http_config = client_config, + }; + ret = esp_https_ota(&ota_config); +#else + ret = esp_https_ota(client_config); +#endif if (ret == ESP_OK) { ESP_LOGI(TAG, "FW Upgrade Successful"); fw_upgrade_status = FW_UPG_STATUS_SUCCESS; diff --git a/components/homekit/mu_srp/CMakeLists.txt b/components/homekit/mu_srp/CMakeLists.txt index 1aa0956..fdbbdba 100644 --- a/components/homekit/mu_srp/CMakeLists.txt +++ b/components/homekit/mu_srp/CMakeLists.txt @@ -2,7 +2,7 @@ set(COMPONENT_ADD_INCLUDEDIRS .) # Edit following two lines to set component requirements (see docs) set(COMPONENT_REQUIRES ) -set(COMPONENT_PRIV_REQUIRES hkdf-sha mbedtls esp_hw_support) +set(COMPONENT_PRIV_REQUIRES hkdf-sha mbedtls) set(COMPONENT_SRCS ./mu_srp.c)