1menu "Application Level Tracing"
2
3    choice APPTRACE_DESTINATION
4        prompt "Data Destination"
5        default APPTRACE_DEST_NONE
6        help
7            Select destination for application trace: trace memory or none (to disable).
8
9        config APPTRACE_DEST_TRAX
10            bool "Trace memory"
11            select APPTRACE_ENABLE
12        config APPTRACE_DEST_NONE
13            bool "None"
14    endchoice
15
16    config APPTRACE_ENABLE
17        bool
18        depends on !ESP32_TRAX && !ESP32S2_TRAX
19        select ESP32_MEMMAP_TRACEMEM
20        select ESP32S2_MEMMAP_TRACEMEM
21        select ESP32_MEMMAP_TRACEMEM_TWOBANKS
22        select ESP32S2_MEMMAP_TRACEMEM_TWOBANKS
23        default n
24        help
25            Enables/disable application tracing module.
26
27    config APPTRACE_LOCK_ENABLE
28        bool
29        default !SYSVIEW_ENABLE
30        help
31            Enables/disable application tracing module internal sync lock.
32
33    config APPTRACE_ONPANIC_HOST_FLUSH_TMO
34        int "Timeout for flushing last trace data to host on panic"
35        depends on APPTRACE_ENABLE
36        range -1 5000
37        default -1
38        help
39            Timeout for flushing last trace data to host in case of panic. In ms.
40            Use -1 to disable timeout and wait forever.
41
42    config APPTRACE_POSTMORTEM_FLUSH_THRESH
43        int "Threshold for flushing last trace data to host on panic"
44        depends on APPTRACE_DEST_TRAX
45        range 0 16384
46        default 0
47        help
48            Threshold for flushing last trace data to host on panic in post-mortem mode.
49            This is minimal amount of data needed to perform flush. In bytes.
50
51    config APPTRACE_PENDING_DATA_SIZE_MAX
52        int "Size of the pending data buffer"
53        depends on APPTRACE_DEST_TRAX
54        default 0
55        help
56            Size of the buffer for events in bytes. It is useful for buffering events from
57            the time critical code (scheduler, ISRs etc). If this parameter is 0 then
58            events will be discarded when main HW buffer is full.
59
60    menu "FreeRTOS SystemView Tracing"
61        depends on APPTRACE_ENABLE
62        config SYSVIEW_ENABLE
63            bool "SystemView Tracing Enable"
64            depends on APPTRACE_ENABLE
65            default n
66            help
67                Enables supporrt for SEGGER SystemView tracing functionality.
68
69        choice SYSVIEW_TS_SOURCE
70            prompt "Timer to use as timestamp source"
71            depends on SYSVIEW_ENABLE
72            default SYSVIEW_TS_SOURCE_CCOUNT if FREERTOS_UNICORE && !PM_ENABLE
73            default SYSVIEW_TS_SOURCE_TIMER_00 if !FREERTOS_UNICORE && !PM_ENABLE
74            default SYSVIEW_TS_SOURCE_ESP_TIMER if PM_ENABLE
75            help
76                SystemView needs to use a hardware timer as the source of timestamps
77                when tracing. This option selects the timer for it.
78
79            config SYSVIEW_TS_SOURCE_CCOUNT
80                bool "CPU cycle counter (CCOUNT)"
81                depends on FREERTOS_UNICORE && !PM_ENABLE
82
83            config SYSVIEW_TS_SOURCE_TIMER_00
84                bool "Timer 0, Group 0"
85                depends on !PM_ENABLE
86
87            config SYSVIEW_TS_SOURCE_TIMER_01
88                bool "Timer 1, Group 0"
89                depends on !PM_ENABLE
90
91            config SYSVIEW_TS_SOURCE_TIMER_10
92                bool "Timer 0, Group 1"
93                depends on !PM_ENABLE
94
95            config SYSVIEW_TS_SOURCE_TIMER_11
96                bool "Timer 1, Group 1"
97                depends on !PM_ENABLE
98
99            config SYSVIEW_TS_SOURCE_ESP_TIMER
100                bool "esp_timer high resolution timer"
101
102        endchoice
103
104        config SYSVIEW_MAX_TASKS
105            int "Maximum supported tasks"
106            depends on SYSVIEW_ENABLE
107            range 1 64
108            default 16
109            help
110                Configures maximum supported tasks in sysview debug
111
112        config SYSVIEW_BUF_WAIT_TMO
113            int "Trace buffer wait timeout"
114            depends on SYSVIEW_ENABLE
115            default 500
116            help
117                Configures timeout (in us) to wait for free space in trace buffer.
118                Set to -1 to wait forever and avoid lost events.
119
120        config SYSVIEW_EVT_OVERFLOW_ENABLE
121            bool "Trace Buffer Overflow Event"
122            depends on SYSVIEW_ENABLE
123            default y
124            help
125                Enables "Trace Buffer Overflow" event.
126
127        config SYSVIEW_EVT_ISR_ENTER_ENABLE
128            bool "ISR Enter Event"
129            depends on SYSVIEW_ENABLE
130            default y
131            help
132                Enables "ISR Enter" event.
133
134        config SYSVIEW_EVT_ISR_EXIT_ENABLE
135            bool "ISR Exit Event"
136            depends on SYSVIEW_ENABLE
137            default y
138            help
139                Enables "ISR Exit" event.
140
141        config SYSVIEW_EVT_ISR_TO_SCHEDULER_ENABLE
142            bool "ISR Exit to Scheduler Event"
143            depends on SYSVIEW_ENABLE
144            default y
145            help
146                Enables "ISR to Scheduler" event.
147
148        config SYSVIEW_EVT_TASK_START_EXEC_ENABLE
149            bool "Task Start Execution Event"
150            depends on SYSVIEW_ENABLE
151            default y
152            help
153                Enables "Task Start Execution" event.
154
155        config SYSVIEW_EVT_TASK_STOP_EXEC_ENABLE
156            bool "Task Stop Execution Event"
157            depends on SYSVIEW_ENABLE
158            default y
159            help
160                Enables "Task Stop Execution" event.
161
162        config SYSVIEW_EVT_TASK_START_READY_ENABLE
163            bool "Task Start Ready State Event"
164            depends on SYSVIEW_ENABLE
165            default y
166            help
167                Enables "Task Start Ready State" event.
168
169        config SYSVIEW_EVT_TASK_STOP_READY_ENABLE
170            bool "Task Stop Ready State Event"
171            depends on SYSVIEW_ENABLE
172            default y
173            help
174                Enables "Task Stop Ready State" event.
175
176        config SYSVIEW_EVT_TASK_CREATE_ENABLE
177            bool "Task Create Event"
178            depends on SYSVIEW_ENABLE
179            default y
180            help
181                Enables "Task Create" event.
182
183        config SYSVIEW_EVT_TASK_TERMINATE_ENABLE
184            bool "Task Terminate Event"
185            depends on SYSVIEW_ENABLE
186            default y
187            help
188                Enables "Task Terminate" event.
189
190        config SYSVIEW_EVT_IDLE_ENABLE
191            bool "System Idle Event"
192            depends on SYSVIEW_ENABLE
193            default y
194            help
195                Enables "System Idle" event.
196
197        config SYSVIEW_EVT_TIMER_ENTER_ENABLE
198            bool "Timer Enter Event"
199            depends on SYSVIEW_ENABLE
200            default y
201            help
202                Enables "Timer Enter" event.
203
204        config SYSVIEW_EVT_TIMER_EXIT_ENABLE
205            bool "Timer Exit Event"
206            depends on SYSVIEW_ENABLE
207            default y
208            help
209                Enables "Timer Exit" event.
210
211    endmenu
212
213    config APPTRACE_GCOV_ENABLE
214        bool "GCOV to Host Enable"
215        depends on APPTRACE_ENABLE && !SYSVIEW_ENABLE
216        select ESP_DEBUG_STUBS_ENABLE
217        default n
218        help
219            Enables support for GCOV data transfer to host.
220
221endmenu
222