]> git.sur5r.net Git - freertos/blob - FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h
Minor updates and change version number for V7.5.0 release.
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
3 \r
4     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
5 \r
6     ***************************************************************************\r
7      *                                                                       *\r
8      *    FreeRTOS provides completely free yet professionally developed,    *\r
9      *    robust, strictly quality controlled, supported, and cross          *\r
10      *    platform software that has become a de facto standard.             *\r
11      *                                                                       *\r
12      *    Help yourself get started quickly and support the FreeRTOS         *\r
13      *    project by purchasing a FreeRTOS tutorial book, reference          *\r
14      *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
15      *                                                                       *\r
16      *    Thank you!                                                         *\r
17      *                                                                       *\r
18     ***************************************************************************\r
19 \r
20     This file is part of the FreeRTOS distribution.\r
21 \r
22     FreeRTOS is free software; you can redistribute it and/or modify it under\r
23     the terms of the GNU General Public License (version 2) as published by the\r
24     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
25 \r
26     >>! NOTE: The modification to the GPL is included to allow you to distribute\r
27     >>! a combined work that includes FreeRTOS without being obliged to provide\r
28     >>! the source code for proprietary components outside of the FreeRTOS\r
29     >>! kernel.\r
30 \r
31     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
32     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
33     FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
34     link: http://www.freertos.org/a00114.html\r
35 \r
36     1 tab == 4 spaces!\r
37 \r
38     ***************************************************************************\r
39      *                                                                       *\r
40      *    Having a problem?  Start by reading the FAQ "My application does   *\r
41      *    not run, what could be wrong?"                                     *\r
42      *                                                                       *\r
43      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
44      *                                                                       *\r
45     ***************************************************************************\r
46 \r
47     http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
48     license and Real Time Engineers Ltd. contact details.\r
49 \r
50     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
51     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
52     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
53 \r
54     http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
55     Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
56     licenses offer ticketed support, indemnification and middleware.\r
57 \r
58     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
59     engineered and independently SIL3 certified version for use in safety and\r
60     mission critical applications that require provable dependability.\r
61 \r
62     1 tab == 4 spaces!\r
63 */\r
64 \r
65 #ifndef FREERTOS_CONFIG_H\r
66 #define FREERTOS_CONFIG_H\r
67 \r
68 /*-----------------------------------------------------------\r
69  * Application specific definitions.\r
70  *\r
71  * These definitions should be adjusted for your particular hardware and\r
72  * application requirements.\r
73  *\r
74  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
75  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
76  * http://www.freertos.org/a00110.html\r
77  *\r
78  * The bottom of this file contains some constants specific to running the UDP\r
79  * stack in this demo.  Constants specific to FreeRTOS+UDP itself (rather than\r
80  * the demo) are contained in FreeRTOSIPConfig.h.\r
81  *----------------------------------------------------------*/\r
82 \r
83 #define configUSE_PREEMPTION                    1\r
84 #define configMAX_PRIORITIES                    ( ( unsigned portBASE_TYPE ) 7 )\r
85 #define configTICK_RATE_HZ                              ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */\r
86 #define configMINIMAL_STACK_SIZE                ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the Win32 thread. */\r
87 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) ( 32U * 1024U ) )\r
88 #define configMAX_TASK_NAME_LEN                 ( 7 )\r
89 #define configUSE_TRACE_FACILITY                1\r
90 #define configUSE_16_BIT_TICKS                  0\r
91 #define configIDLE_SHOULD_YIELD                 1\r
92 #define configUSE_CO_ROUTINES                   0\r
93 #define configUSE_MUTEXES                               1\r
94 #define configUSE_RECURSIVE_MUTEXES             1\r
95 #define configQUEUE_REGISTRY_SIZE               0\r
96 #define configUSE_APPLICATION_TASK_TAG  0\r
97 #define configUSE_COUNTING_SEMAPHORES   1\r
98 #define configUSE_ALTERNATIVE_API               0\r
99 \r
100 /* Hook function related definitions. */\r
101 #define configUSE_TICK_HOOK                             0\r
102 #define configUSE_IDLE_HOOK                             1\r
103 #define configUSE_MALLOC_FAILED_HOOK    1\r
104 #define configCHECK_FOR_STACK_OVERFLOW  0 /* Not applicable to the Win32 port. */\r
105 \r
106 /* Software timer related definitions. */\r
107 #define configUSE_TIMERS                                1\r
108 #define configTIMER_TASK_PRIORITY               ( configMAX_PRIORITIES - 1 )\r
109 #define configTIMER_QUEUE_LENGTH                5\r
110 #define configTIMER_TASK_STACK_DEPTH    ( configMINIMAL_STACK_SIZE * 2 )\r
111 \r
112 /* Run time stats gathering definitions. */\r
113 unsigned long ulGetRunTimeCounterValue( void );\r
114 void vConfigureTimerForRunTimeStats( void );\r
115 #define configGENERATE_RUN_TIME_STATS   1\r
116 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()\r
117 #define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()\r
118 \r
119 /* Co-routine definitions. */\r
120 #define configUSE_CO_ROUTINES                   0\r
121 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
122 \r
123 /* Set the following definitions to 1 to include the API function, or zero\r
124 to exclude the API function. */\r
125 #define INCLUDE_vTaskPrioritySet                        1\r
126 #define INCLUDE_uxTaskPriorityGet                       1\r
127 #define INCLUDE_vTaskDelete                                     1\r
128 #define INCLUDE_vTaskCleanUpResources           0\r
129 #define INCLUDE_vTaskSuspend                            1\r
130 #define INCLUDE_vTaskDelayUntil                         1\r
131 #define INCLUDE_vTaskDelay                                      1\r
132 #define INCLUDE_uxTaskGetStackHighWaterMark     1\r
133 #define INCLUDE_xTaskGetSchedulerState          1\r
134 #define INCLUDE_xTimerGetTimerTaskHandle        0\r
135 #define INCLUDE_xTaskGetIdleTaskHandle          0\r
136 #define INCLUDE_xQueueGetMutexHolder            1\r
137 \r
138 /* This demo makes use of one or more example stats formatting functions.  These\r
139 format the raw data provided by the xTaskGetSystemState() function in to human\r
140 readable ASCII form.  See the notes in the implementation of vTaskList() within \r
141 FreeRTOS/Source/tasks.c for limitations. */\r
142 #define configINCLUDE_STATS_FORMATTING_FUNCTIONS        1\r
143 \r
144 /* Assert call defined for debug builds. */\r
145 #ifdef _DEBUG\r
146         extern void vAssertCalled( void );\r
147         #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled()\r
148 #endif /* _DEBUG */\r
149 \r
150 \r
151 \r
152 /* Application specific definitions follow. **********************************/\r
153 \r
154 /* If configINCLUDE_DEMO_DEBUG_STATS is set to one, then a few basic IP trace\r
155 macros are defined to gather some UDP stack statistics that can then be viewed\r
156 through the CLI interface. */\r
157 #define configINCLUDE_DEMO_DEBUG_STATS 1\r
158 \r
159 /* The size of the global output buffer that is available for use when there\r
160 are multiple command interpreters running at once (for example, one on a UART\r
161 and one on TCP/IP).  This is done to prevent an output buffer being defined by\r
162 each implementation - which would waste RAM.  In this case, there is only one\r
163 command interpreter running, and it has its own local output buffer, so the\r
164 global buffer is just set to be one byte long as it is not used and should not\r
165 take up unnecessary RAM. */\r
166 #define configCOMMAND_INT_MAX_OUTPUT_SIZE 1\r
167 \r
168 /* Only used when running in the FreeRTOS Windows simulator.  Defines the\r
169 priority of the task used to simulate Ethernet interrupts. */\r
170 #define configMAC_ISR_SIMULATOR_PRIORITY        ( configMAX_PRIORITIES - 1 )\r
171 \r
172 /* This demo creates a virtual network connection by accessing the raw Ethernet\r
173 or WiFi data to and from a real network connection.  Many computers have more\r
174 than one real network port, and configNETWORK_INTERFACE_TO_USE is used to tell\r
175 the demo which real port should be used to create the virtual port.  The ports\r
176 available are displayed on the console when the application is executed.  For\r
177 example, on my development laptop setting configNETWORK_INTERFACE_TO_USE to 1\r
178 results in the wired network being used, while setting\r
179 configNETWORK_INTERFACE_TO_USE to 2 results in the wireless network being\r
180 used. */\r
181 #define configNETWORK_INTERFACE_TO_USE 1L\r
182 \r
183 /* The address of an echo server that will be used by the two demo echo client\r
184 tasks.\r
185 http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Common_Echo_Clients.shtml */\r
186 #define configECHO_SERVER_ADDR0 172\r
187 #define configECHO_SERVER_ADDR1 25\r
188 #define configECHO_SERVER_ADDR2 218\r
189 #define configECHO_SERVER_ADDR3 200\r
190 \r
191 /* Default MAC address configuration.  The demo creates a virtual network\r
192 connection that uses this MAC address by accessing the raw Ethernet/WiFi data\r
193 to and from a real network connection on the host PC.  See the\r
194 configNETWORK_INTERFACE_TO_USE definition above for information on how to\r
195 configure the real network connection to use. */\r
196 #define configMAC_ADDR0 0x00\r
197 #define configMAC_ADDR1 0x11\r
198 #define configMAC_ADDR2 0x22\r
199 #define configMAC_ADDR3 0x33\r
200 #define configMAC_ADDR4 0x44\r
201 #define configMAC_ADDR5 0x55\r
202 \r
203 /* Default IP address configuration.  Used in ipconfigUSE_DNS is set to 0, or\r
204 ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */\r
205 #define configIP_ADDR0          172\r
206 #define configIP_ADDR1          25\r
207 #define configIP_ADDR2          218\r
208 #define configIP_ADDR3          200\r
209 \r
210 /* Default gateway IP address configuration.  Used in ipconfigUSE_DNS is set to\r
211 0, or ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */\r
212 #define configGATEWAY_ADDR0     192\r
213 #define configGATEWAY_ADDR1     168\r
214 #define configGATEWAY_ADDR2     1\r
215 #define configGATEWAY_ADDR3     1\r
216 \r
217 /* Default DNS server configuration.  OpenDNS addresses are 208.67.222.222 and\r
218 208.67.220.220.  Used in ipconfigUSE_DNS is set to 0, or ipconfigUSE_DNS is set\r
219 to 1 but a DNS server cannot be contacted.*/\r
220 #define configDNS_SERVER_ADDR0  208\r
221 #define configDNS_SERVER_ADDR1  67\r
222 #define configDNS_SERVER_ADDR2  222\r
223 #define configDNS_SERVER_ADDR3  222\r
224 \r
225 /* Defalt netmask configuration.  Used in ipconfigUSE_DNS is set to 0, or\r
226 ipconfigUSE_DNS is set to 1 but a DNS server cannot be contacted. */\r
227 #define configNET_MASK0         255\r
228 #define configNET_MASK1         255\r
229 #define configNET_MASK2         255\r
230 #define configNET_MASK3         0\r
231 \r
232 /* Provided to guard prints to the console with a semaphore. */\r
233 void vOutputString( char *pcMessage );\r
234 \r
235 #endif /* FREERTOS_CONFIG_H */\r