2 FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
5 VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
7 This file is part of the FreeRTOS distribution.
9 FreeRTOS is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License (version 2) as published by the
11 Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
13 ***************************************************************************
14 >>! NOTE: The modification to the GPL is included to allow you to !<<
15 >>! distribute a combined work that includes FreeRTOS without being !<<
16 >>! obliged to provide the source code for proprietary components !<<
17 >>! outside of the FreeRTOS kernel. !<<
18 ***************************************************************************
20 FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. Full license text is available on the following
23 link: http://www.freertos.org/a00114.html
25 ***************************************************************************
27 * FreeRTOS provides completely free yet professionally developed, *
28 * robust, strictly quality controlled, supported, and cross *
29 * platform software that is more than just the market leader, it *
30 * is the industry's de facto standard. *
32 * Help yourself get started quickly while simultaneously helping *
33 * to support the FreeRTOS project by purchasing a FreeRTOS *
34 * tutorial book, reference manual, or both: *
35 * http://www.FreeRTOS.org/Documentation *
37 ***************************************************************************
39 http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
40 the FAQ page "My application does not run, what could be wrong?". Have you
41 defined configASSERT()?
43 http://www.FreeRTOS.org/support - In return for receiving this top quality
44 embedded software for free we request you assist our global community by
45 participating in the support forum.
47 http://www.FreeRTOS.org/training - Investing in training allows your team to
48 be as productive as possible as early as possible. Now you can receive
49 FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
50 Ltd, and the world's leading authority on the world's leading RTOS.
52 http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
53 including FreeRTOS+Trace - an indispensable productivity tool, a DOS
54 compatible FAT file system, and our tiny thread aware UDP/IP stack.
56 http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
57 Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
59 http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
60 Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
61 licenses offer ticketed support, indemnification and commercial middleware.
63 http://www.SafeRTOS.com - High Integrity Systems also provide a safety
64 engineered and independently SIL3 certified version for use in safety and
65 mission critical applications that require provable dependability.
70 #ifndef FREERTOS_CONFIG_H
71 #define FREERTOS_CONFIG_H
73 /*-----------------------------------------------------------
74 * Application specific definitions.
76 * These definitions should be adjusted for your particular hardware and
77 * application requirements.
79 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
80 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
82 * See http://www.freertos.org/a00110.html.
83 *----------------------------------------------------------*/
87 #include "RTE_Components.h"
88 #include CMSIS_device_header
93 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
95 // <o>Minimal stack size [words] <0-65535>
96 // <i> Stack for idle task and default task stack in words.
98 #define configMINIMAL_STACK_SIZE ((uint16_t)(128))
100 // <o>Total heap size [bytes] <0-0xFFFFFFFF>
101 // <i> Heap memory size in bytes.
103 #define configTOTAL_HEAP_SIZE ((size_t)8192)
105 // <o>Kernel tick frequency [Hz] <0-0xFFFFFFFF>
106 // <i> Kernel tick rate in Hz.
108 #define configTICK_RATE_HZ ((TickType_t)1000)
110 // <o>Timer task stack depth [words] <0-65535>
111 // <i> Stack for timer task in words.
113 #define configTIMER_TASK_STACK_DEPTH 80
115 // <o>Timer task priority <0-56>
116 // <i> Timer task priority.
117 // <i> Default: 40 (High)
118 #define configTIMER_TASK_PRIORITY 40
120 // <o>Timer queue length <0-1024>
121 // <i> Timer command queue length.
123 #define configTIMER_QUEUE_LENGTH 5
125 // <q>Use time slicing
126 // <i> Enable setting to use timeslicing.
128 #define configUSE_TIME_SLICING 1
130 // <q>Idle should yield
131 // <i> Control Yield behaviour of the idle task.
133 #define configIDLE_SHOULD_YIELD 1
135 // <o>Check for stack overflow
136 // <0=>Disable <1=>Method one <2=>Method two
137 // <i> Enable or disable stack overflow checking.
138 // <i> Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled.
140 #define configCHECK_FOR_STACK_OVERFLOW 2
143 // <i> Enable callback function call on each idle task iteration.
144 // <i> Callback function vApplicationIdleHook implementation is required when idle hook is enabled.
146 #define configUSE_IDLE_HOOK 0
149 // <i> Enable callback function call during each tick interrupt.
150 // <i> Callback function vApplicationTickHook implementation is required when tick hook is enabled.
152 #define configUSE_TICK_HOOK 0
154 // <q>Use deamon task startup hook
155 // <i> Enable callback function call when timer service starts.
156 // <i> Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled.
158 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
160 // <q>Use malloc failed hook
161 // <i> Enable callback function call when out of dynamic memory.
162 // <i> Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled.
164 #define configUSE_MALLOC_FAILED_HOOK 0
166 // <q>Interrupt controller base address
167 // <i> Must be set to the base address of the ARM Generic Interrupt Controller (GIC).
168 // <i> Default: 0x2C000000
169 #define configINTERRUPT_CONTROLLER_BASE_ADDRESS 0x2C000000UL
171 // <q>Interrupt controller CPU interface offset
172 // <i> Must be set to the offset from interrupt controller base address at which the CPU interface starts.
173 // <i> Default: 0x1000
174 #define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x00000100UL
176 // <q>Interrupt controller unique priorities
177 // <i> The number of unique priorities that can be specified in the ARM Generic Interrupt Controller (GIC).
179 #define configUNIQUE_INTERRUPT_PRIORITIES 32
181 // <q>Maximum API call interrupt priority
182 // <i> Interrupts assigned a priority at or below this priority can call interrupt safe FreeRTOS API function, and will nest.
183 // <i> Interrupts assigned a priority above this priority will not be effected by RTOS critical sections, and will nest,
184 // <i> but cannot call any FreeRTOS API functions.
186 #define configMAX_API_CALL_INTERRUPT_PRIORITY 32
188 //------------- <<< end of configuration section >>> ---------------------------
190 /* Defines needed by FreeRTOS to implement CMSIS RTOS2 API. Do not change! */
191 #define configCPU_CLOCK_HZ (SystemCoreClock)
192 #define configSUPPORT_STATIC_ALLOCATION 1
193 #define configSUPPORT_DYNAMIC_ALLOCATION 1
194 #define configUSE_PREEMPTION 1
195 #define configUSE_TIMERS 1
196 #define configUSE_MUTEXES 1
197 #define configUSE_RECURSIVE_MUTEXES 1
198 #define configUSE_COUNTING_SEMAPHORES 1
199 #define configUSE_TASK_NOTIFICATIONS 1
200 #define configUSE_TRACE_FACILITY 1
201 #define configUSE_16_BIT_TICKS 0
202 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
203 #define configMAX_PRIORITIES 56
204 #define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
205 #define configKERNEL_INTERRUPT_PRIORITY 255
207 /* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */
208 #define INCLUDE_xEventGroupSetBitsFromISR 1
209 #define INCLUDE_xSemaphoreGetMutexHolder 1
210 #define INCLUDE_vTaskDelay 1
211 #define INCLUDE_vTaskDelayUntil 1
212 #define INCLUDE_vTaskDelete 1
213 #define INCLUDE_xTaskGetCurrentTaskHandle 1
214 #define INCLUDE_xTaskGetSchedulerState 1
215 #define INCLUDE_uxTaskGetStackHighWaterMark 1
216 #define INCLUDE_uxTaskPriorityGet 1
217 #define INCLUDE_vTaskPrioritySet 1
218 #define INCLUDE_eTaskGetState 1
219 #define INCLUDE_vTaskSuspend 1
220 #define INCLUDE_xTimerPendFunctionCall 1
222 /* Map the FreeRTOS port timer configuration functions to their implementations */
223 #define configSETUP_TICK_INTERRUPT() \
224 OS_Tick_Setup (configTICK_RATE_HZ, FreeRTOS_Tick_Handler); \
227 #define configCLEAR_TICK_INTERRUPT() \
228 OS_Tick_AcknowledgeIRQ()
230 #endif /* FREERTOS_CONFIG_H */