mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +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")
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
idf_component_register(SRCS "main.S"
|
||||
REQUIRES ulp_fsm)
|
||||
idf_component_register(SRCS "main.S")
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
REQUIRES ulp_riscv)
|
||||
idf_component_register(SRCS "main.c")
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
idf_component_register(SRCS "wake_up.S"
|
||||
REQUIRES ulp_fsm)
|
||||
idf_component_register(SRCS "wake_up.S")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
REQUIRES lp_core)
|
||||
idf_component_register(SRCS "main.c")
|
||||
|
||||
+1
-2
@@ -1,2 +1 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
REQUIRES lp_core)
|
||||
idf_component_register(SRCS "main.c")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user