]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/IA32_flat_GCC_Galileo_Gen_2/FreeRTOSConfig.h
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Demo / IA32_flat_GCC_Galileo_Gen_2 / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
3     All rights reserved\r
4 \r
5     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     This file is part of the FreeRTOS distribution.\r
8 \r
9     FreeRTOS is free software; you can redistribute it and/or modify it under\r
10     the terms of the GNU General Public License (version 2) as published by the\r
11     Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.\r
12 \r
13     ***************************************************************************\r
14     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
15     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
16     >>!   obliged to provide the source code for proprietary components     !<<\r
17     >>!   outside of the FreeRTOS kernel.                                   !<<\r
18     ***************************************************************************\r
19 \r
20     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
21     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
22     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
23     link: http://www.freertos.org/a00114.html\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    FreeRTOS provides completely free yet professionally developed,    *\r
28      *    robust, strictly quality controlled, supported, and cross          *\r
29      *    platform software that is more than just the market leader, it     *\r
30      *    is the industry's de facto standard.                               *\r
31      *                                                                       *\r
32      *    Help yourself get started quickly while simultaneously helping     *\r
33      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
34      *    tutorial book, reference manual, or both:                          *\r
35      *    http://www.FreeRTOS.org/Documentation                              *\r
36      *                                                                       *\r
37     ***************************************************************************\r
38 \r
39     http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
40     the FAQ page "My application does not run, what could be wrong?".  Have you\r
41     defined configASSERT()?\r
42 \r
43     http://www.FreeRTOS.org/support - In return for receiving this top quality\r
44     embedded software for free we request you assist our global community by\r
45     participating in the support forum.\r
46 \r
47     http://www.FreeRTOS.org/training - Investing in training allows your team to\r
48     be as productive as possible as early as possible.  Now you can receive\r
49     FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
50     Ltd, and the world's leading authority on the world's leading RTOS.\r
51 \r
52     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
53     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
54     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
55 \r
56     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
57     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
58 \r
59     http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
60     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
61     licenses offer ticketed support, indemnification and commercial middleware.\r
62 \r
63     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
64     engineered and independently SIL3 certified version for use in safety and\r
65     mission critical applications that require provable dependability.\r
66 \r
67     1 tab == 4 spaces!\r
68 */\r
69 \r
70 #ifndef FREERTOS_CONFIG_H\r
71 #define FREERTOS_CONFIG_H\r
72 \r
73 /*-----------------------------------------------------------\r
74  * Application specific definitions.\r
75  *\r
76  * These definitions should be adjusted for your particular hardware and\r
77  * application requirements.\r
78  *\r
79  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
80  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
81  *\r
82  * See http://www.freertos.org/a00110.html.\r
83  *----------------------------------------------------------*/\r
84 \r
85 /*\r
86  * The FreeRTOS Quark port implements a full interrupt nesting model.\r
87  *\r
88  * Interrupts that are assigned a priority at or below\r
89  * configMAX_API_CALL_INTERRUPT_PRIORITY can call interrupt safe API functions\r
90  * and will nest.\r
91  *\r
92  * Interrupts that are assigned a priority above\r
93  * configMAX_API_CALL_INTERRUPT_PRIORITY cannot call any FreeRTOS API functions,\r
94  * will nest, and will not be masked by FreeRTOS critical sections (although all\r
95  * interrupts are briefly masked by the hardware itself on interrupt entry).\r
96  *\r
97  * FreeRTOS functions that can be called from an interrupt are those that end in\r
98  * "FromISR".  FreeRTOS maintains a separate interrupt safe API to enable\r
99  * interrupt entry to be shorter, faster, simpler and smaller.\r
100  *\r
101  * User definable interrupt priorities range from 2 (the lowest) to 15 (the\r
102  * highest).\r
103  */\r
104 #define configMAX_API_CALL_INTERRUPT_PRIORITY   10\r
105 \r
106 /*\r
107  * Interrupt entry code will switch the stack in use to a dedicated system \r
108  * stack.\r
109  *\r
110  * configISR_STACK_SIZE defines the number of 32-bit values that can be stored\r
111  * on the system stack, and must be large enough to hold a potentially nested\r
112  * interrupt stack frame.\r
113  *\r
114  * Changing this parameter necessitates a complete rebuild so the assembly files\r
115  * also get rebuilt.\r
116  */\r
117 #define configISR_STACK_SIZE                                    350\r
118 \r
119 /*\r
120  * If configSUPPORT_FPU is set to 1 then tasks can optionally have a floating\r
121  * point context (the floating point registers will be saved as part of the task\r
122  * context).  If configSUPPORT_FPU is set to 1 then a task must *not* use any\r
123  * floating point instructions until after it has called vPortTaskUsesFPU().\r
124  *\r
125  * If configSUPPORT_FPU is set to 0 then floating point instructions must never\r
126  * be used.\r
127  */\r
128 #define configSUPPORT_FPU                                               1\r
129 \r
130 /* There are two ways of implementing interrupt handlers:\r
131  *\r
132  *      1) As standard C functions -\r
133  *\r
134  *      This method can only be used if configUSE_COMMON_INTERRUPT_ENTRY_POINT\r
135  *      is set to 1.  The C function is installed using\r
136  *      xPortRegisterCInterruptHandler().\r
137  *\r
138  *      This is the simplest of the two methods but incurs a slightly longer\r
139  *      interrupt entry time.\r
140  *\r
141  *      2) By using an assembly stub that wraps the handler in the FreeRTOS\r
142  *      portFREERTOS_INTERRUPT_ENTRY and portFREERTOS_INTERRUPT_EXIT macros.  The handler is installed\r
143  *      using xPortInstallInterruptHandler().\r
144  *\r
145  * This method can always be used.  It is slightly more complex than\r
146  * method 1 but benefits from a faster interrupt entry time.\r
147  *\r
148  * Changing this parameter necessitates a complete clean build.\r
149  */\r
150 #define configUSE_COMMON_INTERRUPT_ENTRY_POINT  1\r
151 \r
152 #define configCPU_CLOCK_HZ                                              ( 400000000UL )\r
153 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
154 #define configMINIMAL_STACK_SIZE                                ( 125 )\r
155 #define configUSE_TICKLESS_IDLE                                 0\r
156 #define configTICK_RATE_HZ                                              ( ( TickType_t ) 1000 )\r
157 #define configUSE_PREEMPTION                                    1\r
158 #define configUSE_IDLE_HOOK                                             1\r
159 #define configUSE_TICK_HOOK                                             1\r
160 #define configMAX_PRIORITIES                                    ( 7 )\r
161 #define configTOTAL_HEAP_SIZE                                   ( ( size_t ) ( 55 * 1024 ) )\r
162 #define configMAX_TASK_NAME_LEN                                 ( 10 )\r
163 #define configUSE_TRACE_FACILITY                                0\r
164 #define configUSE_16_BIT_TICKS                                  0\r
165 #define configIDLE_SHOULD_YIELD                                 1\r
166 #define configUSE_MUTEXES                                               1\r
167 #define configQUEUE_REGISTRY_SIZE                               8\r
168 #define configCHECK_FOR_STACK_OVERFLOW                  2\r
169 #define configUSE_RECURSIVE_MUTEXES                             1\r
170 #define configUSE_MALLOC_FAILED_HOOK                    1\r
171 #define configUSE_APPLICATION_TASK_TAG                  0\r
172 #define configUSE_COUNTING_SEMAPHORES                   1\r
173 #define configUSE_QUEUE_SETS                                    1\r
174 #define configUSE_TASK_NOTIFICATIONS                    1\r
175 \r
176 /* Co-routine definitions. */\r
177 #define configUSE_CO_ROUTINES                                   0\r
178 #define configMAX_CO_ROUTINE_PRIORITIES                 ( 2 )\r
179 \r
180 /* Software timer definitions. */\r
181 #define configUSE_TIMERS                                                1\r
182 #define configTIMER_TASK_PRIORITY                               ( configMAX_PRIORITIES - 1 )\r
183 #define configTIMER_QUEUE_LENGTH                                8\r
184 #define configTIMER_TASK_STACK_DEPTH                    ( configMINIMAL_STACK_SIZE * 2 )\r
185 \r
186 /* Set the following definitions to 1 to include the API function, or zero\r
187 to exclude the API function. */\r
188 #define INCLUDE_vTaskPrioritySet                                1\r
189 #define INCLUDE_uxTaskPriorityGet                               1\r
190 #define INCLUDE_vTaskDelete                                             1\r
191 #define INCLUDE_vTaskCleanUpResources                   1\r
192 #define INCLUDE_vTaskSuspend                                    1\r
193 #define INCLUDE_vTaskDelayUntil                                 1\r
194 #define INCLUDE_vTaskDelay                                              1\r
195 #define INCLUDE_xTimerPendFunctionCall                  1\r
196 #define INCLUDE_eTaskGetState                                   1\r
197 \r
198 /* This demo makes use of one or more example stats formatting functions.  These\r
199 format the raw data provided by the uxTaskGetSystemState() function in to human\r
200 readable ASCII form.  See the notes in the implementation of vTaskList() within\r
201 FreeRTOS/Source/tasks.c for limitations. */\r
202 #define configUSE_STATS_FORMATTING_FUNCTIONS    1\r
203 \r
204 /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS is not required because the time base\r
205 comes from the ulHighFrequencyTimerCounts variable which is incremented in a\r
206 high frequency timer that is already being started as part of the interrupt\r
207 nesting test. */\r
208 #define configGENERATE_RUN_TIME_STATS   0\r
209 \r
210 /* The size of the global output buffer that is available for use when there\r
211 are multiple command interpreters running at once (for example, one on a UART\r
212 and one on TCP/IP).  This is done to prevent an output buffer being defined by\r
213 each implementation - which would waste RAM.  In this case, there is only one\r
214 command interpreter running. */\r
215 #define configCOMMAND_INT_MAX_OUTPUT_SIZE 2096\r
216 \r
217 /* This file is included from assembler files - make sure C code is not included\r
218 in assembler files. */\r
219 #ifndef __ASSEMBLER__\r
220         void vAssertCalled( const char * pcFile, unsigned long ulLine );\r
221         void vConfigureTickInterrupt( void );\r
222         void vClearTickInterrupt( void );\r
223 #endif /* __ASSEMBLER__ */\r
224 \r
225 \r
226 \r
227 /* Normal assert() semantics without relying on the provision of an assert.h\r
228 header file. */\r
229 #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ );\r
230 \r
231 \r
232 \r
233 /****** Hardware/compiler specific settings. *******************************************/\r
234 \r
235 /*\r
236  * The application must provide a function that configures a peripheral to\r
237  * create the FreeRTOS tick interrupt, then define configSETUP_TICK_INTERRUPT()\r
238  * in FreeRTOSConfig.h to call the function.  This file contains a function\r
239  * that is suitable for use on the Zynq MPU.  FreeRTOS_Tick_Handler() must\r
240  * be installed as the peripheral's interrupt handler.\r
241  */\r
242 #define configSETUP_TICK_INTERRUPT() vConfigureTickInterrupt()\r
243 #define configCLEAR_TICK_INTERRUPT() vClearTickInterrupt()\r
244 \r
245 \r
246 /* Compiler specifics. */\r
247 #define fabs( x )                       __builtin_fabs( ( x ) )\r
248 \r
249 #endif /* FREERTOS_CONFIG_H */\r
250 \r