2019-03-15 09:44:27 +00:00
|
|
|
if(BOOTLOADER_BUILD)
|
|
|
|
# For bootloader, all we need from esp_common is headers
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(INCLUDE_DIRS include)
|
2019-04-07 12:33:56 +00:00
|
|
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
|
2019-03-15 09:44:27 +00:00
|
|
|
else()
|
|
|
|
# Regular app build
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(SRCS "src/dbg_stubs.c"
|
|
|
|
"src/esp_err_to_name.c"
|
|
|
|
"src/esp_timer.c"
|
|
|
|
"src/ets_timer_legacy.c"
|
|
|
|
"src/freertos_hooks.c"
|
|
|
|
"src/ipc.c"
|
|
|
|
"src/pm_locks.c"
|
|
|
|
"src/stack_check.c"
|
|
|
|
INCLUDE_DIRS include
|
|
|
|
PRIV_REQUIRES soc)
|
2019-03-21 04:21:01 +00:00
|
|
|
|
2019-03-15 09:44:27 +00:00
|
|
|
set_source_files_properties(
|
|
|
|
"src/stack_check.c"
|
|
|
|
PROPERTIES COMPILE_FLAGS
|
|
|
|
-fno-stack-protector)
|
2019-04-07 12:33:56 +00:00
|
|
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY LINK_LIBRARIES "-Wl,--gc-sections")
|
|
|
|
set_property(TARGET ${COMPONENT_LIB} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-Wl,--gc-sections")
|
2019-03-15 09:44:27 +00:00
|
|
|
endif()
|