build system: removed target component

After refactoring the target components (e.g. esp32) no longer contained any real functionality.
What remained in these components have been moved elsewhere and the component itself deleted from the
build system.
This commit is contained in:
Marius Vikhammer 2022-05-17 16:17:37 +08:00
parent d485f6add8
commit cf1b222cac
18 changed files with 20 additions and 102 deletions

View File

@ -78,7 +78,6 @@
/components/cxx/ @esp-idf-codeowners/system /components/cxx/ @esp-idf-codeowners/system
/components/driver/ @esp-idf-codeowners/peripherals /components/driver/ @esp-idf-codeowners/peripherals
/components/efuse/ @esp-idf-codeowners/system /components/efuse/ @esp-idf-codeowners/system
/components/esp32*/ @esp-idf-codeowners/system
/components/esp_adc_cal/ @esp-idf-codeowners/peripherals /components/esp_adc_cal/ @esp-idf-codeowners/peripherals
/components/esp_common/ @esp-idf-codeowners/system /components/esp_common/ @esp-idf-codeowners/system
/components/esp_eth/ @esp-idf-codeowners/network /components/esp_eth/ @esp-idf-codeowners/network

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32)

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32c2")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32c2)

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32c3")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32c3)

View File

@ -1,5 +0,0 @@
set(compile_options "-Wno-error=format="
"-nostartfiles"
"-Wno-format")
idf_build_set_property(COMPILE_OPTIONS "${compile_options}" APPEND)

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32h2")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32h2)

View File

@ -1,5 +0,0 @@
set(compile_options "-Wno-error=format="
"-nostartfiles"
"-Wno-format")
idf_build_set_property(COMPILE_OPTIONS "${compile_options}" APPEND)

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32s2")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32s2)

View File

@ -1,13 +0,0 @@
idf_build_get_property(target IDF_TARGET)
if(NOT "${target}" STREQUAL "esp32s3")
return()
endif()
if(NOT BOOTLOADER_BUILD)
# [refactor-todo] propagate these requirements for compatibility
# remove in the future
set(legacy_reqs soc)
endif()
idf_component_register(REQUIRES "${legacy_reqs}"
REQUIRED_IDF_TARGETS esp32s3)

View File

@ -11,7 +11,6 @@ list(APPEND srcs "src/esp_err_to_name.c")
# Note: esp_ipc, esp_pm added as a public requirement to keep compatibility as to be located here. # Note: esp_ipc, esp_pm added as a public requirement to keep compatibility as to be located here.
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include INCLUDE_DIRS include
REQUIRES ${target}
LDFRAGMENTS "common.lf" "soc.lf") LDFRAGMENTS "common.lf" "soc.lf")
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 4) set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 4)

View File

@ -14,4 +14,4 @@ idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS include INCLUDE_DIRS include
PRIV_INCLUDE_DIRS private_include PRIV_INCLUDE_DIRS private_include
REQUIRES esp_common REQUIRES esp_common
PRIV_REQUIRES soc driver "${target}") PRIV_REQUIRES soc driver)

View File

@ -173,7 +173,6 @@ idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes} INCLUDE_DIRS ${includes}
PRIV_INCLUDE_DIRS ${priv_include} PRIV_INCLUDE_DIRS ${priv_include}
REQUIRES soc esp_rom REQUIRES soc esp_rom
PRIV_REQUIRES ${target}
LDFRAGMENTS linker.lf) LDFRAGMENTS linker.lf)
if(CONFIG_HAL_DEFAULT_ASSERTION_LEVEL EQUAL 1) if(CONFIG_HAL_DEFAULT_ASSERTION_LEVEL EQUAL 1)

View File

@ -252,18 +252,14 @@ 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 idf::${target}) set_property(TARGET mbedcrypto APPEND PROPERTY LINK_LIBRARIES idf::driver)
set_property(TARGET mbedcrypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES idf::driver idf::${target}) set_property(TARGET mbedcrypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES idf::driver)
target_link_libraries(${COMPONENT_LIB} ${linkage_type} ${mbedtls_targets}) target_link_libraries(${COMPONENT_LIB} ${linkage_type} ${mbedtls_targets})
if(CONFIG_ESP_TLS_USE_DS_PERIPHERAL) if(CONFIG_ESP_TLS_USE_DS_PERIPHERAL)
# Link target (e.g. esp32s2) library to component library
idf_component_get_property(target_lib ${target} COMPONENT_LIB)
set_property(TARGET mbedcrypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<LINK_ONLY:${target_lib}>)
# The linker seems to be unable to resolve all the dependencies without increasing this # The linker seems to be unable to resolve all the dependencies without increasing this
set_property(TARGET mbedcrypto APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 6) set_property(TARGET mbedcrypto APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 6)
target_link_libraries(${COMPONENT_LIB} ${linkage_type} ${target_lib})
endif() endif()
# Link esp-cryptoauthlib to mbedtls # Link esp-cryptoauthlib to mbedtls

View File

@ -1,6 +1,9 @@
Removed or deprecated components Removed or deprecated components
================================ ================================
Components moved to IDF Component Registry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Following components are removed from ESP-IDF and moved to `IDF Component Registry <https://components.espressif.com/>`_: Following components are removed from ESP-IDF and moved to `IDF Component Registry <https://components.espressif.com/>`_:
* `libsodium <https://components.espressif.com/component/espressif/libsodium>`_ * `libsodium <https://components.espressif.com/component/espressif/libsodium>`_
@ -25,8 +28,20 @@ To install libsodium component with the latest version compatible to X.Y accordi
To find out which versions of each component are available, open https://components.espressif.com, search for the component by its name and check the versions listed on the component page. To find out which versions of each component are available, open https://components.espressif.com, search for the component by its name and check the versions listed on the component page.
Deprecated Components
^^^^^^^^^^^^^^^^^^^^^
Following components are removed since they were deprecated in IDF v4.x Following components are removed since they were deprecated in IDF v4.x
* ``tcpip_adapter`` Please use the :doc:`ESP-NETIF </api-reference/network/esp_netif>` component instead; you can follow the `Migration guide to ESP-NETIF<tcpip-adapter>` * ``tcpip_adapter`` Please use the :doc:`ESP-NETIF </api-reference/network/esp_netif>` component instead; you can follow the `Migration guide to ESP-NETIF<tcpip-adapter>`
.. note:: OpenSSL-API component is no longer supported. It is not available in the IDF Component Registry, either. Please use :doc:`ESP-TLS </api-reference/protocols/esp_tls>` or :component:`mbedtls` API directly. .. note:: OpenSSL-API component is no longer supported. It is not available in the IDF Component Registry, either. Please use :doc:`ESP-TLS </api-reference/protocols/esp_tls>` or :component:`mbedtls` API directly.
The targets components are no longer necessary after refactoring and have been removed:
* ``esp32``
* ``esp32s2``
* ``esp32s3``
* ``esp32c2``
* ``esp32c3``
* ``esp32h2``

View File

@ -15,7 +15,7 @@ if("${TARGET}" IN_LIST targets)
# although esptool_py does not generate static library, # although esptool_py does not generate static library,
# processing the component is needed for flashing related # processing the component is needed for flashing related
# targets and file generation # targets and file generation
COMPONENTS "${TARGET}" freertos esptool_py COMPONENTS freertos esptool_py
SDKCONFIG ${CMAKE_CURRENT_LIST_DIR}/sdkconfig SDKCONFIG ${CMAKE_CURRENT_LIST_DIR}/sdkconfig
BUILD_DIR ${CMAKE_BINARY_DIR}) BUILD_DIR ${CMAKE_BINARY_DIR})
else() else()
@ -33,7 +33,7 @@ add_executable(${elf_file} main.c)
# Link the static libraries to the executable # Link the static libraries to the executable
if("${TARGET}" IN_LIST targets) if("${TARGET}" IN_LIST targets)
target_link_libraries(${elf_file} "idf::${TARGET}" idf::freertos idf::spi_flash) target_link_libraries(${elf_file} idf::freertos idf::spi_flash)
# Attach additional targets to the executable file for flashing, # Attach additional targets to the executable file for flashing,
# linker script generation, partition_table generation, etc. # linker script generation, partition_table generation, etc.
idf_build_executable(${elf_file}) idf_build_executable(${elf_file})

View File

@ -427,7 +427,6 @@ macro(idf_build_process target)
idf_build_get_property(arch IDF_TARGET_ARCH) idf_build_get_property(arch IDF_TARGET_ARCH)
if(NOT "${target}" STREQUAL "linux") if(NOT "${target}" STREQUAL "linux")
idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${target} APPEND)
idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${arch} APPEND) idf_build_set_property(__COMPONENT_REQUIRES_COMMON ${arch} APPEND)
endif() endif()

View File

@ -16,7 +16,6 @@ project(g1_components)
set(extra_allowed_components set(extra_allowed_components
${CONFIG_IDF_TARGET_ARCH} ${CONFIG_IDF_TARGET_ARCH}
${CONFIG_IDF_TARGET}
) )
# These components are currently included into "G1" build, but shouldn't. # These components are currently included into "G1" build, but shouldn't.