From 8992e1cec84cf3fba82de7355ef671f5bf76589e Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 25 Jun 2024 15:16:39 +0800 Subject: [PATCH] fix(phy): fix esp32 build fail issue Closes https://github.com/espressif/esp-idf/issues/11972 --- components/esp_phy/CMakeLists.txt | 26 +++++++++---------- .../esp_phy/include/esp_phy_cert_test.h | 6 ++--- examples/phy/.build-test-rules.yml | 4 --- examples/phy/cert_test/sdkconfig.defaults | 1 + 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/components/esp_phy/CMakeLists.txt b/components/esp_phy/CMakeLists.txt index 98533093a7..b3efc9c51f 100644 --- a/components/esp_phy/CMakeLists.txt +++ b/components/esp_phy/CMakeLists.txt @@ -57,19 +57,6 @@ if(link_binary_libs) idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB) - if(CONFIG_IDF_TARGET_ESP32) - target_link_libraries(${COMPONENT_LIB} PUBLIC rtc) - target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a librtc.a - $) - elseif(CONFIG_IDF_TARGET_ESP32S2) - target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a - $) - elseif(CONFIG_SOC_BT_SUPPORTED OR CONFIG_SOC_IEEE802154_SUPPORTED) - target_link_libraries(${COMPONENT_LIB} PUBLIC btbb) - target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a libbtbb.a - $) - endif() - if(CONFIG_ESP_PHY_ENABLE_CERT_TEST) if(CONFIG_IDF_TARGET_ESP32) target_link_libraries(${COMPONENT_LIB} INTERFACE $ libbttestmode.a @@ -82,6 +69,19 @@ if(link_binary_libs) librfate.a librftest.a $) endif() endif() + + if(CONFIG_IDF_TARGET_ESP32) + target_link_libraries(${COMPONENT_LIB} PUBLIC rtc) + target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a librtc.a + $) + elseif(CONFIG_SOC_BT_SUPPORTED OR CONFIG_SOC_IEEE802154_SUPPORTED) + target_link_libraries(${COMPONENT_LIB} PUBLIC btbb) + target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a libbtbb.a + $) + elseif(CONFIG_SOC_WIFI_SUPPORTED) + target_link_libraries(${COMPONENT_LIB} INTERFACE $ libphy.a + $) + endif() endif() if(CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION) diff --git a/components/esp_phy/include/esp_phy_cert_test.h b/components/esp_phy/include/esp_phy_cert_test.h index 461295683c..75e6b5e093 100644 --- a/components/esp_phy/include/esp_phy_cert_test.h +++ b/components/esp_phy/include/esp_phy_cert_test.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -63,7 +63,7 @@ typedef struct { uint32_t phy_rx_correct_count; /*!< The number of desired packets received */ int phy_rx_rssi; /*!< Average RSSI of desired packets */ uint32_t phy_rx_total_count; /*!< The number of total packets received */ - uint32_t phy_rx_result_flag; /*!< 0 means no RX info; 1 means the lastest Wi-Fi RX info; 2 means the lastest BLE RX info. */ + uint32_t phy_rx_result_flag; /*!< 0 means no RX info; 1 means the latest Wi-Fi RX info; 2 means the latest BLE RX info. */ } esp_phy_rx_result_t; /** @@ -120,7 +120,7 @@ void esp_phy_cbw40m_en(bool en); void esp_phy_wifi_tx(uint32_t chan, esp_phy_wifi_rate_t rate, int8_t backoff, uint32_t length_byte, uint32_t packet_delay, uint32_t packet_num); /** - * @brief Test start/stop command, used to stop transmitting or reciving state. + * @brief Test start/stop command, used to stop transmitting or receiving state. * * @param value: * Value should be set to 3 before TX/RX. diff --git a/examples/phy/.build-test-rules.yml b/examples/phy/.build-test-rules.yml index c0445ccffb..921265fed0 100644 --- a/examples/phy/.build-test-rules.yml +++ b/examples/phy/.build-test-rules.yml @@ -1,7 +1,3 @@ # Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps examples/phy/cert_test: - enable: - - if: IDF_TARGET in ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s2", "esp32s3"] - temporary: true - reason: the other targets are not tested yet diff --git a/examples/phy/cert_test/sdkconfig.defaults b/examples/phy/cert_test/sdkconfig.defaults index b0ce7b5c29..13e6bed13d 100644 --- a/examples/phy/cert_test/sdkconfig.defaults +++ b/examples/phy/cert_test/sdkconfig.defaults @@ -2,3 +2,4 @@ CONFIG_ESP_TASK_WDT_EN=n CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=y CONFIG_ESP_PHY_ENABLE_CERT_TEST=y +CONFIG_BT_ENABLED=y