| 
									
										
										
										
											2019-06-21 14:29:32 +08:00
										 |  |  | set(srcs  | 
					
						
							|  |  |  |     "heap_caps.c"
 | 
					
						
							|  |  |  |     "heap_caps_init.c"
 | 
					
						
							|  |  |  |     "multi_heap.c")
 | 
					
						
							| 
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 |  |  | 
 | 
					
						
							|  |  |  | if(NOT CONFIG_HEAP_POISONING_DISABLED)
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  |     list(APPEND srcs "multi_heap_poisoning.c")
 | 
					
						
							| 
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-30 16:45:51 -07:00
										 |  |  | if(CONFIG_HEAP_TASK_TRACKING)
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  |     list(APPEND srcs "heap_task_info.c")
 | 
					
						
							| 
									
										
										
										
											2018-09-30 16:45:51 -07:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:29:47 +03:00
										 |  |  | if(CONFIG_HEAP_TRACING_STANDALONE)
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  |     list(APPEND srcs "heap_trace_standalone.c")
 | 
					
						
							| 
									
										
										
										
											2019-07-24 20:20:11 +03:00
										 |  |  |     set_source_files_properties(heap_trace_standalone.c | 
					
						
							|  |  |  |         PROPERTIES COMPILE_FLAGS
 | 
					
						
							|  |  |  |         -Wno-frame-address)
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:29:47 +03:00
										 |  |  | endif()
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-28 15:38:23 +08:00
										 |  |  | idf_component_register(SRCS "${srcs}" | 
					
						
							|  |  |  |                     INCLUDE_DIRS include
 | 
					
						
							|  |  |  |                     LDFRAGMENTS linker.lf
 | 
					
						
							|  |  |  |                     PRIV_REQUIRES soc)
 | 
					
						
							| 
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 |  |  | 
 | 
					
						
							|  |  |  | if(CONFIG_HEAP_TRACING)
 | 
					
						
							| 
									
										
										
										
											2018-02-27 15:45:30 +11:00
										 |  |  |     set(WRAP_FUNCTIONS | 
					
						
							| 
									
										
										
										
											2018-05-01 16:54:27 +10:00
										 |  |  |         calloc
 | 
					
						
							|  |  |  |         malloc
 | 
					
						
							|  |  |  |         free
 | 
					
						
							|  |  |  |         realloc
 | 
					
						
							|  |  |  |         heap_caps_malloc
 | 
					
						
							|  |  |  |         heap_caps_free
 | 
					
						
							|  |  |  |         heap_caps_realloc
 | 
					
						
							|  |  |  |         heap_caps_malloc_default
 | 
					
						
							|  |  |  |         heap_caps_realloc_default)
 | 
					
						
							| 
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-27 15:45:30 +11:00
										 |  |  |     foreach(wrap ${WRAP_FUNCTIONS})
 | 
					
						
							| 
									
										
										
										
											2019-06-04 19:05:33 +08:00
										 |  |  |         target_link_libraries(${COMPONENT_LIB} INTERFACE "-Wl,--wrap=${wrap}")
 | 
					
						
							| 
									
										
										
										
											2018-02-27 15:45:30 +11:00
										 |  |  |     endforeach()
 | 
					
						
							| 
									
										
										
										
											2019-12-18 17:04:49 +01:00
										 |  |  | endif()
 | 
					
						
							| 
									
										
										
										
											2018-01-12 13:49:13 +11:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-18 17:04:49 +01:00
										 |  |  | if(NOT CMAKE_BUILD_EARLY_EXPANSION)
 | 
					
						
							|  |  |  |     idf_build_get_property(build_components BUILD_COMPONENTS)
 | 
					
						
							|  |  |  |     if(freertos IN_LIST build_components)
 | 
					
						
							|  |  |  |         target_compile_options(${COMPONENT_TARGET} PRIVATE "-DMULTI_HEAP_FREERTOS")
 | 
					
						
							|  |  |  |     endif()
 | 
					
						
							| 
									
										
										
										
											2018-02-27 15:45:30 +11:00
										 |  |  | endif()
 | 
					
						
							| 
									
										
										
										
											2019-12-18 17:04:49 +01:00
										 |  |  | 
 |