Merge branch 'support/esp32h2beta2_libotport_and_libdriver' into 'master'

support build esp32h2beta1 & esp32h2beta2 on master

See merge request espressif/esp-idf!17858
This commit is contained in:
Shu Chen
2022-05-17 11:44:36 +08:00
6 changed files with 32 additions and 7 deletions

View File

@@ -11,8 +11,19 @@ if(CONFIG_IEEE802154_ENABLED)
idf_component_get_property(ieee802154_lib ieee802154_driver COMPONENT_LIB)
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${ieee802154_lib}>
$<TARGET_FILE:${esp_phy_lib}> libphy.a libbtbb.a)
else()
if(IDF_TARGET STREQUAL "esp32h2")
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_1)
target_link_libraries(${COMPONENT_LIB} INTERFACE
"-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev1")
endif()
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
target_link_libraries(${COMPONENT_LIB} INTERFACE
"-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev2")
endif()
else()
target_link_libraries(${COMPONENT_LIB} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}")
endif()
target_link_libraries(${COMPONENT_LIB} INTERFACE $<TARGET_FILE:${esp_phy_lib}> lib802154.a libphy.a libbtbb.a
$<TARGET_FILE:${esp_phy_lib}>)
endif()

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -35,6 +35,7 @@ typedef enum {
ESP_IEEE802154_TX_ERR_COEXIST, /*!< Rejected by coexist system */
ESP_IEEE802154_TX_ERR_COEXIST_REJ, /*!< Rejected by coexist system before transmitting frame */
ESP_IEEE802154_TX_ERR_COEXIST_ACK, /*!< Rejected by coexist system when receiving ack */
ESP_IEEE802154_TX_ERR_SECURITY, /*!< Invalid security configuration */
} esp_ieee802154_tx_error_t;
/**

View File

@@ -173,9 +173,22 @@ if(CONFIG_OPENTHREAD_ENABLED)
target_link_libraries(${COMPONENT_LIB} PUBLIC $<TARGET_FILE:${openthread_br_lib}>)
endif()
else()
if(IDF_TARGET STREQUAL "esp32h2")
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_1)
add_prebuilt_library(openthread_port
"${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev1/libopenthread_port.a"
REQUIRES openthread)
endif()
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
add_prebuilt_library(openthread_port
"${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/rev2/libopenthread_port.a"
REQUIRES openthread)
endif()
else()
add_prebuilt_library(openthread_port "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libopenthread_port.a"
REQUIRES openthread)
endif()
add_prebuilt_library(openthread_br "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libopenthread_br.a"
REQUIRES openthread)