From 87070b8d3cba79175f0386253e5a80a88ed71658 Mon Sep 17 00:00:00 2001 From: zhangwenxu Date: Wed, 20 Apr 2022 15:38:06 +0800 Subject: [PATCH] openthread: support build esp32h2beta1 & esp32h2beta2 on master --- components/ieee802154/CMakeLists.txt | 13 ++++++++++++- .../ieee802154/include/esp_ieee802154_types.h | 3 ++- components/ieee802154/lib | 2 +- components/openthread/CMakeLists.txt | 17 +++++++++++++++-- components/openthread/lib | 2 +- components/openthread/openthread | 2 +- 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/components/ieee802154/CMakeLists.txt b/components/ieee802154/CMakeLists.txt index 4443262dae..4dddf17a2a 100644 --- a/components/ieee802154/CMakeLists.txt +++ b/components/ieee802154/CMakeLists.txt @@ -12,7 +12,18 @@ if(CONFIG_IEEE802154_ENABLED) target_link_libraries(${COMPONENT_LIB} INTERFACE $ $ libphy.a libbtbb.a) else() - target_link_libraries(${COMPONENT_LIB} INTERFACE "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}") + 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 $ lib802154.a libphy.a libbtbb.a $) endif() diff --git a/components/ieee802154/include/esp_ieee802154_types.h b/components/ieee802154/include/esp_ieee802154_types.h index 13a97341b5..4393de7640 100644 --- a/components/ieee802154/include/esp_ieee802154_types.h +++ b/components/ieee802154/include/esp_ieee802154_types.h @@ -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; /** diff --git a/components/ieee802154/lib b/components/ieee802154/lib index 421959af53..c40d87fbfb 160000 --- a/components/ieee802154/lib +++ b/components/ieee802154/lib @@ -1 +1 @@ -Subproject commit 421959af53886f3130113467718ec9924b518344 +Subproject commit c40d87fbfb196ecd3d1ece9be64f9e79c5394971 diff --git a/components/openthread/CMakeLists.txt b/components/openthread/CMakeLists.txt index 8b41f30532..cb22f9d3da 100644 --- a/components/openthread/CMakeLists.txt +++ b/components/openthread/CMakeLists.txt @@ -174,8 +174,21 @@ if(CONFIG_OPENTHREAD_ENABLED) endif() else() - add_prebuilt_library(openthread_port "${CMAKE_CURRENT_SOURCE_DIR}/lib/${idf_target}/libopenthread_port.a" - REQUIRES openthread) + 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) diff --git a/components/openthread/lib b/components/openthread/lib index bb1ecdd49b..3ec1c7b743 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit bb1ecdd49b50d59b6b0202bfa183679c83336c10 +Subproject commit 3ec1c7b74367a8b31b1d4fadb29a974a4235f2ac diff --git a/components/openthread/openthread b/components/openthread/openthread index 417b5645be..9a2d84a4b7 160000 --- a/components/openthread/openthread +++ b/components/openthread/openthread @@ -1 +1 @@ -Subproject commit 417b5645beac21f1b4b32f338e01b9a6fd303d63 +Subproject commit 9a2d84a4b78413e20f269df96a855e573e04a616