]> begriffs open source - cmsis-freertos/blob - CMSIS/RTOS2/FreeRTOS/Config/ARMCA/FreeRTOSConfig.h
Update component versions (consistency)
[cmsis-freertos] / CMSIS / RTOS2 / FreeRTOS / Config / ARMCA / FreeRTOSConfig.h
1 /* --------------------------------------------------------------------------
2  * Copyright (c) 2013-2021 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.3.0
21  *
22  * Project:     CMSIS-FreeRTOS
23  * Title:       FreeRTOS configuration definitions
24  *
25  * --------------------------------------------------------------------------*/
26
27 #ifndef FREERTOS_CONFIG_H
28 #define FREERTOS_CONFIG_H
29
30 /*-----------------------------------------------------------
31  * Application specific definitions.
32  *
33  * These definitions should be adjusted for your particular hardware and
34  * application requirements.
35  *
36  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
37  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
38  *
39  * See http://www.freertos.org/a00110.html
40  *----------------------------------------------------------*/
41
42 #if (defined(__ARMCC_VERSION) || defined(__GNUC__) || defined(__ICCARM__))
43 #include <stdint.h>
44
45 #include "RTE_Components.h"
46 #include CMSIS_device_header
47
48 #include "os_tick.h"
49 #endif
50
51 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
52
53 //  <o>Minimal stack size [words] <0-65535>
54 //  <i> Stack for idle task and default task stack in words.
55 //  <i> Default: 128
56 #define configMINIMAL_STACK_SIZE                ((uint16_t)(128))
57
58 //  <o>Total heap size [bytes] <0-0xFFFFFFFF>
59 //  <i> Heap memory size in bytes.
60 //  <i> Default: 8192
61 #define configTOTAL_HEAP_SIZE                   ((size_t)8192)
62
63 //  <o>Kernel tick frequency [Hz] <0-0xFFFFFFFF>
64 //  <i> Kernel tick rate in Hz.
65 //  <i> Default: 1000
66 #define configTICK_RATE_HZ                      ((TickType_t)1000)
67
68 //  <o>Timer task stack depth [words] <0-65535>
69 //  <i> Stack for timer task in words.
70 //  <i> Default: 80
71 #define configTIMER_TASK_STACK_DEPTH            80
72
73 //  <o>Timer task priority <0-56>
74 //  <i> Timer task priority.
75 //  <i> Default: 40 (High)
76 #define configTIMER_TASK_PRIORITY               40
77
78 //  <o>Timer queue length <0-1024>
79 //  <i> Timer command queue length.
80 //  <i> Default: 5
81 #define configTIMER_QUEUE_LENGTH                5
82
83 //  <o>Preemption interrupt priority
84 //  <i> Maximum priority of interrupts that are safe to call FreeRTOS API.
85 //  <i> Default: 16
86 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    16
87
88 //  <q>Use time slicing
89 //  <i> Enable setting to use timeslicing.
90 //  <i> Default: 1
91 #define configUSE_TIME_SLICING                  1
92
93 //  <q>Idle should yield
94 //  <i> Control Yield behaviour of the idle task.
95 //  <i> Default: 1
96 #define configIDLE_SHOULD_YIELD                 1
97
98 //  <o>Check for stack overflow
99 //    <0=>Disable <1=>Method one <2=>Method two
100 //  <i> Enable or disable stack overflow checking.
101 //  <i> Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled.
102 //  <i> Default: 0
103 #define configCHECK_FOR_STACK_OVERFLOW          2
104
105 //  <q>Use idle hook
106 //  <i> Enable callback function call on each idle task iteration.
107 //  <i> Callback function vApplicationIdleHook implementation is required when idle hook is enabled.
108 //  <i> Default: 0
109 #define configUSE_IDLE_HOOK                     0
110
111 //  <q>Use tick hook
112 //  <i> Enable callback function call during each tick interrupt.
113 //  <i> Callback function vApplicationTickHook implementation is required when tick hook is enabled.
114 //  <i> Default: 0
115 #define configUSE_TICK_HOOK                     0
116
117 //  <q>Use deamon task startup hook
118 //  <i> Enable callback function call when timer service starts.
119 //  <i> Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled.
120 //  <i> Default: 0
121 #define configUSE_DAEMON_TASK_STARTUP_HOOK      0
122
123 //  <q>Use malloc failed hook
124 //  <i> Enable callback function call when out of dynamic memory.
125 //  <i> Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled.
126 //  <i> Default: 0
127 #define configUSE_MALLOC_FAILED_HOOK            0
128
129 //  <o>Queue registry size
130 //  <i> Define maximum number of queue objects registered for debug purposes.
131 //  <i> The queue registry is used by kernel aware debuggers to locate queue and semaphore structures and display associated text names.
132 //  <i> Default: 0
133 #define configQUEUE_REGISTRY_SIZE               0
134
135 //  <o>Interrupt controller base address
136 //  <i> Must be set to the base address of the ARM Generic Interrupt Controller (GIC).
137 //  <i> Default: 0x2C000000
138 #define configINTERRUPT_CONTROLLER_BASE_ADDRESS 0x2C000000UL
139
140 //  <o>Interrupt controller CPU interface offset
141 //  <i> Must be set to the offset from interrupt controller base address at which the CPU interface starts.
142 //  <i> Default: 0x1000
143 #define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x00000100UL
144
145 //  <o>Interrupt controller unique priorities
146 //  <i> The number of unique priorities that can be specified in the ARM Generic Interrupt Controller (GIC).
147 //  <i> Default: 32
148 #define configUNIQUE_INTERRUPT_PRIORITIES       32
149
150 //  <o>Maximum API call interrupt priority
151 //  <i> Interrupts assigned a priority at or below this priority can call interrupt safe FreeRTOS API function, and will nest.
152 //  <i> Interrupts assigned a priority above this priority will not be effected by RTOS critical sections, and will nest,
153 //  <i> but cannot call any FreeRTOS API functions.
154 //  <i> Default: 32
155 #define configMAX_API_CALL_INTERRUPT_PRIORITY   32
156
157 //------------- <<< end of configuration section >>> ---------------------------
158
159 /* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */
160 #define configCPU_CLOCK_HZ                      (SystemCoreClock)
161 #define configSUPPORT_STATIC_ALLOCATION         1
162 #define configSUPPORT_DYNAMIC_ALLOCATION        1
163 #define configUSE_PREEMPTION                    1
164 #define configUSE_TIMERS                        1
165 #define configUSE_MUTEXES                       1
166 #define configUSE_RECURSIVE_MUTEXES             1
167 #define configUSE_COUNTING_SEMAPHORES           1
168 #define configUSE_TASK_NOTIFICATIONS            1
169 #define configUSE_TRACE_FACILITY                1
170 #define configUSE_16_BIT_TICKS                  0
171 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
172 #define configMAX_PRIORITIES                    56
173 #define configKERNEL_INTERRUPT_PRIORITY         255
174
175 /* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */
176 #define INCLUDE_xEventGroupSetBitsFromISR       1
177 #define INCLUDE_xSemaphoreGetMutexHolder        1
178 #define INCLUDE_vTaskDelay                      1
179 #define INCLUDE_xTaskDelayUntil                 1
180 #define INCLUDE_vTaskDelete                     1
181 #define INCLUDE_xTaskGetCurrentTaskHandle       1
182 #define INCLUDE_xTaskGetSchedulerState          1
183 #define INCLUDE_uxTaskGetStackHighWaterMark     1
184 #define INCLUDE_uxTaskPriorityGet               1
185 #define INCLUDE_vTaskPrioritySet                1
186 #define INCLUDE_eTaskGetState                   1
187 #define INCLUDE_vTaskSuspend                    1
188 #define INCLUDE_xTimerPendFunctionCall          1
189
190 /* Map the FreeRTOS port timer configuration functions to their implementations */
191 #define configSETUP_TICK_INTERRUPT()                         \
192   OS_Tick_Setup (configTICK_RATE_HZ, FreeRTOS_Tick_Handler); \
193   OS_Tick_Enable();
194
195 #define configCLEAR_TICK_INTERRUPT()                         \
196   OS_Tick_AcknowledgeIRQ()
197
198 #endif /* FREERTOS_CONFIG_H */