diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index aa803be436..2f0063b916 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -341,8 +341,8 @@ endif() set(args_gn "${CMAKE_CURRENT_BINARY_DIR}/args.gn") add_custom_command(OUTPUT "${args_gn}" - COMMAND ${python} - ${CMAKE_CURRENT_LIST_DIR}/create_args_gn.py + COMMAND ${python} + ${CMAKE_CURRENT_LIST_DIR}/create_args_gn.py "${CMAKE_BINARY_DIR}" "${idf_path}" "${CMAKE_CURRENT_LIST_DIR}/chip.c" @@ -558,7 +558,7 @@ foreach(phy_blob ${phy_blobs}) list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a") endforeach() -set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos esp_timer) +set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos esp_timer log) idf_build_get_property(build_components BUILD_COMPONENTS) foreach(component ${components_to_link}) # Some of the components are not present in IDF v4.x diff --git a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp index cda34afc94..4d6a1b81e1 100644 --- a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp +++ b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp @@ -269,12 +269,12 @@ void BLEManagerImpl::BleAdvTimeoutHandler(System::Layer *, void *) ChipLogProgress(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); BLEMgrImpl().mFlags.Set(Flags::kFastAdvertisingEnabled, 0); BLEMgrImpl().mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#ifdef CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING BLEMgrImpl().mFlags.Clear(Flags::kExtAdvertisingEnabled); BLEMgrImpl().StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS); #endif } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#ifdef CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING else { ChipLogProgress(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); @@ -1220,7 +1220,7 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) ExitNow(); } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#ifdef CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING // Check for extended advertisement interval and redact VID/PID if past the initial period. if (mFlags.Has(Flags::kExtAdvertisingEnabled)) { @@ -1280,7 +1280,7 @@ exit: return err; } -// TODO: Fix the ShutDown flow +// TODO: Fix the ShutDown flow void BLEManagerImpl::DeinitESPBleLayer() { esp_err_t err; @@ -1363,7 +1363,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) } else { -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#ifdef CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING if (!mFlags.Has(Flags::kExtAdvertisingEnabled)) { advertParams.adv_int_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN;