]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/MSP430X_MSP430F5438_IAR/FreeRTOSConfig.h
Update version numbers in preparation for V8.2.0 release candidate 1.
[freertos] / FreeRTOS / Demo / MSP430X_MSP430F5438_IAR / FreeRTOSConfig.h
1 /*\r
2     FreeRTOS V8.2.0rc1 - Copyright (C) 2014 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     >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
14     >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
15     >>!   obliged to provide the source code for proprietary components     !<<\r
16     >>!   outside of the FreeRTOS kernel.                                   !<<\r
17 \r
18     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
19     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
20     FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
21     link: http://www.freertos.org/a00114.html\r
22 \r
23     1 tab == 4 spaces!\r
24 \r
25     ***************************************************************************\r
26      *                                                                       *\r
27      *    Having a problem?  Start by reading the FAQ "My application does   *\r
28      *    not run, what could be wrong?".  Have you defined configASSERT()?  *\r
29      *                                                                       *\r
30      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
31      *                                                                       *\r
32     ***************************************************************************\r
33 \r
34     ***************************************************************************\r
35      *                                                                       *\r
36      *    FreeRTOS provides completely free yet professionally developed,    *\r
37      *    robust, strictly quality controlled, supported, and cross          *\r
38      *    platform software that is more than just the market leader, it     *\r
39      *    is the industry's de facto standard.                               *\r
40      *                                                                       *\r
41      *    Help yourself get started quickly while simultaneously helping     *\r
42      *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
43      *    tutorial book, reference manual, or both:                          *\r
44      *    http://www.FreeRTOS.org/Documentation                              *\r
45      *                                                                       *\r
46     ***************************************************************************\r
47 \r
48     ***************************************************************************\r
49      *                                                                       *\r
50      *   Investing in training allows your team to be as productive as       *\r
51      *   possible as early as possible, lowering your overall development    *\r
52      *   cost, and enabling you to bring a more robust product to market     *\r
53      *   earlier than would otherwise be possible.  Richard Barry is both    *\r
54      *   the architect and key author of FreeRTOS, and so also the world's   *\r
55      *   leading authority on what is the world's most popular real time     *\r
56      *   kernel for deeply embedded MCU designs.  Obtaining your training    *\r
57      *   from Richard ensures your team will gain directly from his in-depth *\r
58      *   product knowledge and years of usage experience.  Contact Real Time *\r
59      *   Engineers Ltd to enquire about the FreeRTOS Masterclass, presented  *\r
60      *   by Richard Barry:  http://www.FreeRTOS.org/contact\r
61      *                                                                       *\r
62     ***************************************************************************\r
63 \r
64     ***************************************************************************\r
65      *                                                                       *\r
66      *    You are receiving this top quality software for free.  Please play *\r
67      *    fair and reciprocate by reporting any suspected issues and         *\r
68      *    participating in the community forum:                              *\r
69      *    http://www.FreeRTOS.org/support                                    *\r
70      *                                                                       *\r
71      *    Thank you!                                                         *\r
72      *                                                                       *\r
73     ***************************************************************************\r
74 \r
75     http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
76     license and Real Time Engineers Ltd. contact details.\r
77 \r
78     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
79     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
80     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
81 \r
82     http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
83     Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
84 \r
85     http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
86     Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
87     licenses offer ticketed support, indemnification and commercial middleware.\r
88 \r
89     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
90     engineered and independently SIL3 certified version for use in safety and\r
91     mission critical applications that require provable dependability.\r
92 \r
93     1 tab == 4 spaces!\r
94 */\r
95 \r
96 #ifndef FREERTOS_CONFIG_H\r
97 #define FREERTOS_CONFIG_H\r
98 \r
99 /*-----------------------------------------------------------\r
100  * Application specific definitions.\r
101  *\r
102  * These definitions should be adjusted for your particular hardware and\r
103  * application requirements.\r
104  *\r
105  * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE\r
106  * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.\r
107  *\r
108  * See http://www.freertos.org/a00110.html.\r
109  *----------------------------------------------------------*/\r
110 \r
111 #define configUSE_PREEMPTION                    1\r
112 #define configUSE_IDLE_HOOK                             1\r
113 #define configUSE_TICK_HOOK                             1\r
114 #define configCPU_CLOCK_HZ                              ( 25000000UL )\r
115 #define configLFXT_CLOCK_HZ                     ( 32768L )\r
116 #define configTICK_RATE_HZ                              ( ( TickType_t ) 1000 )\r
117 #define configMAX_PRIORITIES                    ( 5 )\r
118 #define configTOTAL_HEAP_SIZE                   ( ( size_t ) ( 10 * 1024 ) )\r
119 #define configMAX_TASK_NAME_LEN                 ( 10 )\r
120 #define configUSE_TRACE_FACILITY                1\r
121 #define configUSE_16_BIT_TICKS                  0\r
122 #define configIDLE_SHOULD_YIELD                 1\r
123 #define configUSE_MUTEXES                               1\r
124 #define configQUEUE_REGISTRY_SIZE               5\r
125 #define configGENERATE_RUN_TIME_STATS   1\r
126 #define configCHECK_FOR_STACK_OVERFLOW  2\r
127 #define configUSE_RECURSIVE_MUTEXES             0\r
128 #define configUSE_MALLOC_FAILED_HOOK    1\r
129 #define configUSE_APPLICATION_TASK_TAG  0\r
130 \r
131 #if __DATA_MODEL__ == __DATA_MODEL_SMALL__\r
132         #define configMINIMAL_STACK_SIZE                ( ( unsigned short ) 110 )\r
133 #else\r
134         #define configMINIMAL_STACK_SIZE                ( ( unsigned short ) 80 )\r
135 #endif\r
136 \r
137 /* Co-routine definitions. */\r
138 #define configUSE_CO_ROUTINES           0\r
139 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
140 \r
141 /* Set the following definitions to 1 to include the API function, or zero\r
142 to exclude the API function. */\r
143 #define INCLUDE_vTaskPrioritySet                1\r
144 #define INCLUDE_uxTaskPriorityGet               1\r
145 #define INCLUDE_vTaskDelete                             0\r
146 #define INCLUDE_vTaskCleanUpResources   0\r
147 #define INCLUDE_vTaskSuspend                    1\r
148 #define INCLUDE_vTaskDelayUntil                 1\r
149 #define INCLUDE_vTaskDelay                              1\r
150 \r
151 /* This demo makes use of one or more example stats formatting functions.  These\r
152 format the raw data provided by the uxTaskGetSystemState() function in to human\r
153 readable ASCII form.  See the notes in the implementation of vTaskList() within \r
154 FreeRTOS/Source/tasks.c for limitations. */\r
155 #define configUSE_STATS_FORMATTING_FUNCTIONS    1\r
156 \r
157 /* The MSP430X port uses a callback function to configure its tick interrupt.\r
158 This allows the application to choose the tick interrupt source.\r
159 configTICK_VECTOR must also be set in FreeRTOSConfig.h to the correct\r
160 interrupt vector for the chosen tick interrupt source.  This implementation of\r
161 vApplicationSetupTimerInterrupt() generates the tick from timer A0, so in this\r
162 case configTICK__VECTOR is set to TIMER0_A0_VECTOR. */\r
163 #define configTICK_VECTOR                               TIMER0_A0_VECTOR\r
164 \r
165 /* Prevent the following definitions being included when FreeRTOSConfig.h\r
166 is included from an asm file. */\r
167 #ifdef __ICC430__\r
168         extern void vConfigureTimerForRunTimeStats( void );\r
169         extern volatile unsigned long ulStatsOverflowCount;\r
170 #endif /* __ICCARM__ */\r
171 \r
172 /* Configure a 16 bit timer to generate the time base for the run time stats.\r
173 The timer is configured to interrupt each time it overflows so a count of\r
174 overflows can be kept - that way a 32 bit time value can be constructed from\r
175 the timers current count value and the number of overflows. */\r
176 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()\r
177 \r
178 /* Construct a 32 bit time value for use as the run time stats time base.  This\r
179 comes from the current value of a 16 bit timer combined with the number of times\r
180 the timer has overflowed. */\r
181 #define portALT_GET_RUN_TIME_COUNTER_VALUE( ulCountValue )                                              \\r
182         {                                                                                                                                                       \\r
183                 /* Stop the counter counting temporarily. */                                                    \\r
184                 TA1CTL &= ~MC__CONTINOUS;                                                                                               \\r
185                                                                                                                                                                 \\r
186                 /* Check to see if any counter overflow interrupts are pending. */              \\r
187                 if( ( TA1CTL & TAIFG ) != 0 )                                                                                   \\r
188                 {                                                                                                                                               \\r
189                         /* An overflow has occurred but not yet been processed. */                      \\r
190                         ulStatsOverflowCount++;                                                                                         \\r
191                                                                                                                                                                 \\r
192                         /* Clear the interrupt. */                                                                                      \\r
193                         TA1CTL &= ~TAIFG;                                                                                                       \\r
194                 }                                                                                                                                               \\r
195                                                                                                                                                                 \\r
196                 /* Generate a 32 bit counter value by combinging the current peripheral \\r
197                 counter value with the number of overflows. */                                                  \\r
198                 ulCountValue = ( ulStatsOverflowCount << 16UL );                                                \\r
199                 ulCountValue |= ( unsigned long ) TA1R;                                                                 \\r
200                 TA1CTL |= MC__CONTINOUS;                                                                                                \\r
201         }\r
202 #endif /* FREERTOS_CONFIG_H */\r
203 \r