2020-11-10 06:51:08 +00:00
|
|
|
idf_component_register(SRCS "intr_alloc.c"
|
|
|
|
"esp_async_memcpy.c"
|
|
|
|
"panic.c"
|
|
|
|
"system_api.c"
|
|
|
|
"startup.c"
|
|
|
|
"sleep_modes.c"
|
|
|
|
"system_time.c"
|
2020-02-02 15:23:16 +00:00
|
|
|
INCLUDE_DIRS include
|
2020-07-21 09:15:19 +00:00
|
|
|
PRIV_REQUIRES spi_flash
|
|
|
|
# [refactor-todo] requirements due to init code,
|
|
|
|
# should be removable once using component init functions
|
|
|
|
# link-time registration is used.
|
|
|
|
esp_pm app_update nvs_flash pthread app_trace
|
2020-02-02 15:23:16 +00:00
|
|
|
LDFRAGMENTS "linker.lf")
|
|
|
|
|
|
|
|
add_subdirectory(port)
|
2020-03-03 04:22:41 +00:00
|
|
|
|
2020-11-10 07:40:01 +00:00
|
|
|
# After system initialization, `start_app` (and its other cores variant) is called.
|
|
|
|
# This is provided by the user or from another component. Since we can't establish
|
2020-06-10 13:13:31 +00:00
|
|
|
# dependency on what we don't know, force linker to not drop the symbol regardless
|
|
|
|
# of link line order.
|
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u start_app")
|
2020-02-13 12:43:23 +00:00
|
|
|
|
2020-11-10 06:51:08 +00:00
|
|
|
if(NOT CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE)
|
2020-06-10 13:13:31 +00:00
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u start_app_other_cores")
|
2020-07-21 10:11:22 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Disable stack protection in files which are involved in initialization of that feature
|
|
|
|
set_source_files_properties(
|
|
|
|
startup.c
|
|
|
|
PROPERTIES COMPILE_FLAGS
|
2020-06-23 08:46:06 +00:00
|
|
|
-fno-stack-protector)
|
2020-09-02 09:10:54 +00:00
|
|
|
|
|
|
|
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
|
|
|
|
set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/sleep_modes.c" PROPERTIES
|
|
|
|
COMPILE_FLAGS "-fno-jump-tables -fno-tree-switch-conversion")
|
2020-11-10 07:40:01 +00:00
|
|
|
endif()
|