|
| 1 | +/* |
| 2 | + FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd. |
| 3 | + All rights reserved |
| 4 | +
|
| 5 | + VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. |
| 6 | +
|
| 7 | + This file is part of the FreeRTOS distribution. |
| 8 | +
|
| 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. |
| 12 | +
|
| 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 | + *************************************************************************** |
| 19 | +
|
| 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 |
| 24 | +
|
| 25 | + *************************************************************************** |
| 26 | + * * |
| 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. * |
| 31 | + * * |
| 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 * |
| 36 | + * * |
| 37 | + *************************************************************************** |
| 38 | +
|
| 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()? |
| 42 | +
|
| 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. |
| 46 | +
|
| 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. |
| 51 | +
|
| 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. |
| 55 | +
|
| 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. |
| 58 | +
|
| 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. |
| 62 | +
|
| 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. |
| 66 | +
|
| 67 | + 1 tab == 4 spaces! |
| 68 | +*/ |
| 69 | + |
| 70 | +#ifndef FREERTOS_CONFIG_H |
| 71 | +#define FREERTOS_CONFIG_H |
| 72 | + |
| 73 | +/*----------------------------------------------------------- |
| 74 | + * Application specific definitions. |
| 75 | + * |
| 76 | + * These definitions should be adjusted for your particular hardware and |
| 77 | + * application requirements. |
| 78 | + * |
| 79 | + * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE |
| 80 | + * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. |
| 81 | + * |
| 82 | + * See http://www.freertos.org/a00110.html. |
| 83 | + *----------------------------------------------------------*/ |
| 84 | + |
| 85 | +#include <stdint.h> |
| 86 | + |
| 87 | +extern uint32_t SystemCoreClock; |
| 88 | + |
| 89 | +//-------- <<< Use Configuration Wizard in Context Menu >>> -------------------- |
| 90 | + |
| 91 | +// <o>Minimal stack size [words] <0-65535> |
| 92 | +// <i> Stack for idle task and default task stack in words. |
| 93 | +// <i> Default: 128 |
| 94 | +#define configMINIMAL_STACK_SIZE ((uint16_t)(128)) |
| 95 | + |
| 96 | +// <o>Total heap size [bytes] <0-0xFFFFFFFF> |
| 97 | +// <i> Heap memory size in bytes. |
| 98 | +// <i> Default: 8192 |
| 99 | +#define configTOTAL_HEAP_SIZE ((size_t)8192) |
| 100 | + |
| 101 | +// <o>Kernel tick frequency [Hz] <0-0xFFFFFFFF> |
| 102 | +// <i> Kernel tick rate in Hz. |
| 103 | +// <i> Default: 1000 |
| 104 | +#define configTICK_RATE_HZ ((TickType_t)1000) |
| 105 | + |
| 106 | +// <o>Timer task stack depth [words] <0-65535> |
| 107 | +// <i> Stack for timer task in words. |
| 108 | +// <i> Default: 80 |
| 109 | +#define configTIMER_TASK_STACK_DEPTH 80 |
| 110 | + |
| 111 | +// <o>Timer task priority <0-56> |
| 112 | +// <i> Timer task priority. |
| 113 | +// <i> Default: 40 (High) |
| 114 | +#define configTIMER_TASK_PRIORITY 40 |
| 115 | + |
| 116 | +// <o>Timer queue length <0-1024> |
| 117 | +// <i> Timer command queue length. |
| 118 | +// <i> Default: 5 |
| 119 | +#define configTIMER_QUEUE_LENGTH 5 |
| 120 | + |
| 121 | +// <q>Use time slicing |
| 122 | +// <i> Enable setting to use timeslicing. |
| 123 | +// <i> Default: 1 |
| 124 | +#define configUSE_TIME_SLICING 1 |
| 125 | + |
| 126 | +// <q>Idle should yield |
| 127 | +// <i> Control Yield behaviour of the idle task. |
| 128 | +// <i> Default: 1 |
| 129 | +#define configIDLE_SHOULD_YIELD 1 |
| 130 | + |
| 131 | +// <o>Check for stack overflow |
| 132 | +// <0=>Disable <1=>Method one <2=>Method two |
| 133 | +// <i> Enable or disable stack overflow checking. |
| 134 | +// <i> Callback function vApplicationStackOverflowHook implementation is required when stack checking is enabled. |
| 135 | +// <i> Default: 0 |
| 136 | +#define configCHECK_FOR_STACK_OVERFLOW 2 |
| 137 | + |
| 138 | +// <q>Use idle hook |
| 139 | +// <i> Enable callback function call on each idle task iteration. |
| 140 | +// <i> Callback function vApplicationIdleHook implementation is required when idle hook is enabled. |
| 141 | +// <i> Default: 0 |
| 142 | +#define configUSE_IDLE_HOOK 0 |
| 143 | + |
| 144 | +// <q>Use tick hook |
| 145 | +// <i> Enable callback function call during each tick interrupt. |
| 146 | +// <i> Callback function vApplicationTickHook implementation is required when tick hook is enabled. |
| 147 | +// <i> Default: 0 |
| 148 | +#define configUSE_TICK_HOOK 0 |
| 149 | + |
| 150 | +// <q>Use deamon task startup hook |
| 151 | +// <i> Enable callback function call when timer service starts. |
| 152 | +// <i> Callback function vApplicationDaemonTaskStartupHook implementation is required when deamon task startup hook is enabled. |
| 153 | +// <i> Default: 0 |
| 154 | +#define configUSE_DAEMON_TASK_STARTUP_HOOK 0 |
| 155 | + |
| 156 | +// <q>Use malloc failed hook |
| 157 | +// <i> Enable callback function call when out of dynamic memory. |
| 158 | +// <i> Callback function vApplicationMallocFailedHook implementation is required when malloc failed hook is enabled. |
| 159 | +// <i> Default: 0 |
| 160 | +#define configUSE_MALLOC_FAILED_HOOK 0 |
| 161 | + |
| 162 | +// <q>Interrupt controller base address |
| 163 | +// <i> Must be set to the base address of the ARM Generic Interrupt Controller (GIC). |
| 164 | +// <i> Default: 0x2C000000 |
| 165 | +#define configINTERRUPT_CONTROLLER_BASE_ADDRESS 0x2C000000UL |
| 166 | + |
| 167 | +// <q>Interrupt controller CPU interface offset |
| 168 | +// <i> Must be set to the offset from interrupt controller base address at which the CPU interface starts. |
| 169 | +// <i> Default: 0x1000 |
| 170 | +#define configINTERRUPT_CONTROLLER_CPU_INTERFACE_OFFSET 0x00000100UL |
| 171 | + |
| 172 | +// <q>Interrupt controller unique priorities |
| 173 | +// <i> The number of unique priorities that can be specified in the ARM Generic Interrupt Controller (GIC). |
| 174 | +// <i> Default: 32 |
| 175 | +#define configUNIQUE_INTERRUPT_PRIORITIES 32 |
| 176 | + |
| 177 | +// <q>Maximum API call interrupt priority |
| 178 | +// <i> Interrupts assigned a priority at or below this priority can call interrupt safe FreeRTOS API function, and will nest. |
| 179 | +// <i> Interrupts assigned a priority above this priority will not be effected by RTOS critical sections, and will nest, |
| 180 | +// <i> but cannot call any FreeRTOS API functions. |
| 181 | +// <i> Default: 32 |
| 182 | +#define configMAX_API_CALL_INTERRUPT_PRIORITY 32 |
| 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 configMAX_SYSCALL_INTERRUPT_PRIORITY 16 |
| 201 | +#define configKERNEL_INTERRUPT_PRIORITY 255 |
| 202 | + |
| 203 | +/* Defines that include FreeRTOS functions which implement CMSIS RTOS2 API. Do not change! */ |
| 204 | +#define INCLUDE_xEventGroupSetBitsFromISR 1 |
| 205 | +#define INCLUDE_xSemaphoreGetMutexHolder 1 |
| 206 | +#define INCLUDE_vTaskDelay 1 |
| 207 | +#define INCLUDE_vTaskDelayUntil 1 |
| 208 | +#define INCLUDE_vTaskDelete 1 |
| 209 | +#define INCLUDE_xTaskGetCurrentTaskHandle 1 |
| 210 | +#define INCLUDE_xTaskGetSchedulerState 1 |
| 211 | +#define INCLUDE_uxTaskGetStackHighWaterMark 1 |
| 212 | +#define INCLUDE_uxTaskPriorityGet 1 |
| 213 | +#define INCLUDE_vTaskPrioritySet 1 |
| 214 | +#define INCLUDE_eTaskGetState 1 |
| 215 | +#define INCLUDE_vTaskSuspend 1 |
| 216 | +#define INCLUDE_xTimerPendFunctionCall 1 |
| 217 | + |
| 218 | +/* Include kernel tick timer definitions */ |
| 219 | +#include "FreeRTOS_Tick_Config.h" |
| 220 | + |
| 221 | +/* Map the FreeRTOS port timer configuration functions to their implementations */ |
| 222 | +#define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt() |
| 223 | +#define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt() |
| 224 | + |
| 225 | +#endif /* FREERTOS_CONFIG_H */ |
0 commit comments