1idf_build_get_property(target IDF_TARGET) 2 3idf_component_register(SRCS "src/gdbstub.c" "src/packet.c" 4 INCLUDE_DIRS "include" 5 PRIV_INCLUDE_DIRS "private_include" 6 LDFRAGMENTS "linker.lf" 7 REQUIRES "freertos" 8 PRIV_REQUIRES "soc" "esp_rom") 9 10if(CONFIG_IDF_TARGET_ARCH_XTENSA) 11 target_include_directories(${COMPONENT_LIB} PUBLIC "xtensa" "${target}") 12 target_sources(${COMPONENT_LIB} PRIVATE "xtensa/gdbstub_xtensa.c" "${target}/gdbstub_${target}.c") 13elseif(CONFIG_IDF_TARGET_ARCH_RISCV) 14 target_include_directories(${COMPONENT_LIB} PUBLIC "riscv" "${target}") 15 target_sources(${COMPONENT_LIB} PRIVATE "riscv/gdbstub_riscv.c" "${target}/gdbstub_${target}.c") 16endif() 17