]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/Tensilica_Simulator_Xplorer_XCC/FreeRTOSConfig.h
Remove period from the URL that links to the web page that describes the FreeRTOSConf...
[freertos] / FreeRTOS / Demo / Tensilica_Simulator_Xplorer_XCC / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V9.0.0 - 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 /* Required for configuration-dependent settings */\r
75 #include "xtensa_config.h"\r
76 \r
77 /*-----------------------------------------------------------\r
78  * Application specific definitions.\r
79  *\r
80  * These definitions should be adjusted for your particular hardware and\r
81  * application requirements.\r
82  *\r
83  * Note that the default heap size is deliberately kept small so that\r
84  * the build is more likely to succeed for configurations with limited\r
85  * memory.\r
86  *\r
87  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
88  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. \r
89  *----------------------------------------------------------*/\r
90 \r
91 #define configUSE_PREEMPTION                    1\r
92 #define configUSE_IDLE_HOOK                             0\r
93 \r
94 #ifdef SMALL_TEST\r
95 #define configUSE_TICK_HOOK                             0\r
96 #else\r
97 #define configUSE_TICK_HOOK                             1\r
98 #endif\r
99 \r
100 #define configTICK_RATE_HZ                              ( 1000 )\r
101 \r
102 /* Default clock rate for simulator */\r
103 #define configCPU_CLOCK_HZ                              10000000 //_RB_ was 2MHz\r
104 \r
105 /* This has impact on speed of search for highest priority */\r
106 #ifdef SMALL_TEST\r
107 #define configMAX_PRIORITIES                    ( 7 )\r
108 #else\r
109 #define configMAX_PRIORITIES                    ( 7 ) //_RB_\r
110 #endif\r
111 \r
112 /* Minimal stack size. This may need to be increased for your application */\r
113 /* NOTE: The FreeRTOS demos may not work reliably with stack size < 4KB.  */\r
114 /* The Xtensa-specific examples should be fine with XT_STACK_MIN_SIZE.    */\r
115 #if !(defined XT_STACK_MIN_SIZE)\r
116 #error XT_STACK_MIN_SIZE not defined, did you include xtensa_config.h ?\r
117 #endif\r
118 \r
119 #ifdef SMALL_TEST\r
120 #define configMINIMAL_STACK_SIZE                (XT_STACK_MIN_SIZE)\r
121 #else\r
122 #define configMINIMAL_STACK_SIZE                (XT_STACK_MIN_SIZE > 4096 ? XT_STACK_MIN_SIZE : 4096)\r
123 #endif\r
124 \r
125 /* The Xtensa port uses a separate interrupt stack. Adjust the stack size */\r
126 /* to suit the needs of your specific application.                        */\r
127 #ifndef configISR_STACK_SIZE\r
128 #define configISR_STACK_SIZE                    2048\r
129 #endif\r
130 \r
131 /* Minimal heap size to make sure examples can run on memory limited\r
132    configs. Adjust this to suit your system. */\r
133 #ifdef SMALL_TEST\r
134 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) (16 * 1024) )\r
135 #else\r
136 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) (512 * 1024) )\r
137 #endif\r
138 \r
139 #define configMAX_TASK_NAME_LEN                 ( 8 )\r
140 #define configUSE_TRACE_FACILITY                0               /* Used by vTaskList in main.c */\r
141 #define configUSE_STATS_FORMATTING_FUNCTIONS    0       /* Used by vTaskList in main.c */\r
142 #define configUSE_TRACE_FACILITY_2      0               /* Provided by Xtensa port patch */\r
143 #define configBENCHMARK                                 0               /* Provided by Xtensa port patch */\r
144 #define configUSE_16_BIT_TICKS                  0\r
145 #define configIDLE_SHOULD_YIELD                 0\r
146 #define configQUEUE_REGISTRY_SIZE               0\r
147 \r
148 #ifdef SMALL_TEST\r
149 #define configUSE_MUTEXES                               1\r
150 #define configUSE_RECURSIVE_MUTEXES             1\r
151 #define configUSE_COUNTING_SEMAPHORES   1\r
152 #define configCHECK_FOR_STACK_OVERFLOW  0\r
153 #else\r
154 #define configUSE_MUTEXES                               1\r
155 #define configUSE_RECURSIVE_MUTEXES             1\r
156 #define configUSE_COUNTING_SEMAPHORES   1\r
157 #define configCHECK_FOR_STACK_OVERFLOW  2\r
158 #endif\r
159 \r
160 /* Co-routine definitions. */\r
161 #define configUSE_CO_ROUTINES                   0\r
162 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
163 \r
164 /* Set the following definitions to 1 to include the API function, or zero\r
165    to exclude the API function. */\r
166 #define INCLUDE_vTaskPrioritySet                        1\r
167 #define INCLUDE_uxTaskPriorityGet                       1\r
168 #define INCLUDE_vTaskDelete                                     1\r
169 #define INCLUDE_vTaskCleanUpResources           0\r
170 #define INCLUDE_vTaskSuspend                            1\r
171 #define INCLUDE_vTaskDelayUntil                         1\r
172 #define INCLUDE_vTaskDelay                                      1\r
173 #define INCLUDE_uxTaskGetStackHighWaterMark     1\r
174 #define INCLUDE_xTaskAbortDelay                         1\r
175 #define INCLUDE_xTaskGetHandle                          1\r
176 #define INCLUDE_xSemaphoreGetMutexHolder        1\r
177 \r
178 /* The priority at which the tick interrupt runs.  This should probably be\r
179    kept at 1. */\r
180 #define configKERNEL_INTERRUPT_PRIORITY         1\r
181 \r
182 /* The maximum interrupt priority from which FreeRTOS.org API functions can\r
183    be called.  Only API functions that end in ...FromISR() can be used within\r
184    interrupts. */\r
185 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    XCHAL_EXCM_LEVEL\r
186 \r
187 /* XT_USE_THREAD_SAFE_CLIB is defined in xtensa_config.h and can be\r
188    overridden from the compiler/make command line. The small test\r
189    however always disables C lib thread safety to minimize size. */\r
190 #ifdef SMALL_TEST\r
191   #define configUSE_NEWLIB_REENTRANT            0\r
192 #else\r
193 #if (XT_USE_THREAD_SAFE_CLIB > 0u)\r
194   #if XT_HAVE_THREAD_SAFE_CLIB\r
195     #define configUSE_NEWLIB_REENTRANT          0 //_RB_ 1\r
196   #else\r
197     #error "Error: thread-safe C library support not available for this C library."\r
198   #endif\r
199 #else\r
200   #define configUSE_NEWLIB_REENTRANT            0\r
201 #endif\r
202 #endif\r
203 \r
204 /* Test FreeRTOS timers (with timer task) and more. */\r
205 /* Some files don't compile if this flag is disabled */\r
206 #define configUSE_TIMERS                    1\r
207 #define configTIMER_TASK_PRIORITY           ( configMAX_PRIORITIES - 2 )\r
208 #define configTIMER_QUEUE_LENGTH            10\r
209 #define configTIMER_TASK_STACK_DEPTH        configMINIMAL_STACK_SIZE\r
210 \r
211 #ifdef SMALL_TEST\r
212 #define INCLUDE_xTimerPendFunctionCall          0\r
213 #define INCLUDE_eTaskGetState                           0\r
214 #define configUSE_QUEUE_SETS                            0\r
215 #else\r
216 #define INCLUDE_xTimerPendFunctionCall      1\r
217 #define INCLUDE_eTaskGetState               1\r
218 #define configUSE_QUEUE_SETS                1\r
219 #endif\r
220 \r
221 /* Specific config for XTENSA (these can be deleted and they will take default values) */\r
222 \r
223 #if (!defined XT_SIMULATOR) && (!defined XT_BOARD)\r
224 #define configXT_SIMULATOR                  1   /* Simulator mode */\r
225 #define configXT_BOARD                      0   /* Board mode */\r
226 #endif\r
227 \r
228 #ifndef SMALL_TEST\r
229 \r
230 #if (!defined XT_INTEXC_HOOKS)\r
231 #define configXT_INTEXC_HOOKS               1   /* Exception hooks used by certain tests */\r
232 #endif\r
233 \r
234 #if configUSE_TRACE_FACILITY_2\r
235 #define configASSERT_2                                          1       /* Specific to Xtensa port */\r
236 #endif\r
237 \r
238 #endif\r
239 \r
240 /* It is a good idea to define configASSERT() while developing.  configASSERT()\r
241 uses the same semantics as the standard C assert() macro. */\r
242 #if !defined __ASSEMBLER__\r
243         extern void vAssertCalled( unsigned long ulLine, const char * const pcFileName );\r
244 #endif\r
245 #define configASSERT( x ) if( ( x ) == 0 ) vAssertCalled( __LINE__, __FILE__ )\r
246 \r
247 #define configSTREAM_BUFFER_TRIGGER_LEVEL_TEST_MARGIN ( 2 )\r
248 \r
249 #endif /* FREERTOS_CONFIG_H */\r
250 \r