2020-11-05 23:03:03 -05:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
2022-05-17 03:13:30 -04:00
|
|
|
idf_build_get_property(arch IDF_TARGET_ARCH)
|
2021-01-22 10:06:37 -05:00
|
|
|
|
2022-05-17 03:13:30 -04:00
|
|
|
if(NOT "${arch}" STREQUAL "riscv")
|
2020-11-05 23:03:03 -05:00
|
|
|
return()
|
|
|
|
endif()
|
2021-01-22 10:06:37 -05:00
|
|
|
|
2022-05-17 03:13:30 -04:00
|
|
|
|
2020-11-05 23:03:03 -05:00
|
|
|
if(BOOTLOADER_BUILD)
|
|
|
|
set(priv_requires soc)
|
|
|
|
else()
|
2022-04-26 23:37:08 -04:00
|
|
|
set(priv_requires soc)
|
2020-11-05 23:03:03 -05:00
|
|
|
set(srcs
|
2020-12-30 00:27:00 -05:00
|
|
|
"instruction_decode.c"
|
|
|
|
"interrupt.c"
|
2020-11-05 23:03:03 -05:00
|
|
|
"vectors.S")
|
2023-08-14 03:44:24 -04:00
|
|
|
|
|
|
|
if(CONFIG_SOC_INT_CLIC_SUPPORTED)
|
2023-12-28 21:59:55 -05:00
|
|
|
list(APPEND srcs "interrupt_clic.c" "vectors_clic.S")
|
|
|
|
elseif(CONFIG_SOC_INT_PLIC_SUPPORTED)
|
|
|
|
list(APPEND srcs "interrupt_plic.c" "vectors_intc.S")
|
2023-08-14 03:44:24 -04:00
|
|
|
else()
|
2023-12-28 21:59:55 -05:00
|
|
|
list(APPEND srcs "interrupt_intc.c" "vectors_intc.S")
|
2023-08-14 03:44:24 -04:00
|
|
|
endif()
|
2020-11-05 23:03:03 -05:00
|
|
|
endif()
|
|
|
|
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
LDFRAGMENTS linker.lf
|
|
|
|
INCLUDE_DIRS "include"
|
|
|
|
PRIV_REQUIRES ${priv_requires})
|
2023-12-28 21:59:55 -05:00
|
|
|
|
|
|
|
target_linker_script(${COMPONENT_LIB} INTERFACE "ld/rom.api.ld")
|