1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_sources_ifdef(
4  CONFIG_TRACING_CORE
5  tracing_buffer.c
6  tracing_core.c
7  tracing_format_common.c
8  )
9if(CONFIG_TRACING_CORE)
10zephyr_sources_ifdef(
11  CONFIG_TRACING_SYNC
12  tracing_format_sync.c
13  )
14
15zephyr_sources_ifdef(
16  CONFIG_TRACING_ASYNC
17  tracing_format_async.c
18  )
19
20zephyr_sources_ifdef(
21  CONFIG_TRACING_BACKEND_USB
22  tracing_backend_usb.c
23  )
24
25zephyr_sources_ifdef(
26  CONFIG_TRACING_BACKEND_UART
27  tracing_backend_uart.c
28  )
29
30if (CONFIG_TRACING_BACKEND_POSIX)
31  zephyr_sources(tracing_backend_posix.c)
32  target_sources(native_simulator INTERFACE tracing_backend_posix_bottom.c)
33endif()
34
35zephyr_sources_ifdef(
36  CONFIG_TRACING_BACKEND_RAM
37  tracing_backend_ram.c
38  )
39
40zephyr_sources_ifdef(
41  CONFIG_TRACING_BACKEND_ADSP_MEMORY_WINDOW
42  tracing_backend_adsp_memory_window.c
43  )
44
45endif()
46
47zephyr_sources(
48  tracing_none.c
49  )
50
51zephyr_sources_ifdef(
52  CONFIG_TRACING_OBJECT_TRACKING
53  tracing_tracking.c
54  )
55
56zephyr_include_directories_ifdef(
57  CONFIG_TRACING
58  ${ZEPHYR_BASE}/kernel/include
59  ${ARCH_DIR}/${ARCH}/include
60)
61
62zephyr_include_directories_ifdef(CONFIG_TRACING include)
63
64add_subdirectory_ifdef(CONFIG_TRACING_CTF ctf)
65add_subdirectory_ifdef(CONFIG_SEGGER_SYSTEMVIEW sysview)
66add_subdirectory_ifdef(CONFIG_TRACING_TEST test)
67add_subdirectory_ifdef(CONFIG_TRACING_USER user)
68