]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo/FreeRTOSConfig.h
Add the new configINCLUDE_STATS_FORMATTING_FUNCTIONS configuration parameter to FreeR...
[freertos] / FreeRTOS / Demo / CORTEX_SmartFusion2_M2S050_SoftConsole / RTOSDemo / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
3 \r
4     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
5     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
6 \r
7     ***************************************************************************\r
8      *                                                                       *\r
9      *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
10      *    Complete, revised, and edited pdf reference manuals are also       *\r
11      *    available.                                                         *\r
12      *                                                                       *\r
13      *    Purchasing FreeRTOS documentation will not only help you, by       *\r
14      *    ensuring you get running as quickly as possible and with an        *\r
15      *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
16      *    the FreeRTOS project to continue with its mission of providing     *\r
17      *    professional grade, cross platform, de facto standard solutions    *\r
18      *    for microcontrollers - completely free of charge!                  *\r
19      *                                                                       *\r
20      *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
21      *                                                                       *\r
22      *    Thank you for using FreeRTOS, and thank you for your support!      *\r
23      *                                                                       *\r
24     ***************************************************************************\r
25 \r
26 \r
27     This file is part of the FreeRTOS distribution.\r
28 \r
29     FreeRTOS is free software; you can redistribute it and/or modify it under\r
30     the terms of the GNU General Public License (version 2) as published by the\r
31     Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
32 \r
33     >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
34     distribute a combined work that includes FreeRTOS without being obliged to\r
35     provide the source code for proprietary components outside of the FreeRTOS\r
36     kernel.\r
37 \r
38     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
39     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
40     FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\r
41     details. You should have received a copy of the GNU General Public License\r
42     and the FreeRTOS license exception along with FreeRTOS; if not it can be\r
43     viewed here: http://www.freertos.org/a00114.html and also obtained by\r
44     writing to Real Time Engineers Ltd., contact details for whom are available\r
45     on the FreeRTOS WEB site.\r
46 \r
47     1 tab == 4 spaces!\r
48 \r
49     ***************************************************************************\r
50      *                                                                       *\r
51      *    Having a problem?  Start by reading the FAQ "My application does   *\r
52      *    not run, what could be wrong?"                                     *\r
53      *                                                                       *\r
54      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
55      *                                                                       *\r
56     ***************************************************************************\r
57 \r
58 \r
59     http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
60     license and Real Time Engineers Ltd. contact details.\r
61 \r
62     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
63     including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
64     fully thread aware and reentrant UDP/IP stack.\r
65 \r
66     http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
67     Integrity Systems, who sell the code with commercial support,\r
68     indemnification and middleware, under the OpenRTOS brand.\r
69 \r
70     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
71     engineered and independently SIL3 certified version for use in safety and\r
72     mission critical applications that require provable dependability.\r
73 */\r
74 \r
75 \r
76 #ifndef FREERTOS_CONFIG_H\r
77 #define FREERTOS_CONFIG_H\r
78 \r
79 /*\r
80  * The following #error directive is to remind users that a batch file must be\r
81  * executed prior to this project being built.  Once it has been executed\r
82  * remove the #error line below.\r
83  */\r
84 //#error Ensure CreateProjectDirectoryStructure.bat has been executed before building.  See comment immediately above.\r
85 \r
86 /*\r
87  * Set configCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
88  * or 0 to run the more comprehensive test and demo application.\r
89  */\r
90 #define configCREATE_SIMPLE_BLINKY_DEMO_ONLY    0\r
91 \r
92 /*\r
93  * Set configBUILD_FOR_DEVELOPMENT_KIT to 1 to run the demo on the SmartFusion2\r
94  * development kit, or 0 to run the demo on the SmartFusion2 starter kit.  Refer\r
95  * to the documentation page for this demo on the FreeRTOS.org website for\r
96  * instruction on switching between the two hardware platforms.
97  */\r
98 #define configBUILD_FOR_DEVELOPMENT_KIT 0\r
99 \r
100 /*-----------------------------------------------------------\r
101  * Application specific definitions.\r
102  *\r
103  * These definitions should be adjusted for your particular hardware and\r
104  * application requirements.\r
105  *\r
106  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
107  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
108  *\r
109  * See http://www.freertos.org/a00110.html.\r
110  *----------------------------------------------------------*/\r
111 \r
112 #include <stdint.h>\r
113 extern uint32_t SystemCoreClock;\r
114 \r
115 #define configUSE_PREEMPTION                    1\r
116 #define configUSE_IDLE_HOOK                             1\r
117 #define configUSE_TICK_HOOK                             0\r
118 #define configCPU_CLOCK_HZ                              ( SystemCoreClock )\r
119 #define configTICK_RATE_HZ                              ( ( portTickType ) 1000 )\r
120 #define configMAX_PRIORITIES                    ( ( unsigned portBASE_TYPE ) 5 )\r
121 #define configMINIMAL_STACK_SIZE                ( ( unsigned short ) 80 )\r
122 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) ( 25000 ) )\r
123 #define configMAX_TASK_NAME_LEN                 ( 10 )\r
124 #define configUSE_TRACE_FACILITY                1\r
125 #define configUSE_16_BIT_TICKS                  0\r
126 #define configIDLE_SHOULD_YIELD                 1\r
127 #define configUSE_MUTEXES                               1\r
128 #define configQUEUE_REGISTRY_SIZE               0\r
129 #define configCHECK_FOR_STACK_OVERFLOW  2\r
130 #define configUSE_RECURSIVE_MUTEXES             1\r
131 #define configUSE_MALLOC_FAILED_HOOK    1\r
132 #define configUSE_APPLICATION_TASK_TAG  0\r
133 #define configUSE_COUNTING_SEMAPHORES   1\r
134 \r
135 /* Co-routine definitions. */\r
136 #define configUSE_CO_ROUTINES                   0\r
137 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
138 \r
139 /* Software timer definitions. */\r
140 #define configUSE_TIMERS                                1\r
141 #define configTIMER_TASK_PRIORITY               ( 2 )\r
142 #define configTIMER_QUEUE_LENGTH                5\r
143 #define configTIMER_TASK_STACK_DEPTH    ( configMINIMAL_STACK_SIZE * 2 )\r
144 \r
145 /* Run time stats gathering definitions. */\r
146 void vConfigureTimerForRunTimeStats( void );\r
147 uint32_t ulGetRunTimeCounterValue( void );\r
148 #define configGENERATE_RUN_TIME_STATS   1\r
149 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()\r
150 #define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()\r
151 \r
152 /* Set the following definitions to 1 to include the API function, or zero\r
153 to exclude the API function. */\r
154 #define INCLUDE_vTaskPrioritySet                1\r
155 #define INCLUDE_uxTaskPriorityGet               1\r
156 #define INCLUDE_vTaskDelete                             1\r
157 #define INCLUDE_vTaskCleanUpResources   1\r
158 #define INCLUDE_vTaskSuspend                    1\r
159 #define INCLUDE_vTaskDelayUntil                 1\r
160 #define INCLUDE_vTaskDelay                              1\r
161 \r
162 /* This demo makes use of one or more example stats formatting functions.  These\r
163 format the raw data provided by the xTaskGetSystemState() function in to human\r
164 readable ASCII form.  See the notes in the implementation of vTaskList() within \r
165 FreeRTOS/Source/tasks.c for limitations. */\r
166 #define configINCLUDE_STATS_FORMATTING_FUNCTIONS        1\r
167 \r
168 /* The size of the global output buffer that is available for use when there\r
169 are multiple command interpreters running at once (for example, one on a UART\r
170 and one on TCP/IP).  This is done to prevent an output buffer being defined by\r
171 each implementation - which would waste RAM.  In this case, there is only one\r
172 command interpreter running. */\r
173 #define configCOMMAND_INT_MAX_OUTPUT_SIZE 2048\r
174 \r
175 /* Cortex-M specific definitions. */\r
176 #ifdef __NVIC_PRIO_BITS\r
177         /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */\r
178         #define configPRIO_BITS                 __NVIC_PRIO_BITS\r
179 #else\r
180         #define configPRIO_BITS                 4        /* 15 priority levels */\r
181 #endif\r
182 \r
183 /* The lowest interrupt priority that can be used in a call to a "set priority"\r
184 function. */\r
185 #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY                 0x0f\r
186 \r
187 /* The highest interrupt priority that can be used by any interrupt service\r
188 routine that makes calls to interrupt safe FreeRTOS API functions.  DO NOT CALL\r
189 INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER\r
190 PRIORITY THAN THIS! (higher priorities are lower numeric values. */\r
191 #define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY    10\r
192 \r
193 /* Interrupt priorities used by the kernel port layer itself.  These are generic\r
194 to all Cortex-M ports, and do not rely on any particular library functions. */\r
195 #define configKERNEL_INTERRUPT_PRIORITY                 ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
196 /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!\r
197 See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */\r
198 #define configMAX_SYSCALL_INTERRUPT_PRIORITY    ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )\r
199 \r
200 /* Normal assert() semantics without relying on the provision of an assert.h\r
201 header file. */\r
202 #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }\r
203 \r
204 /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS\r
205 standard names. */\r
206 #define vPortSVCHandler SVC_Handler\r
207 #define xPortPendSVHandler PendSV_Handler\r
208 #define xPortSysTickHandler SysTick_Handler\r
209 \r
210 #endif /* FREERTOS_CONFIG_H */\r
211 \r