2 * FreeRTOS Kernel V10.0.1
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
6 * this software and associated documentation files (the "Software"), to deal in
7 * the Software without restriction, including without limitation the rights to
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 * the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 * http://www.FreeRTOS.org
23 * http://aws.amazon.com/freertos
29 #ifndef FREERTOS_CONFIG_H
30 #define FREERTOS_CONFIG_H
32 /*-----------------------------------------------------------
33 * Application specific definitions.
35 * These definitions should be adjusted for your particular hardware and
36 * application requirements.
38 * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
39 * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
41 * See http://www.freertos.org/a00110.html.
42 *----------------------------------------------------------*/
46 #include "RTE_Components.h"
47 #include CMSIS_device_header
51 //-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
53 // <o>Minimal stack size [words] <0-65535>
54 // <i> Stack for idle task and default task stack in words.
56 #define configMINIMAL_STACK_SIZE ((uint16_t)(128))
58 // <o>Total heap size [bytes] <0-0xFFFFFFFF>
59 // <i> Heap memory size in bytes.
61 #define configTOTAL_HEAP_SIZE ((size_t)8192)
63 // <o>Kernel tick frequency [Hz] <0-0xFFFFFFFF>
64 // <i> Kernel tick rate in Hz.
66 #define configTICK_RATE_HZ ((TickType_t)1000)
68 // <o>Timer task stack depth [words] <0-65535>
69 // <i> Stack for timer task in words.
71 #define configTIMER_TASK_STACK_DEPTH 80
73 // <o>Timer task priority <0-56>
74 // <i> Timer task priority.
75 // <i> Default: 40 (High)
76 #define configTIMER_TASK_PRIORITY 40
78 // <o>Timer queue length <0-1024>
79 // <i> Timer command queue length.
81 #define configTIMER_QUEUE_LENGTH 5
83 // <o>Preemption interrupt priority
84 // <i> Maximum priority of interrupts that are safe to call FreeRTOS API.
86 #define configMAX_SYSCALL_INTERRUPT_PRIORITY 16
88 // <q>Use time slicing
89 // <i> Enable setting to use timeslicing.
91 #define configUSE_TIME_SLICING 1
93 // <q>Idle should yield
94 // <i> Control Yield behaviour of the idle task.
96 #define configIDLE_SHOULD_YIELD 1
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.
103 #define configCHECK_FOR_STACK_OVERFLOW 2
106 // <i> Enable callback function call on each idle task iteration.
107 // <i> Callback function vApplicationIdleHook implementation is required when idle hook is enabled.
109 #define configUSE_IDLE_HOOK 0
112 // <i> Enable callback function call during each tick interrupt.
113 // <i> Callback function vApplicationTickHook implementation is required when tick hook is enabled.
115 #define configUSE_TICK_HOOK 0
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.
121 #define configUSE_DAEMON_TASK_STARTUP_HOOK 0
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.
127 #define configUSE_MALLOC_FAILED_HOOK 0
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.
133 #define configQUEUE_REGISTRY_SIZE 0
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
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
145 // <o>Interrupt controller unique priorities
146 // <i> The number of unique priorities that can be specified in the ARM Generic Interrupt Controller (GIC).
148 #define configUNIQUE_INTERRUPT_PRIORITIES 32
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.
155 #define configMAX_API_CALL_INTERRUPT_PRIORITY 32
157 //------------- <<< end of configuration section >>> ---------------------------
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
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_vTaskDelayUntil 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
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); \
195 #define configCLEAR_TICK_INTERRUPT() \
196 OS_Tick_AcknowledgeIRQ()
198 #endif /* FREERTOS_CONFIG_H */