mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'refactor/nvs_remove_mbedtls_dep' into 'master'
NVS: removed mbedtls as default dependency Closes IDF-2085 See merge request espressif/esp-idf!16324
This commit is contained in:
commit
84d11d1c3e
@ -601,7 +601,7 @@ 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
|
||||
REQUIRES nvs_flash soc esp_timer esp_pm esp_phy mbedtls
|
||||
LDFRAGMENTS "linker.lf")
|
||||
|
||||
if(CONFIG_BT_ENABLED)
|
||||
|
@ -24,19 +24,11 @@ if(${target} STREQUAL "linux")
|
||||
message(FATAL_ERROR "NVS currently doesn't support encryption if built for Linux.")
|
||||
endif()
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC "-DLINUX_TARGET")
|
||||
else()
|
||||
# TODO: this is a workaround until IDF-2085 is fixed
|
||||
idf_component_get_property(mbedtls_lib mbedtls COMPONENT_LIB)
|
||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${mbedtls_lib})
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC --coverage)
|
||||
target_link_libraries(${COMPONENT_LIB} PUBLIC --coverage)
|
||||
endif()
|
||||
|
||||
if(CONFIG_NVS_ENCRYPTION)
|
||||
target_sources(${COMPONENT_LIB} PRIVATE "src/nvs_encrypted_partition.cpp")
|
||||
idf_component_get_property(mbedtls_lib mbedtls COMPONENT_LIB)
|
||||
target_link_libraries(${COMPONENT_LIB} PUBLIC ${mbedtls_lib})
|
||||
endif()
|
||||
|
||||
if(${target} STREQUAL "linux")
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC --coverage)
|
||||
target_link_libraries(${COMPONENT_LIB} PUBLIC --coverage)
|
||||
target_link_libraries(${COMPONENT_LIB} PRIVATE idf::mbedtls)
|
||||
endif()
|
||||
|
@ -2,3 +2,7 @@ idf_component_register(SRC_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES cmock test_utils nvs_flash bootloader_support
|
||||
EMBED_TXTFILES encryption_keys.bin partition_encrypted.bin sample.bin)
|
||||
|
||||
if(CONFIG_NVS_ENCRYPTION)
|
||||
target_link_libraries(${COMPONENT_LIB} PUBLIC idf::mbedtls)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user