diff --git a/components/riscv/CMakeLists.txt b/components/riscv/CMakeLists.txt index e734394c5f..dc71ead66e 100644 --- a/components/riscv/CMakeLists.txt +++ b/components/riscv/CMakeLists.txt @@ -1,7 +1,9 @@ idf_build_get_property(target IDF_TARGET) + if(NOT "${target}" STREQUAL "esp32c3") return() endif() + if(BOOTLOADER_BUILD) set(priv_requires soc) else() diff --git a/components/xtensa/CMakeLists.txt b/components/xtensa/CMakeLists.txt index 0a791d85f0..3a8e20ad05 100644 --- a/components/xtensa/CMakeLists.txt +++ b/components/xtensa/CMakeLists.txt @@ -1,24 +1,17 @@ idf_build_get_property(target IDF_TARGET) -if(${target} STREQUAL "esp32c3") + +if("${target}" STREQUAL "esp32c3") return() endif() -if(BOOTLOADER_BUILD) - # bootloader only needs headers from this component - set(priv_requires soc) -else() - set(priv_requires soc freertos) - set(srcs "eri.c" - "xt_trax.c" - "xtensa_intr.c" - "xtensa_intr_asm.S" - ) + +set(srcs "eri.c" "xt_trax.c") + +if(NOT BOOTLOADER_BUILD) + list(APPEND srcs "xtensa_intr.c" "xtensa_intr_asm.S") endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS include ${target}/include - LDFRAGMENTS linker.lf - PRIV_REQUIRES ${priv_requires}) + LDFRAGMENTS linker.lf) -if(NOT BOOTLOADER_BUILD) - target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libxt_hal.a") -endif() +target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libxt_hal.a") \ No newline at end of file