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 *----------------------------------------------------------*/
86 * The FreeRTOS Quark port implements a full interrupt nesting model.
88 * Interrupts that are assigned a priority at or below
89 * configMAX_API_CALL_INTERRUPT_PRIORITY can call interrupt safe API functions
92 * Interrupts that are assigned a priority above
93 * configMAX_API_CALL_INTERRUPT_PRIORITY cannot call any FreeRTOS API functions,
94 * will nest, and will not be masked by FreeRTOS critical sections (although all
95 * interrupts are briefly masked by the hardware itself on interrupt entry).
97 * FreeRTOS functions that can be called from an interrupt are those that end in
98 * "FromISR". FreeRTOS maintains a separate interrupt safe API to enable
99 * interrupt entry to be shorter, faster, simpler and smaller.
101 * User definable interrupt priorities range from 2 (the lowest) to 15 (the
104 #define configMAX_API_CALL_INTERRUPT_PRIORITY 10
107 * Interrupt entry code will switch the stack in use to a dedicated system
110 * configISR_STACK_SIZE defines the number of 32-bit values that can be stored
111 * on the system stack, and must be large enough to hold a potentially nested
112 * interrupt stack frame.
114 * Changing this parameter necessitates a complete rebuild so the assembly files
117 #define configISR_STACK_SIZE 350
120 * If configSUPPORT_FPU is set to 1 then tasks can optionally have a floating
121 * point context (the floating point registers will be saved as part of the task
122 * context). If configSUPPORT_FPU is set to 1 then a task must *not* use any
123 * floating point instructions until after it has called vPortTaskUsesFPU().
125 * If configSUPPORT_FPU is set to 0 then floating point instructions must never
128 #define configSUPPORT_FPU 1
130 /* There are two ways of implementing interrupt handlers:
132 * 1) As standard C functions -
134 * This method can only be used if configUSE_COMMON_INTERRUPT_ENTRY_POINT
135 * is set to 1. The C function is installed using
136 * xPortRegisterCInterruptHandler().
138 * This is the simplest of the two methods but incurs a slightly longer
139 * interrupt entry time.
141 * 2) By using an assembly stub that wraps the handler in the FreeRTOS
142 * portFREERTOS_INTERRUPT_ENTRY and portFREERTOS_INTERRUPT_EXIT macros. The handler is installed
143 * using xPortInstallInterruptHandler().
145 * This method can always be used. It is slightly more complex than
146 * method 1 but benefits from a faster interrupt entry time.
148 * Changing this parameter necessitates a complete clean build.
150 #define configUSE_COMMON_INTERRUPT_ENTRY_POINT 1
152 #define configCPU_CLOCK_HZ ( 400000000UL )
153 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
154 #define configMINIMAL_STACK_SIZE ( 125 )
155 #define configUSE_TICKLESS_IDLE 0
156 #define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
157 #define configUSE_PREEMPTION 1
158 #define configUSE_IDLE_HOOK 1
159 #define configUSE_TICK_HOOK 1
160 #define configMAX_PRIORITIES ( 7 )
161 #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 55 * 1024 ) )
162 #define configMAX_TASK_NAME_LEN ( 10 )
163 #define configUSE_TRACE_FACILITY 0
164 #define configUSE_16_BIT_TICKS 0
165 #define configIDLE_SHOULD_YIELD 1
166 #define configUSE_MUTEXES 1
167 #define configQUEUE_REGISTRY_SIZE 8
168 #define configCHECK_FOR_STACK_OVERFLOW 2
169 #define configUSE_RECURSIVE_MUTEXES 1
170 #define configUSE_MALLOC_FAILED_HOOK 1
171 #define configUSE_APPLICATION_TASK_TAG 0
172 #define configUSE_COUNTING_SEMAPHORES 1
173 #define configUSE_QUEUE_SETS 1
174 #define configUSE_TASK_NOTIFICATIONS 1
176 /* Co-routine definitions. */
177 #define configUSE_CO_ROUTINES 0
178 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
180 /* Software timer definitions. */
181 #define configUSE_TIMERS 1
182 #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
183 #define configTIMER_QUEUE_LENGTH 8
184 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )
186 /* Set the following definitions to 1 to include the API function, or zero
187 to exclude the API function. */
188 #define INCLUDE_vTaskPrioritySet 1
189 #define INCLUDE_uxTaskPriorityGet 1
190 #define INCLUDE_vTaskDelete 1
191 #define INCLUDE_vTaskCleanUpResources 1
192 #define INCLUDE_vTaskSuspend 1
193 #define INCLUDE_vTaskDelayUntil 1
194 #define INCLUDE_vTaskDelay 1
195 #define INCLUDE_xTimerPendFunctionCall 1
196 #define INCLUDE_eTaskGetState 1
198 /* This demo makes use of one or more example stats formatting functions. These
199 format the raw data provided by the uxTaskGetSystemState() function in to human
200 readable ASCII form. See the notes in the implementation of vTaskList() within
201 FreeRTOS/Source/tasks.c for limitations. */
202 #define configUSE_STATS_FORMATTING_FUNCTIONS 1
204 /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS is not required because the time base
205 comes from the ulHighFrequencyTimerCounts variable which is incremented in a
206 high frequency timer that is already being started as part of the interrupt
208 #define configGENERATE_RUN_TIME_STATS 0
210 /* The size of the global output buffer that is available for use when there
211 are multiple command interpreters running at once (for example, one on a UART
212 and one on TCP/IP). This is done to prevent an output buffer being defined by
213 each implementation - which would waste RAM. In this case, there is only one
214 command interpreter running. */
215 #define configCOMMAND_INT_MAX_OUTPUT_SIZE 2096
217 /* This file is included from assembler files - make sure C code is not included
218 in assembler files. */
219 #ifndef __ASSEMBLER__
220 void vAssertCalled( const char * pcFile, unsigned long ulLine );
221 void vConfigureTickInterrupt( void );
222 void vClearTickInterrupt( void );
223 #endif /* __ASSEMBLER__ */
227 /* Normal assert() semantics without relying on the provision of an assert.h
229 #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ );
233 /****** Hardware/compiler specific settings. *******************************************/
236 * The application must provide a function that configures a peripheral to
237 * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT()
238 * in FreeRTOSConfig.h to call the function. This file contains a function
239 * that is suitable for use on the Zynq MPU. FreeRTOS_Tick_Handler() must
240 * be installed as the peripheral's interrupt handler.
242 #define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()
243 #define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()
246 /* Compiler specifics. */
247 #define fabs( x ) __builtin_fabs( ( x ) )
249 #endif /* FREERTOS_CONFIG_H */