Skip to content

Commit

Permalink
Merge branch 'bugfix/mbedtls_dep_on_driver' into 'master'
Browse files Browse the repository at this point in the history
mbedtls: remove dependency on driver component

Closes IDF-1265

See merge request espressif/esp-idf!19081
  • Loading branch information
mahavirj committed Jul 20, 2022
2 parents 6cab124 + a94c74c commit 075e072
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion components/bt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ endif()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${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")

if(CONFIG_BT_ENABLED)
Expand Down
2 changes: 1 addition & 1 deletion components/bt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if(CONFIG_BT_ENABLED OR CMAKE_BUILD_EARLY_EXPANSION)
idf_component_register(SRC_DIRS "."
PRIV_INCLUDE_DIRS "."
PRIV_REQUIRES cmock nvs_flash bt)
PRIV_REQUIRES cmock nvs_flash bt esp_ringbuf)
endif()
2 changes: 1 addition & 1 deletion components/espcoredump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
PRIV_INCLUDE_DIRS ${priv_includes}
LDFRAGMENTS linker.lf
PRIV_REQUIRES spi_flash app_update mbedtls esp_rom soc)
PRIV_REQUIRES spi_flash app_update mbedtls esp_rom soc driver)
6 changes: 4 additions & 2 deletions components/mbedtls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ if(CONFIG_MBEDTLS_DYNAMIC_BUFFER)
endif()

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})

Expand Down
2 changes: 2 additions & 0 deletions components/mbedtls/port/aes/dma/esp_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
#include "soc/lldesc.h"
#include "esp_heap_caps.h"
#include "sys/param.h"
#if CONFIG_PM_ENABLE
#include "esp_pm.h"
#endif
#include "esp_crypto_lock.h"
#include "hal/aes_hal.h"
#include "aes/esp_aes_internal.h"
Expand Down
2 changes: 2 additions & 0 deletions components/mbedtls/port/esp_bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#include "esp_log.h"
#include "esp_attr.h"
#include "esp_intr_alloc.h"
#if CONFIG_PM_ENABLE
#include "esp_pm.h"
#endif

#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
Expand Down
2 changes: 1 addition & 1 deletion components/protocomm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ endif()
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${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)
1 change: 0 additions & 1 deletion components/protocomm/src/transports/protocomm_nimble.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <sys/param.h>
#include <esp_log.h>
#include <string.h>
#include "nvs_flash.h"

#include <protocomm.h>
#include <protocomm_ble.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* 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
*/
Expand All @@ -23,7 +23,6 @@

#include "esp_log.h"
#include "esp_netif.h"
#include "driver/gpio.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
Expand Down
3 changes: 2 additions & 1 deletion examples/bluetooth/esp_hid_device/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ set(include_dirs ".")

idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
REQUIRES esp_hid)
REQUIRES esp_hid
PRIV_REQUIRES nvs_flash)
3 changes: 2 additions & 1 deletion examples/bluetooth/esp_hid_host/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ set(include_dirs ".")

idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
REQUIRES esp_hid)
REQUIRES esp_hid
PRIV_REQUIRES nvs_flash)

0 comments on commit 075e072

Please sign in to comment.