CMakeLists.txt 870 B

1234567891011121314151617181920212223242526272829
  1. idf_build_get_property(target IDF_TARGET)
  2. if(BOOTLOADER_BUILD)
  3. # bootloader only needs headers from this component
  4. set(priv_requires soc)
  5. else()
  6. set(priv_requires soc freertos)
  7. set(srcs "debug_helpers.c"
  8. "debug_helpers_asm.S"
  9. "expression_with_stack_xtensa_asm.S"
  10. "expression_with_stack_xtensa.c"
  11. "eri.c"
  12. "trax.c"
  13. "${target}/trax_init.c"
  14. )
  15. if(IDF_TARGET STREQUAL "esp32s2")
  16. list(APPEND srcs "stdatomic.c")
  17. endif()
  18. endif()
  19. idf_component_register(SRCS ${srcs}
  20. INCLUDE_DIRS include ${target}/include
  21. LDFRAGMENTS linker.lf
  22. PRIV_REQUIRES ${priv_requires})
  23. if(NOT BOOTLOADER_BUILD)
  24. target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libhal.a")
  25. endif()