mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
refactor(ulp): select ULP architecture component as common component
The subproject knows which architecture it builds for, so a ULP program names only its own dependencies.
This commit is contained in:
@@ -64,11 +64,18 @@ function(__ulp_prepare_build)
|
||||
idf_build_set_property(${property} "")
|
||||
endforeach()
|
||||
|
||||
# Do not apply the default app component closure to ULP child projects.
|
||||
# ULP components should contribute dependencies explicitly.
|
||||
idf_build_set_property(__COMPONENT_REQUIRES_COMMON "")
|
||||
idf_build_set_property(__COMMON_COMPONENT_INTERFACES "")
|
||||
# A ULP program is built against the component for its architecture, so
|
||||
# every component of the child gets it without naming it. Nothing else of
|
||||
# the application component closure applies, and the interfaces are set
|
||||
# here rather than through __init_common_components, which would also add
|
||||
# the target's architecture component.
|
||||
__ulp_arch_component(ulp_component)
|
||||
|
||||
idf_component_get_property(ulp_component_interface "${ulp_component}" COMPONENT_INTERFACE)
|
||||
idf_build_set_property(__COMPONENT_REQUIRES_COMMON "${ulp_component}")
|
||||
idf_build_set_property(__COMMON_COMPONENT_INTERFACES "${ulp_component_interface}")
|
||||
idf_build_set_property(__COMMON_COMPONENTS_INITIALIZED YES)
|
||||
idf_component_include("${ulp_component}")
|
||||
|
||||
idf_build_set_property(__ULP_BUILD_PREPARED YES)
|
||||
endfunction()
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
# SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
idf_component_register(SRCS "main.c"
|
||||
REQUIRES lp_core)
|
||||
idf_component_register(SRCS "main.c")
|
||||
|
||||
Reference in New Issue
Block a user