2019-08-07 23:44:24 -04:00
|
|
|
if(BOOTLOADER_BUILD)
|
|
|
|
# bootloader only needs headers from this component
|
|
|
|
set(priv_requires soc)
|
|
|
|
else()
|
|
|
|
set(priv_requires soc freertos)
|
|
|
|
set(srcs "debug_helpers.c"
|
|
|
|
"debug_helpers_asm.S"
|
2019-08-09 01:26:49 -04:00
|
|
|
"eri.c"
|
2019-08-18 02:37:35 -04:00
|
|
|
)
|
2019-08-07 23:44:24 -04:00
|
|
|
|
2019-08-18 02:37:35 -04:00
|
|
|
if(IDF_TARGET STREQUAL "esp32s2beta")
|
|
|
|
list(APPEND srcs "stdatomic.c")
|
|
|
|
endif()
|
|
|
|
if(IDF_TARGET STREQUAL "esp32")
|
2019-08-07 23:44:24 -04:00
|
|
|
list(APPEND srcs "trax.c")
|
2019-06-05 22:57:29 -04:00
|
|
|
endif()
|
2019-05-27 02:29:43 -04:00
|
|
|
endif()
|
2019-03-25 09:11:53 -04:00
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
2019-08-07 23:44:24 -04:00
|
|
|
idf_component_register(SRCS ${srcs}
|
2019-04-28 03:38:23 -04:00
|
|
|
INCLUDE_DIRS include ${target}/include
|
|
|
|
LDFRAGMENTS linker.lf
|
2019-08-07 23:44:24 -04:00
|
|
|
PRIV_REQUIRES ${priv_requires})
|
2019-03-25 09:11:53 -04:00
|
|
|
|
2019-08-07 23:44:24 -04:00
|
|
|
if(NOT BOOTLOADER_BUILD)
|
|
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/${target}/libhal.a")
|
2019-05-27 02:29:43 -04:00
|
|
|
endif()
|