diff --git a/components/ulp/subproject/ulp_project.cmake b/components/ulp/subproject/ulp_project.cmake index 321bf969192..b741444f268 100644 --- a/components/ulp/subproject/ulp_project.cmake +++ b/components/ulp/subproject/ulp_project.cmake @@ -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() diff --git a/components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker_v2/main/ulp/main/CMakeLists.txt b/components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker_v2/main/ulp/main/CMakeLists.txt index e817767e3e1..225c5b9c5b9 100644 --- a/components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker_v2/main/ulp/main/CMakeLists.txt +++ b/components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker_v2/main/ulp/main/CMakeLists.txt @@ -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") diff --git a/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_fsm/main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_fsm/main/CMakeLists.txt index 71bc4527ab5..37d4277a338 100644 --- a/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_fsm/main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_fsm/main/CMakeLists.txt @@ -1,2 +1 @@ -idf_component_register(SRCS "main.S" - REQUIRES ulp_fsm) +idf_component_register(SRCS "main.S") diff --git a/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_riscv/main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_riscv/main/CMakeLists.txt index 831c0a745bf..34613e8e3cd 100644 --- a/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_riscv/main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/combined/main/ulp_riscv/main/CMakeLists.txt @@ -1,2 +1 @@ -idf_component_register(SRCS "main.c" - REQUIRES ulp_riscv) +idf_component_register(SRCS "main.c") diff --git a/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/components/ulp_wake/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/components/ulp_wake/CMakeLists.txt index cde67787ae4..9bd5443dd4e 100644 --- a/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/components/ulp_wake/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/components/ulp_wake/CMakeLists.txt @@ -1,2 +1 @@ -idf_component_register(SRCS "wake_up.S" - REQUIRES ulp_fsm) +idf_component_register(SRCS "wake_up.S") diff --git a/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/main/CMakeLists.txt index 1d25b1e1eee..f04ec9d5c05 100644 --- a/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/fsm/main/ulp/main/CMakeLists.txt @@ -2,7 +2,7 @@ set(srcs "counter.S") idf_component_register(SRCS ${srcs} - REQUIRES ulp_fsm ulp_wake + REQUIRES ulp_wake LDFRAGMENTS "ulp_fsm_sections.lf") target_compile_definitions(${COMPONENT_LIB} PRIVATE ULP_BUILD_SYSTEM_FSM_EXAMPLE=1) diff --git a/tools/test_apps/system/ulp/full_subproject/lp_core/main/ulp/main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/lp_core/main/ulp/main/CMakeLists.txt index a37977dbb44..5b867f38515 100644 --- a/tools/test_apps/system/ulp/full_subproject/lp_core/main/ulp/main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/lp_core/main/ulp/main/CMakeLists.txt @@ -1,5 +1,5 @@ idf_component_register(SRCS "main.c" - REQUIRES lp_core ulp_sum ulp_math) + REQUIRES ulp_sum ulp_math) # Linker script template processed by ldgen. The mapping[ulp_math_fast] # marker is resolved using the .lf fragment from the ulp_math component. diff --git a/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_add_main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_add_main/CMakeLists.txt index 8457c1b2eb5..34613e8e3cd 100644 --- a/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_add_main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_add_main/CMakeLists.txt @@ -1,2 +1 @@ -idf_component_register(SRCS "main.c" - REQUIRES lp_core) +idf_component_register(SRCS "main.c") diff --git a/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_multiply_main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_multiply_main/CMakeLists.txt index 8457c1b2eb5..34613e8e3cd 100644 --- a/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_multiply_main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/multi_binary/main/ulp/components/ulp_multiply_main/CMakeLists.txt @@ -1,2 +1 @@ -idf_component_register(SRCS "main.c" - REQUIRES lp_core) +idf_component_register(SRCS "main.c") diff --git a/tools/test_apps/system/ulp/full_subproject/riscv/main/ulp/main/CMakeLists.txt b/tools/test_apps/system/ulp/full_subproject/riscv/main/ulp/main/CMakeLists.txt index bc4cc55c3c4..561bab33a0c 100644 --- a/tools/test_apps/system/ulp/full_subproject/riscv/main/ulp/main/CMakeLists.txt +++ b/tools/test_apps/system/ulp/full_subproject/riscv/main/ulp/main/CMakeLists.txt @@ -1,5 +1,4 @@ idf_component_register(SRCS "main.c" - REQUIRES ulp_riscv LDFRAGMENTS "ulp_riscv_sections.lf") # Supplementary linker script template processed by ldgen. The mapping marker