]> begriffs open source - cmsis-freertos/blob - CMSIS/RTOS2/FreeRTOS/Examples/Blinky/RTE/RTOS/FreeRTOSConfig.h
Added Event Recorder configuration and enhanced debug capabilities
[cmsis-freertos] / CMSIS / RTOS2 / FreeRTOS / Examples / Blinky / RTE / RTOS / FreeRTOSConfig.h
1 /* --------------------------------------------------------------------------
2  * Copyright (c) 2013-2018 Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Licensed under the Apache License, Version 2.0 (the License); you may
7  * not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * --------------------------------------------------------------------------
19  *
20  * $Revision:   V10.1.1
21  *
22  * Project:     CMSIS-FreeRTOS
23  * Title:       FreeRTOS configuration definitions
24  *
25  * --------------------------------------------------------------------------*/
26
27
28 #ifndef FREERTOS_CONFIG_H
29 #define FREERTOS_CONFIG_H
30
31 /*-----------------------------------------------------------
32  * Application specific definitions.
33  *
34  * These definitions should be adjusted for your particular hardware and
35  * application requirements.
36  *
37  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
38  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
39  *
40  * See http://www.freertos.org/a00110.html.
41  *----------------------------------------------------------*/
42
43 #include <stdint.h>
44
45 #include "RTE_Components.h"
46 #include CMSIS_device_header
47
48 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
49
50 //  <o>Minimal stack size [words] <0-65535>
51 //  <i> Stack for idle task and default task stack in words.
52 //  <i> Default: 128
53 #define configMINIMAL_STACK_SIZE                ((uint16_t)(128))
54
55 //  <o>Total heap size [bytes] <0-0xFFFFFFFF>
56 //  <i> Heap memory size in bytes.
57 //  <i> Default: 8192
58 #define configTOTAL_HEAP_SIZE                   ((size_t)8192)
59
60 //  <o>Kernel tick frequency [Hz] <0-0xFFFFFFFF>
61 //  <i> Kernel tick rate in Hz.
62 //  <i> Default: 1000
63 #define configTICK_RATE_HZ                      ((TickType_t)1000)
64
65 //  <o>Timer task stack depth [words] <0-65535>
66 //  <i> Stack for timer task in words.
67 //  <i> Default: 80
68 #define configTIMER_TASK_STACK_DEPTH            80
69
70 //  <o>Timer task priority <0-56>
71 //  <i> Timer task priority.
72 //  <i> Default: 40 (High)
73 #define configTIMER_TASK_PRIORITY               40
74
75 //  <o>Timer queue length <0-1024>
76 //  <i> Timer command queue length.
77 //  <i> Default: 5
78 #define configTIMER_QUEUE_LENGTH                5
79
80 //  <o>Preemption interrupt priority
81 //  <i> Maximum priority of interrupts that are safe to call FreeRTOS API.
82 //  <i> Default: 16
83 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    16
84
85 //  <q>Use time slicing
86 //  <i> Enable setting to use timeslicing.
87 //  <i> Default: 1
88 #define configUSE_TIME_SLICING                  1
89
90 //  <q>Idle should yield
91 //  <i> Control Yield behaviour of the idle task.
92 //  <i> Default: 1
93 #define configIDLE_SHOULD_YIELD                 1
94
95 //  <o>Check for stack overflow
96 //    <0=>Disable <1=>Method one <2=>Method two
97 //  <i> Enable or disable stack overflow checking.
98 //  <i> Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled.
99 //  <i> Default: 0
100 #define configCHECK_FOR_STACK_OVERFLOW          2
101
102 //  <q>Use idle hook
103 //  <i> Enable callback function call on each idle task iteration.
104 //  <i> Callback function vApplicationIdleHook implementation is required when idle hook is enabled.
105 //  <i> Default: 0
106 #define configUSE_IDLE_HOOK                     0
107
108 //  <q>Use tick hook
109 //  <i> Enable callback function call during each tick interrupt.
110 //  <i> Callback function vApplicationTickHook implementation is required when tick hook is enabled.
111 //  <i> Default: 0
112 #define configUSE_TICK_HOOK                     0
113
114 //  <q>Use deamon task startup hook
115 //  <i> Enable callback function call when timer service starts.
116 //  <i> Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled.
117 //  <i> Default: 0
118 #define configUSE_DAEMON_TASK_STARTUP_HOOK      0
119
120 //  <q>Use malloc failed hook
121 //  <i> Enable callback function call when out of dynamic memory.
122 //  <i> Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled.
123 //  <i> Default: 0
124 #define configUSE_MALLOC_FAILED_HOOK            0
125
126 //  <o>Queue registry size
127 //  <i> Define maximum number of queue objects registered for debug purposes.
128 //  <i> The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names.
129 //  <i> Default: 0
130 #define configQUEUE_REGISTRY_SIZE               0
131
132 // <h>Event Recorder configuration
133 //  <i> Initialize and setup Event Recorder level filtering.
134 //  <i> Settings have no effect when Event Recorder is not present.
135
136 //  <q>Initialize Event Recorder
137 //  <i> Initialize Event Recorder before FreeRTOS kernel start.
138 //  <i> Default: 1
139 #define configEVR_INITIALIZE                    1
140
141 //  <e>Setup recording level filter
142 //  <i> Enable configuration of FreeRTOS events recording level
143 //  <i> Default: 1
144 #define configEVR_SETUP_LEVEL                   1
145
146 //  <o>Tasks functions
147 //  <i> Define event recording level bitmask for events generated from Tasks functions.
148 //  <i> Default: 0x05
149 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
150 #define configEVR_LEVEL_TASKS                   0x05
151
152 //  <o>Queue functions
153 //  <i> Define event recording level bitmask for events generated from Queue functions.
154 //  <i> Default: 0x05
155 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
156 #define configEVR_LEVEL_QUEUE                   0x05
157
158 //  <o>Timer functions
159 //  <i> Define event recording level bitmask for events generated from Timer functions.
160 //  <i> Default: 0x05
161 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
162 #define configEVR_LEVEL_TIMERS                  0x05
163
164 //  <o>Event Groups functions
165 //  <i> Define event recording level bitmask for events generated from Event Groups functions.
166 //  <i> Default: 0x05
167 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
168 #define configEVR_LEVEL_EVENTGROUPS             0x05
169
170 //  <o>Heap functions
171 //  <i> Define event recording level bitmask for events generated from Heap functions.
172 //  <i> Default: 0x05
173 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
174 #define configEVR_LEVEL_HEAP                    0x05
175
176 //  <o>Stream Buffer functions
177 //  <i> Define event recording level bitmask for events generated from Stream Buffer functions.
178 //  <i> Default: 0x05
179 //    <0x00=>Off <0x01=>Errors <0x05=>Errors + Operation <0x0F=>All
180 #define configEVR_LEVEL_STREAMBUFFER            0x05
181 //  </e>
182 // </h>
183
184 //------------- <<< end of configuration section >>> ---------------------------
185
186 /* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */
187 #define configCPU_CLOCK_HZ                      (SystemCoreClock)
188 #define configSUPPORT_STATIC_ALLOCATION         1
189 #define configSUPPORT_DYNAMIC_ALLOCATION        1
190 #define configUSE_PREEMPTION                    1
191 #define configUSE_TIMERS                        1
192 #define configUSE_MUTEXES                       1
193 #define configUSE_RECURSIVE_MUTEXES             1
194 #define configUSE_COUNTING_SEMAPHORES           1
195 #define configUSE_TASK_NOTIFICATIONS            1
196 #define configUSE_TRACE_FACILITY                1
197 #define configUSE_16_BIT_TICKS                  0
198 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
199 #define configMAX_PRIORITIES                    56
200 #define configKERNEL_INTERRUPT_PRIORITY         255
201
202 /* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */
203 #define INCLUDE_xEventGroupSetBitsFromISR       1
204 #define INCLUDE_xSemaphoreGetMutexHolder        1
205 #define INCLUDE_vTaskDelay                      1
206 #define INCLUDE_vTaskDelayUntil                 1
207 #define INCLUDE_vTaskDelete                     1
208 #define INCLUDE_xTaskGetCurrentTaskHandle       1
209 #define INCLUDE_xTaskGetSchedulerState          1
210 #define INCLUDE_uxTaskGetStackHighWaterMark     1
211 #define INCLUDE_uxTaskPriorityGet               1
212 #define INCLUDE_vTaskPrioritySet                1
213 #define INCLUDE_eTaskGetState                   1
214 #define INCLUDE_vTaskSuspend                    1
215 #define INCLUDE_xTimerPendFunctionCall          1
216
217 /* Map the FreeRTOS port interrupt handlers to their CMSIS standard names. */
218 #define xPortPendSVHandler                      PendSV_Handler
219 #define vPortSVCHandler                         SVC_Handler
220
221 /* Include debug event definitions */
222 #include "freertos_evr.h"
223
224 #endif /* FREERTOS_CONFIG_H */