mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
mbedtls: remove dependency on driver component
- keep `esp_pm` dependency conditional in mbedtls - refactor `bt` cmakelist to keep dependencies as private Related: IDF-1265
This commit is contained in:
parent
1b1068ce22
commit
a94c74c26b
@ -678,7 +678,8 @@ endif()
|
|||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "${include_dirs}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
||||||
REQUIRES nvs_flash soc esp_timer esp_pm esp_phy mbedtls
|
REQUIRES esp_timer
|
||||||
|
PRIV_REQUIRES nvs_flash soc esp_pm esp_phy mbedtls driver
|
||||||
LDFRAGMENTS "linker.lf")
|
LDFRAGMENTS "linker.lf")
|
||||||
|
|
||||||
if(CONFIG_BT_ENABLED)
|
if(CONFIG_BT_ENABLED)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION)
|
if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION)
|
||||||
idf_component_register(SRC_DIRS "."
|
idf_component_register(SRC_DIRS "."
|
||||||
PRIV_INCLUDE_DIRS "."
|
PRIV_INCLUDE_DIRS "."
|
||||||
PRIV_REQUIRES cmock nvs_flash bt)
|
PRIV_REQUIRES cmock nvs_flash bt esp_ringbuf)
|
||||||
endif()
|
endif()
|
||||||
|
@ -24,4 +24,4 @@ idf_component_register(SRCS ${srcs}
|
|||||||
INCLUDE_DIRS ${includes}
|
INCLUDE_DIRS ${includes}
|
||||||
PRIV_INCLUDE_DIRS ${priv_includes}
|
PRIV_INCLUDE_DIRS ${priv_includes}
|
||||||
LDFRAGMENTS linker.lf
|
LDFRAGMENTS linker.lf
|
||||||
PRIV_REQUIRES spi_flash app_update mbedtls esp_rom soc)
|
PRIV_REQUIRES spi_flash app_update mbedtls esp_rom soc driver)
|
||||||
|
@ -254,8 +254,10 @@ if(CONFIG_MBEDTLS_DYNAMIC_BUFFER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET mbedcrypto APPEND PROPERTY LINK_INTERFACE_LIBRARIES mbedtls)
|
set_property(TARGET mbedcrypto APPEND PROPERTY LINK_INTERFACE_LIBRARIES mbedtls)
|
||||||
set_property(TARGET mbedcrypto APPEND PROPERTY LINK_LIBRARIES idf::driver)
|
|
||||||
set_property(TARGET mbedcrypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES idf::driver)
|
if(CONFIG_PM_ENABLE)
|
||||||
|
target_link_libraries(mbedcrypto PRIVATE idf::esp_pm)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(${COMPONENT_LIB} ${linkage_type} ${mbedtls_targets})
|
target_link_libraries(${COMPONENT_LIB} ${linkage_type} ${mbedtls_targets})
|
||||||
|
|
||||||
|
@ -35,7 +35,9 @@
|
|||||||
#include "soc/lldesc.h"
|
#include "soc/lldesc.h"
|
||||||
#include "esp_heap_caps.h"
|
#include "esp_heap_caps.h"
|
||||||
#include "sys/param.h"
|
#include "sys/param.h"
|
||||||
|
#if CONFIG_PM_ENABLE
|
||||||
#include "esp_pm.h"
|
#include "esp_pm.h"
|
||||||
|
#endif
|
||||||
#include "esp_crypto_lock.h"
|
#include "esp_crypto_lock.h"
|
||||||
#include "hal/aes_hal.h"
|
#include "hal/aes_hal.h"
|
||||||
#include "aes/esp_aes_internal.h"
|
#include "aes/esp_aes_internal.h"
|
||||||
|
@ -20,7 +20,9 @@
|
|||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
#include "esp_intr_alloc.h"
|
#include "esp_intr_alloc.h"
|
||||||
|
#if CONFIG_PM_ENABLE
|
||||||
#include "esp_pm.h"
|
#include "esp_pm.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/semphr.h"
|
#include "freertos/semphr.h"
|
||||||
|
@ -46,5 +46,5 @@ endif()
|
|||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "${include_dirs}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
PRIV_INCLUDE_DIRS "${priv_include_dirs}"
|
||||||
PRIV_REQUIRES protobuf-c mbedtls console esp_http_server
|
PRIV_REQUIRES protobuf-c mbedtls console esp_http_server driver
|
||||||
REQUIRES bt)
|
REQUIRES bt)
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <esp_log.h>
|
#include <esp_log.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "nvs_flash.h"
|
|
||||||
|
|
||||||
#include <protocomm.h>
|
#include <protocomm.h>
|
||||||
#include <protocomm_ble.h>
|
#include <protocomm_ble.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* ESP BLE Mesh Example
|
* ESP BLE Mesh Example
|
||||||
*
|
*
|
||||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
#include "esp_netif.h"
|
#include "esp_netif.h"
|
||||||
#include "driver/gpio.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
#include "freertos/event_groups.h"
|
#include "freertos/event_groups.h"
|
||||||
|
@ -4,4 +4,5 @@ set(include_dirs ".")
|
|||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "${include_dirs}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
REQUIRES esp_hid)
|
REQUIRES esp_hid
|
||||||
|
PRIV_REQUIRES nvs_flash)
|
||||||
|
@ -4,4 +4,5 @@ set(include_dirs ".")
|
|||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
INCLUDE_DIRS "${include_dirs}"
|
INCLUDE_DIRS "${include_dirs}"
|
||||||
REQUIRES esp_hid)
|
REQUIRES esp_hid
|
||||||
|
PRIV_REQUIRES nvs_flash)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user