2018-09-10 21:44:12 -04:00
|
|
|
set(COMPONENT_SRCS "heap_caps.c"
|
|
|
|
"heap_caps_init.c"
|
|
|
|
"multi_heap.c")
|
2018-01-11 21:49:13 -05:00
|
|
|
|
|
|
|
if(NOT CONFIG_HEAP_POISONING_DISABLED)
|
2018-09-12 20:56:59 -04:00
|
|
|
list(APPEND COMPONENT_SRCS "multi_heap_poisoning.c")
|
2018-01-11 21:49:13 -05:00
|
|
|
endif()
|
|
|
|
|
2018-09-30 19:45:51 -04:00
|
|
|
if(CONFIG_HEAP_TASK_TRACKING)
|
|
|
|
list(APPEND COMPONENT_SRCS "heap_task_info.c")
|
|
|
|
endif()
|
|
|
|
|
2018-12-12 12:29:47 -05:00
|
|
|
if(CONFIG_HEAP_TRACING_STANDALONE)
|
|
|
|
list(APPEND COMPONENT_SRCS "heap_trace_standalone.c")
|
|
|
|
endif()
|
|
|
|
|
2018-01-19 00:22:08 -05:00
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS "include")
|
2018-04-17 22:57:45 -04:00
|
|
|
set(COMPONENT_ADD_LDFRAGMENTS linker.lf)
|
2018-03-22 02:27:10 -04:00
|
|
|
set(COMPONENT_REQUIRES "")
|
|
|
|
|
2018-01-11 21:49:13 -05:00
|
|
|
register_component()
|
|
|
|
|
|
|
|
if(CONFIG_HEAP_TRACING)
|
2018-02-26 23:45:30 -05:00
|
|
|
set(WRAP_FUNCTIONS
|
2018-05-01 02:54:27 -04:00
|
|
|
calloc
|
|
|
|
malloc
|
|
|
|
free
|
|
|
|
realloc
|
|
|
|
heap_caps_malloc
|
|
|
|
heap_caps_free
|
|
|
|
heap_caps_realloc
|
|
|
|
heap_caps_malloc_default
|
|
|
|
heap_caps_realloc_default)
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-02-26 23:45:30 -05:00
|
|
|
foreach(wrap ${WRAP_FUNCTIONS})
|
2018-11-08 00:56:33 -05:00
|
|
|
target_link_libraries(${COMPONENT_TARGET} "-Wl,--wrap=${wrap}")
|
2018-02-26 23:45:30 -05:00
|
|
|
endforeach()
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-02-26 23:45:30 -05:00
|
|
|
endif()
|