esp-idf/components/riscv/CMakeLists.txt
Marius Vikhammer 9362434c47 build-system: add property for architecture (riscv/xtensa)
riscv/xtensa is now a common component.
2022-05-20 09:00:32 +08:00

23 lines
517 B
CMake

idf_build_get_property(target IDF_TARGET)
idf_build_get_property(arch IDF_TARGET_ARCH)
if(NOT "${arch}" STREQUAL "riscv")
return()
endif()
if(BOOTLOADER_BUILD)
set(priv_requires soc)
else()
set(priv_requires soc freertos)
set(srcs
"instruction_decode.c"
"interrupt.c"
"vectors.S")
endif()
idf_component_register(SRCS "${srcs}"
LDFRAGMENTS linker.lf
INCLUDE_DIRS "include"
PRIV_REQUIRES ${priv_requires})