mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(ulp): build ULP full subprojects as CMake v2 children
This commit is contained in:
@@ -4,14 +4,6 @@ set(target_folder "${target}")
|
||||
|
||||
set(srcs)
|
||||
|
||||
# On Linux the soc component is a simple wrapper, without much functionality
|
||||
if(NOT ${target} STREQUAL "linux")
|
||||
set(srcs "lldesc.c"
|
||||
"dport_access_common.c"
|
||||
"${target_folder}/interrupts.c"
|
||||
"${target_folder}/gpio_periph.c")
|
||||
endif()
|
||||
|
||||
set(includes "include" "${target_folder}")
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target_folder}/include")
|
||||
@@ -39,6 +31,33 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO(IDF-15956): potentially remove __ULP_BUILD handling from soc
|
||||
if(__ULP_BUILD)
|
||||
idf_component_register(INCLUDE_DIRS ${includes}
|
||||
REQUIRES esp_common)
|
||||
|
||||
# For an embedded system, the MMU page size should always be defined statically
|
||||
# For IDF, we define it according to the Flash size that user selects
|
||||
# Replace this value in an adaptive way, if Kconfig isn't available on your platform
|
||||
target_compile_definitions(${COMPONENT_LIB} INTERFACE SOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE)
|
||||
|
||||
target_compile_definitions(${COMPONENT_LIB} INTERFACE SOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ)
|
||||
|
||||
if(ULP_TYPE STREQUAL "lp_core")
|
||||
target_linker_script(${COMPONENT_LIB} INTERFACE "${target_folder}/ld/${target}.peripherals.ld")
|
||||
endif()
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
# On Linux the soc component is a simple wrapper, without much functionality.
|
||||
if(NOT ${target} STREQUAL "linux")
|
||||
set(srcs "lldesc.c"
|
||||
"dport_access_common.c"
|
||||
"${target_folder}/interrupts.c"
|
||||
"${target_folder}/gpio_periph.c")
|
||||
endif()
|
||||
|
||||
if(target STREQUAL "esp32")
|
||||
list(APPEND srcs "${target_folder}/dport_access.c")
|
||||
endif()
|
||||
@@ -55,9 +74,11 @@ if(CONFIG_SOC_BOD_SUPPORTED)
|
||||
list(APPEND srcs "${target_folder}/power_supply_periph.c")
|
||||
endif()
|
||||
|
||||
set(ldfragments "linker.lf")
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes}
|
||||
LDFRAGMENTS "linker.lf")
|
||||
LDFRAGMENTS ${ldfragments})
|
||||
|
||||
# For an embedded system, the MMU page size should always be defined statically
|
||||
# For IDF, we define it according to the Flash size that user selects
|
||||
|
||||
Reference in New Issue
Block a user